Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <article class="explain">
	<p>Stylus version of <a href="" target="_blank">the @diana_aceves mixin</a> to fix problems with the last row items in a flexbox grid with <code>justify-content: space-between</code>.</p>
	<p>Adaptación a Stylus del <a href="">Mixin creado por @diana_aceves</a> para arreglar los items huérfanos en un grid con flexbox y space-between.</p>
<ul class="flexlist">
	<li class="item">Item#01</li>
	<li class="item">Item#02</li>
	<li class="item">Item#03</li>
	<li class="item">Item#04</li>
	<li class="item">Item#05</li>
	<li class="item">Item#06</li>
	<li class="item">Item#07</li>
	<li class="item">Item#08</li>
	<li class="item">Item#09</li>
	<li class="item">Item#10</li>


                /*! _____ Functions ____ */
love-between(numcols, itemswidth)
	/* Establecer el ancho de los flex items */
	flex 0 1 itemswidth
	/* Calcular espacio entre flex items */
	filledspace = itemswidth * numcols
	marginspace = 100% - filledspace
	numcolsminus = numcols - 1
	flexmargin = "calc(%s / %s)" % (marginspace numcolsminus)
	/* Aplicar margen izquierdo a los items de la última fila (excepto al primero) */
	&:nth-child({numcols}n+1):nth-last-child(-n+{numcolsminus}) ~ .item
		margin-left "calc(%s / %s)" % (marginspace numcolsminus)
	/* Aplicar margin-right auto al último item */
	for i in (1..(numcols - 2))
		index = numcols - i
			margin-right auto
	/* Marcar los items huérfanos de la últia fila */
	&:nth-child({numcols}n+1):nth-last-child(-n+{numcolsminus}) ~ .item
		background teal

/*! _____ Styles ____ */
	box-sizing border-box
	font-family sans-serif

	max-width 600px
	color #7a7a7a
	margin 0 auto 2rem
	padding .5rem .5rem .5rem 1rem
	border-left 3px solid lightgray
	background #eaeaea
		color #5f5f5f
	display flex
	flex-flow row wrap
	justify-content space-between
	list-style none
	padding 0
		text-transform uppercase
		text-align center
		color white
		margin-bottom 2%
		padding 2rem 2%
		background-color turquoise
		word-break break-word
		love-between(4, 23%)