HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
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.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
Using packages here is powered by esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<div id="app">
<v-app :class="[{ 'theme--color' : colorThemeActive, 'is-focused': mockupIsVisible }]">
<v-container>
<img src="https://assets.codepen.io/97621/NYTimes-minimalist-UI.jpeg" alt="mockup preview" class="mockup-preview" @click="togglePreview" />
<v-row class="screens">
<v-col v-for="screen in screens" :key="screen.id" class="col-md-4 mb-7 mb-md-0">
<v-card class="screen d-flex flex-column mx-auto pa-3 elevation-20" rounded="xl" :class="screen.screenClass">
<v-toolbar v-if="screen.toolbar" class="toolbar" flat dense>
<v-btn icon>
<v-icon>mdi-chevron-left</v-icon>
</v-btn>
<v-toolbar-title class="mx-auto">
<small class="caption pl-1">Step {{ screen.stepNumber }} / 12</small>
</v-toolbar-title>
<v-btn class="bookmark-button mr-1" icon @click="bookmarkNotice(screen)">
<v-icon>mdi-bookmark-outline</v-icon>
</v-btn>
<v-btn v-if="!screen.reveal" class="menu-button" icon @click="togglePanel(screen)">
<v-icon class="icon">mdi-sort-variant</v-icon>
</v-btn>
<v-btn v-else class="mt-0" icon @click="togglePanel(screen)">
<v-icon>mdi-close-box</v-icon>
</v-btn>
</v-toolbar>
<div v-if="screen.logo" class="logo mb-4 pt-5 px-12">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 184 25" fill="#000">
<path d="M13.8 2.9c0-2-1.9-2.5-3.4-2.5v.3c.9 0 1.6.3 1.6 1 0 .4-.3 1-1.2 1-.7 0-2.2-.4-3.3-.8C6.2 1.4 5 1 4 1 2 1 .6 2.5.6 4.2c0 1.5 1.1 2 1.5 2.2l.1-.2c-.2-.2-.5-.4-.5-1 0-.4.4-1.1 1.4-1.1.9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.2 3.5-3.2l1.2 1 .1 3.6z"></path>
</svg>
</div>
<div class="media">
<h2 v-if="screen.id === 3" class="article-title">
{{ screen.title }}
</h2>
<v-img :src="screen.srcUrl" :class="{'mt-6 mx-6 mb-4' : screen.id === 2}" />
</div>
<v-card-text :class="screen.textClass">
<v-icon v-if="screen.icon" class="screen-icon mb-4 ml-n1" color="grey darken-4">{{ screen.icon }}</v-icon>
<h2 v-if="screen.id !== 3" class="article-title">
{{ screen.title }}
</h2>
<small v-if="screen.id === 1">{{ screen.authorName }}</small>
<p v-if="screen.id === 2" class="pr-3">
{{ screen.copy }}
</p>
<v-list v-if="screen.id === 3" class="checklist" flat>
<v-list-item-group class="d-flex flex-column justify-between" multiple>
<v-list-item v-for="item in screens[2].checklist" :key="item.label" class="pr-1" :class="{'is-active' : item.value === true}" @click="toggleCheckbox(item)">
<v-list-item-content>
<p class="mb-0" v-text="item.label"></p>
</v-list-item-content>
<v-list-item-action>
<v-checkbox :input-value="item.value" color="grey darken-4" large></v-checkbox>
</v-list-item-action>
</v-list-item>
<v-btn block dark depressed large color="grey darken-4" class="mt-6">Next Step</v-btn>
</v-list-item-group>
</v-list>
</v-card-text>
<v-snackbar v-model="screen.bookmark" :timeout="1700" transition="fab-transition" color="grey darken-4" elevation="0" absolute top left tile>
<v-icon>mdi-bookmark-check-outline</v-icon>
</v-snackbar>
<v-expand-transition v-if="screen.id !== 1">
<v-card v-if="screen.reveal" class="transition-fast-in-fast-out v-card--reveal" style="height: 100%;">
<v-card-text>
<v-list class="checklist-menu" flat>
<v-list-item-group class="d-flex flex-column justify-between" multiple>
<v-list-item v-for="item in checklistMenu" :key="item.label" class="pl-0 pr-0 py-2 align-start">
<template v-slot:default="{ active }">
<v-list-item-action class="align-self-start mr-2">
<v-checkbox :input-value="active" color="grey darken-4" large></v-checkbox>
</v-list-item-action>
<v-list-item-content>
<p class="h5 mb-0 d-flex"><strong class="mr-3 grey--text text--darken-1">{{ item.step }}.</strong> {{ item.stepText }}</p>
</v-list-item-content>
</template>
</v-list-item>
</v-list-item-group>
</v-list>
</v-card-text>
</v-card>
</v-expand-transition>
</v-card>
</v-col>
</v-row>
</v-container>
</v-app>
</div>
@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@800&family=Manrope:wght@400&display=swap");
:root {
--font-sans-serif: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI",
Roboto, "Helvetica Neue", Arial, sans-serif;
--font-serif: "Garamond", "Cambria", Georgia, serif;
--font-headline: "Libre Baskerville", serif;
--font-copy: "Manrope", sans-serif;
// Perfect Fourth Type Scale (1.333)
--h1-type-scale: clamp(2.875em, 10vmin, 4.209em);
--h2-type-scale: clamp(2.1em, 6.5vmin, 3.157em);
--h3-type-scale: clamp(1.875em, 4.5vmin, 2.369em);
--h4-type-scale: clamp(1.65em, 3.5vmin, 1.777em);
--h5-type-scale: clamp(1.3em, 2.5vmin, 1.5em);
--h6-type-scale: clamp(1em, 2vmin, 1.125em);
--p-type-scale: clamp(0.75em, 1em, 1.25em);
--content-breakpoint: 50em;
}
html {
overscroll-behavior-y: contain;
}
@font-face {
font-family: "BLOKK";
src: url("//s3-us-west-2.amazonaws.com/s.cdpn.io/97621/BLOKKNeue-Regular.woff2")
format("woff2");
font-weight: normal;
font-style: normal;
}
.mockup-preview {
box-shadow: 6px 2px 20px rgba(0, 0, 0, 0.3);
grid-row: 1 / 1;
grid-column: 1 / 1;
position: fixed;
top: auto;
bottom: 2rem;
right: 2rem;
left: auto;
max-width: 5em;
transition: box-shadow 0.4s ease, opacity 0.4s ease, transform 0.4s ease;
opacity: 0.7;
z-index: 1;
&:hover {
cursor: pointer;
box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.5);
transform: scale(1.1);
opacity: 1;
}
}
.is-focused {
align-items: start;
.container {
display: grid;
align-items: center;
justify-content: center;
grid-template-columns: 1fr;
grid-template-rows: 1fr;
}
.mockup-preview {
grid-row: 1 / 1;
grid-column: 1 / 1;
max-width: 100%;
opacity: 1;
top: 2em;
bottom: auto;
right: auto;
// transition: none;
position: sticky;
z-index: 2;
&:hover {
box-shadow: 10px 10px 40px rgba(0, 0, 0, 0.3);
transform: none;
opacity: 1;
}
}
&::after {
background: rgba(#000, 0.7);
content: "";
position: fixed;
top: 0;
left: 0;
height: 100vh;
width: 100vw;
}
@media (max-width: 900px) {
.screens {
height: 100vh;
overflow: hidden;
}
}
}
html {
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
font-size: 18px;
}
}
body {
font-family: var(--font-serif);
line-height: 1.45;
}
small,
p {
font-family: var(--font-copy);
font-weight: 400;
}
@mixin headline {
color: #111;
font-family: var(--font-headline);
font-weight: 800;
letter-spacing: -0.01em;
line-height: clamp(0.8, 1.1, 1.2);
margin-top: 0;
margin-bottom: 1.5rem;
transition: opacity 0.2s;
-moz-osx-font-smoothing: greyscale;
-webkit-font-smoothing: antialiased;
}
.v-application {
&--wrap {
background-color: #e5e5e5;
justify-content: center;
}
h1,
.h1,
h2,
.h2,
h3,
.h3,
h4,
.h4,
h5,
.h5,
h6,
.h6 {
@include headline;
}
h1,
.h1 {
font-size: var(--h3-type-scale);
// max-width: clamp(12ch, 16ch, 24ch);
}
h2,
.h2 {
font-size: var(--h2-type-scale);
// max-width: clamp(12ch, 16ch, 24ch);
}
h3,
.h3 {
font-size: var(--h3-type-scale);
// max-width: clamp(24ch, 42ch, 56ch);
}
h4,
.h4 {
font-size: var(--h4-type-scale);
// max-width: clamp(24ch, 42ch, 56ch);
}
h5,
.h5,
.small-header {
font-size: var(--h5-type-scale);
// max-width: clamp(24ch, 42ch, 56ch);
}
h6,
.h6 {
font-size: var(--h6-type-scale);
// max-width: clamp(24ch, 42ch, 56ch);
}
p {
font-size: var(--p-type-scale);
// max-width: clamp(32ch, 60ch, 72ch);
+ * {
margin-top: 2rem;
margin-bottom: 0;
}
}
&.slug-css-active {
--font-headline: "BLOKK";
--font-logo: "BLOKK";
> *:not(.toggle-slug-button) {
font-family: "BLOKK";
}
}
}
.col {
@media (max-width: 900px) {
&:last-of-type {
margin-bottom: 0 !important;
}
}
@media (max-width: 375px) {
min-width: 240px;
}
}
.toolbar {
.v-icon.mdi-close-box {
color: #111;
}
flex: 0 1 auto;
.v-toolbar__content {
align-items: center;
justify-content: center;
}
.v-toolbar__title {
}
}
.v-toolbar__content .v-btn.v-btn--icon.v-size--default,
.v-toolbar__extension .v-btn.v-btn--icon.v-size--default.menu-button {
height: auto;
width: auto;
margin-left: 0.45rem;
.icon {
transform: rotateY(-180deg);
}
}
.logo {
display: flex;
justify-content: center;
svg {
max-height: 9.5rem;
width: 100%;
}
}
.app-header {
position: sticky;
top: 0;
z-index: 1;
}
.container {
@media (max-width: 1100px) {
// max-width: 1040px;
}
@media (min-height: 800px) {
padding-top: 2em;
padding-right: 2em;
padding-bottom: 2em;
padding-left: 2em;
}
@media (min-width: 1100px) {
max-width: 1100px;
}
}
.logo {
// width: 40px;
}
.screens {
grid-row: 1 / 1;
grid-column: 1 / 1;
@media (max-height: 500px) {
margin-top: 1rem;
transform-origin: top;
}
@media (max-height: 700px) and (min-width: 1000px) {
transform: scale(.8);
}
}
.screen {
display: grid;
// height: clamp(568px, 568px, 812px);
// width: clamp(320px, 375px, 375px);
height: 640px;
width: 320px;
overflow: hidden;
.v-snack__wrapper {
min-width: inherit;
margin: 0;
}
.v-snack__action {
display: none;
}
}
.v-card > :last-child:not(.v-btn):not(.v-chip) {
// border-radius: inherit !important;
}
.v-card--reveal:last-child:not(.v-btn):not(.v-chip) {
border-top-right-radius: 0;
border-top-left-radius: 0;
box-shadow: 0 -5px 24px 1px rgb(0 0 0 / 10%);
left: 0;
max-height: 90% !important;
z-index: 3;
}
.media {
margin-right: -12px;
margin-left: -12px;
position: relative;
z-index: 0;
}
section {
--content-breakpoint: 72ch;
margin-right: auto;
margin-left: auto;
+ section > .container {
padding-top: clamp(1em, 2vmax, 4em);
padding-bottom: clamp(1em, 2vmax, 4em);
}
}
h2.article-title {
font-size: clamp(0.7rem, 1.5rem, 1.5rem);
font-weight: 700;
margin-bottom: 1rem;
@media (min-width: 900px) {
padding-right: 2rem;
}
}
.screen-one {
.media {
// padding-top: 1rem;
}
}
.screen-two {
.media {
margin-bottom: 1rem;
}
.v-responsive__sizer {
padding-bottom: 90% !important;
}
@media (min-width: 900px) {
h2.article-title {
padding-right: 3rem;
}
}
}
.screen-icon {
font-size: 50px !important;
}
.screen-three {
.media {
display: grid;
grid-template-columns: 2rem 1fr 1rem;
grid-template-rows: auto 2rem auto;
padding-top: 1rem;
}
h2.article-title {
color: #fff;
grid-column: 2/2;
grid-row: 2/2;
z-index: 1;
}
.v-image {
grid-column: 1/4;
grid-row: 1/4;
}
}
.v-card {
&--reveal {
bottom: 0;
opacity: 1 !important;
position: absolute;
width: 100%;
}
}
.v-card__text {
overflow-y: overlay;
@media (max-width: 400px) {
position: relative;
}
}
.checklist {
p {
color: #0009 !important;
line-height: 1.6;
padding-right: 1rem;
}
.v-input--selection-controls.v-input {
background: #212121 !important;
border-radius: 5px;
padding: 0.6rem;
.v-input__control {
background: #fff;
}
.v-input--selection-controls__input {
height: 15px;
width: 15px;
}
}
.v-item--active {
.v-input--selection-controls.v-input {
background: transparent !important;
}
}
}
body {
counter-reset: checked-sum;
}
.checklist-menu {
.v-list-item {
border-bottom: 1px solid #EEE;
counter-increment: checked-sum;
p {
font-size: .9rem;
}
&::before {
// display: block;
// content: counter(checked-sum);
height: 14px;
width: 14px;
}
}
}
.v-card-reveal {
overflow-y: auto;
}
new Vue({
el: '#app',
vuetify: new Vuetify(),
data: () => ({
colorThemeActive: false,
mockupIsVisible: false,
drawer: false,
group: null,
bookmarkText: 'Bookmarked!',
screens: [
{
id: 1,
screenClass: 'screen-one',
title: 'Step-by-step Guide to Become a Minimalist',
textClass: 'mt-6 pb-0',
authorName: 'by Marie Kondo',
logo: true,
srcUrl: 'https://assets.codepen.io/97621/media-cover-01.svg',
},
{
id: 2,
screenClass: 'screen-two',
title: 'Set Your Rules for Minimalisim',
textClass: 'mt-n3 pb-0',
copy: 'Minimalism is different for everyone. Some people define their minimalist lifestyle by only owning a certain number of items.',
icon: 'mdi-play-circle',
toolbar: true,
stepNumber: '1',
srcUrl: 'https://assets.codepen.io/97621/media-square-dot-grid.svg',
reveal: false,
bookmark: false,
},
{
id: 3,
screenClass: 'screen-three',
title: 'To Do',
textClass: 'mt-n6 py-0',
checklist: [
{
label: "Pick out anything you haven't worn in a year and donate or sell.'",
value: true,
},
{
label: "Sell or donate anything that doesn't fit",
value: true,
}
],
toolbar: true,
stepNumber: '1',
srcUrl: 'https://assets.codepen.io/97621/media-cover-03.svg',
reveal: false,
bookmark: false,
}
],
checklistMenu: [
{
step: 1,
stepText: 'Set Your Rules for Minimalisim',
},
{
step: 2,
stepText: 'Start With a Clean Slate',
},
{
step: 3,
stepText: 'Use It or Lose It',
},
{
step: 4,
stepText: 'Organize Items by Category',
},
{
step: 5,
stepText: 'Ask Yourself the Hard Questions',
},
{
step: 6,
stepText: 'Combine Uses',
},
{
step: 7,
stepText: 'Minimize Space',
},
{
step: 8,
stepText: 'Bring In Less',
}
]
}),
methods: {
togglePreview() {
this.mockupIsVisible = !this.mockupIsVisible;
},
togglePanel(screen) {
screen.reveal = !screen.reveal;
},
bookmarkNotice(screen) {
screen.bookmark = !screen.bookmark
},
toggleCheckbox(screen) {
screen.value = !screen.value
},
}
})
Also see: Tab Triggers