Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ 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.


Auto Save

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.


	<h1>Title Border Sass Mixin</h1>
	<p>To apply a decorative border beneath a title</p>

	<div class="card">
		<h2 class="heading">Default</h2>
		<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Sequi nulla facere eveniet.</p>
	<div class="card">
		<h2 class="heading h-1">Change All Variables</h2>
		<p>At enim, libero repellat officia dolorem illum aliquam aut cum, dignissimos fugit deserunt.</p>
	<div class="card">
		<h2 class="heading h-2">One Variable Change</h2>
		<p>Incidunt laboriosam quam, earum ratione nemo, optio quos ullam sint voluptates vitae velit.</p>


                @import url('|Quicksand');
@import "bourbon";

body { background: #222222; padding: 35px 0 0; }

$font-serif: 'Playfair Display', serif;
$font-sans: 'Quicksand', sans-serif;

// Colours.
$colors: ( #27ae60, #6d9eeb, #2980b9, #8e44ad, #c20e9b, #16a085 );
@mixin title-border($color:#27ae60, $height:4px, $width:50%) {
    &:after {
        border-bottom: $height solid $color;
        content: '';
        display: block;
        margin: 0 auto;
        padding-bottom: 15px;
        width: $width;
// Use Case:
.heading {
	@include title-border;

.h-1 {
    @include title-border(#6d9eeb, 10px, 100%);

.h-2 {
	@include title-border($color: #c20e9b);

header {
	color: #dadada;
	font-family: $font-serif;
	letter-spacing: 2px;
	margin-bottom: 20px;
	text-align: center;
	h1 {
		margin-top: 0;
} // header

main {
	color: white;
	display: flex;
	justify-content: space-between;
	margin: 0 auto;
	max-width: 1000px;
	h2 {
		font-family: $font-serif;
	.card {
		border: 1px solid #6d9eeb;
		padding: 8px 15px;
		text-align: center;
		width: calc((100% / 3) - 5%);
		&:not(:last-of-type) {
			margin: 0 2% 0 0;
	} // .card
} // main