Pen Settings

HTML

CSS

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

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

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.

HTML

              
                 <main class="grid">
 	<h1 class="title">
 		<span class="title__feature">Fetch</span> the bolt cutters
 	</h1>
 	<p class="subtitle">I've been in here too long</p>
 	<div class="panels">
 		<div class="panel">
 			<img class="panel__img" src="https://drive.google.com/uc?export=view&id=1dNy0kPX7bAvvABDoABU9UorXIguCRIci" " alt=" Fiona Apple photographed by Zelda Hallman for Vulture" />
 		</div>
 		<div class="panel panel--feature" aria-hidden="true">
 			<img class="panel__img" src="https://drive.google.com/uc?export=view&id=1dNy0kPX7bAvvABDoABU9UorXIguCRIci" " alt="" />
        </div>
        <div class=" panel panel--smol" aria-hidden="true">
 			<img class="panel__img" src="https://drive.google.com/uc?export=view&id=1dNy0kPX7bAvvABDoABU9UorXIguCRIci" " alt="" />
        </div>
      </div>
      <!--  just using filler text to get the wavy line effect but making sure assistive technology doesn't pick it up  -->
      <div class=" wavy-line" aria-hidden="true">filler text</div>
 </main>
              
            
!

CSS

              
                :root {
	--lemon: #f4e939;
	--lemon-light: #fffccc;
	--berry: #d63fd4;
	--melon: #ff6565;

	--fetch-border: 0.25em solid var(--berry);

	--clip: polygon(
		13.11% 90.58%,
		16.56% 80.25%,
		12.89% 58.92%,
		28.49% 32.1%,
		31.45% 23.32%,
		40.59% 5.64%,
		51.21% 2.82%,
		61.54% 4.36%,
		66.88% 6.68%,
		72.12% 16.53%,
		83.2% 29.85%,
		90.21% 48.93%,
		90.24% 74.74%,
		92.62% 88.65%,
		67.72% 99.54%
	);
}

.grid {
	margin: auto;
	display: grid;
	grid-template-rows: 10rem auto 5rem;
}

.title {
	margin: -5rem 0 1.5rem;
	align-self: center;
	justify-self: center;
	grid-row: 1 / 2;
	grid-column: 1 / -1;
	padding: 0.5rem 1rem;
	font-weight: normal;
	text-transform: uppercase;
	font-size: 5vmin;
	position: relative;
	z-index: 1;
}

.title__feature {
	font-weight: 500;
	border-top: var(--fetch-border);
}

.subtitle {
	margin: 0;
	width: max-content;
	justify-self: end;
	padding: 1.25rem;
	background-color: #fff;
	z-index: 1;
	position: relative;
}

.panels {
	display: flex;
	grid-row: 2 / 3;
	background-color: var(--lemon);
	position: relative;
	box-shadow: 1.5rem 1.5rem 0 var(--lemon-light);
}

.panel {
	height: 50vmin;
}

.panel__img {
	display: block;
	max-width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(1) contrast(2);
	mix-blend-mode: darken;
	clip-path: var(--clip);
}

.panel--feature {
	background-color: var(--berry);
	clip-path: var(--clip);
	transform: scale(1.35);
}

.panel--smol {
	position: relative;
	padding: 0.25rem;
	transform: scale(0.75);
	background-color: var(--lemon-light);

	&::before,
	&::after {
		--offset: 4%;
		position: absolute;
		content: "";
		width: 100%;
		height: 100%;
		clip-path: var(--clip);
	}

	//   melon shadow on the third image
	&::before {
		left: var(--offset);
		top: var(--offset);
		background-color: var(--melon);
	}

	//   grey shadow on the third image
	&::after {
		left: calc(var(--offset) * -0.75);
		top: calc(var(--offset) * -0.75);
		background-color: #ccc;
		mix-blend-mode: multiply;
		z-index: -1;
	}
}

.wavy-line {
	margin-top: -1.5rem;
	grid-column: 1 / -1;
	grid-row: 1/ 2;
	align-self: center;
	justify-self: center;
	position: relative;
	z-index: 0;
	font-family: sans-serif;
	text-decoration: var(--berry) wavy line-through;
	color: transparent;
	font-size: 10vmin;
	user-select: none;
}

@media screen and (min-width: 56.25rem) {
	.grid {
		grid-template-columns: 10vmin 15vmin auto 15vmin;
		grid-template-rows: 10vmin auto 10vmin;
	}

	.title {
		margin: 0;
		writing-mode: vertical-rl;
		grid-column: 4 / -1;
		grid-row: 1 / -1;
		align-self: center;
		background-color: transparent;
	}

	.title__feature {
		border-top: none;
		border-left: var(--fetch-border);
		padding-left: 0.15em;
	}

	.subtitle {
		grid-column: 1 / 4;
		grid-row: 2 / 4;
		align-self: center;
		justify-self: start;
	}

	.panels {
		grid-column: 2 / 4;
		grid-row: 2 / 3;
	}

	.wavy-line {
		writing-mode: vertical-rl;
		grid-column: 1 / 3;
		grid-row: 1/ -1;
		margin-right: 3vmin;
		margin-top: 3vmin;
	}
}

html,
body {
	min-height: 100vh;
}

body {
	margin: 0;
	display: flex;
	font-family: "Roboto Mono", monospace;
}

*,
*:before,
*:after {
	box-sizing: border-box;
}

              
            
!

JS

              
                
              
            
!
999px

Console