Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

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.

HTML

              
                <p><code>clip-path</code> and <code>filter: drop-shadow($sh)</code> set on same element: <code>filter</code> is applied first, creates drop shadow on rectangular element, then <code>clip-path</code> cuts it all out</p>

<div class='star'></div>

<p><code>filter</code> is applied on parent of clipped element, but this parent has either some text content, a <code>border</code>, a <code>box-shadow</code> or a <code>background</code></p>

<div class='parent' title='text'> Star
	<div class='star'></div>
</div>

<div class='parent--1' title='border'>
	<div class='star'></div>
</div>

<div class='parent--2' title='box-shadow'>
	<div class='star'></div>
</div>

<div class='parent--3' title='image background'>
	<div class='star'></div>
</div>

<div class='parent--4' title='semitransparent background'>
	<div class='star'></div>
</div>

<div class='parent--5' title='solid background'>
	<div class='star'></div>
</div>

<div class='parent--6' title='radial gradient, partly transparent background'>
	<div class='star'></div>
</div>

<div class='parent--7' title='linear gradient, partly transparent background'>
	<div class='star'></div>
</div>

<p><code>filter</code> is applied on parent of clipped element and this parent has no other visible parts</p>

<div title='no other visible parts'>
	<div class='star'></div>
</div>
              
            
!

CSS

              
                body {
	font: 1.25em trebuchet ms, tahoma, verdana, sans-serif
}

body > div {
	display: inline-block;
	margin: 0 1em;
	filter: drop-shadow(5px 5px 5px dodgerblue);
	text-align: center;
	vertical-align: middle
}

code {
	color: darkslategray;
	font: 700 1em consolas, monospace;
}

.parent--1 { border: solid 5px gold }

.parent--2 { box-shadow: 0 0 3px 2px gold }

.parent--3 {
	background: url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/2017/17_04_art_bw_butterfly_bg.jpg) 50%/ cover crimson;
	background-blend-mode: lighten
}

.parent--4 { background: rgba(gold, .2) }

.parent--5 { background: crimson }

.parent--6 { background: radial-gradient(crimson 35%, transparent 51%) 50%/ 20% 20% }

.parent--7 { background: repeating-linear-gradient(45deg, crimson 0, crimson .75em, transparent 0, transparent 2em) }

.star {
	width: 8em; height: 8em;
	background: gold;
	clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)
}
              
            
!

JS

              
                
              
            
!
999px

Console