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.
<main>
<h1>Types of CSS Artists</h1>
<h2>Recognize the CSS artist by their style!</h2>
<article>
<abstract>
<base></base>
<circle></circle>
<circle></circle>
<line></line>
<line></line>
<dot></dot>
<box></box>
<shape></shape>
</abstract>
<h2>CantDivsky</h2>
<p>The art and the code (all custom elements) look cool and all... but it is a bit tough to read and follow.</p>
</article>
<article>
<section role="img" aria-label="Copy of Andy Warhol's Can of Campbell's Soup painting done in HTML and CSS">
<div class="base"></div>
<div class="can"></div>
<div class="campbells">
<span>C</span><span>a</span><span>m</span><span>p</span><span>b</span><span>e</span><span>l</span><span>l</span><span>s</span>
</div>
<div class="condensed">
<span>C</span><span>O</span><span>N</span><span>D</span><span>E</span><span>N</span><span>S</span><span>E</span><span>D</span>
</div>
<div class="type">
<span>F</span><span>L</span><span>E</span><span>X</span>
<span>G</span><span>R</span><span>I</span><span>D</span>
</div>
<div class="soup">
<span>S</span><span>O</span><span>U</span><span>P</span>
</div>
<div class="shield"></div>
<div class="top">
<div class="top-lid"></div>
</div>
<div class="lis lis-1"></div>
<div class="lis lis-2"></div>
<div class="lis lis-3"></div>
<div class="lis lis-4"></div>
<div class="lis lis-5"></div>
<div class="lis lis-6"></div>
</section>
<h2>Andiv Warhol</h2>
<p>Soup... I mean... DIVs!<br/>DIVs everywhere!!</p>
</article>
<article>
<main role="img" aria-label="Replica of a Mondrian, done in CSS using grid">
<section class="blue"></section>
<section class="white"></section>
<section class="orange"></section>
<section class="blue"></section>
<section class="white"></section>
<section class="red"></section>
<section class="orange"></section>
<section class="blue"></section>
<section class="white"></section>
<section class="white"></section>
<section class="black"></section>
<section class="gray"></section>
<section class="white"></section>
<section class="orange"></section>
<section class="gray"></section>
<section class="navy"></section>
<section class="red"></section>
<section class="white"></section>
<section class="black"></section>
<section class="white"></section>
</main>
<h2><main>drian</h2>
<p>Semantic tags everywhere. Even for abstract art!</p>
</article>
<article>
<section role="img" aria-label="Cartoon done in CSS imitating Roy Lichtenstein's painting 'I Can See the Whole Room...and There's Nobody in It!', with a man looking through a hole with a lid. The text has been changed to 'I can see the whole code! ...and there's no good in it!">
<div class="hole">
<div class="neck"></div>
<div class="face"></div>
<div class="face-lines"></div>
<div class="cheek"></div>
<div class="lip-top"></div>
<div class="lip-bottom"></div>
<div class="nostril"></div>
<div class="nose"></div>
<div class="hand"></div>
<div class="lip"></div>
<div class="lip"></div>
<div class="teeth"></div>
<div class="eye"></div>
<div class="eyebrow"></div>
<div class="eyebrow"></div>
</div>
<div class="lid"></div>
<div class="hole">
<div class="finger finger-middle"></div>
<div class="finger finger-tip"></div>
<div class="finger finger-bottom"></div>
<div class="finger finger-top"></div>
<div class="finger-lines"></div>
</div>
<div class="bubble bubble-1"></div>
<div class="text">
I can see the whole code!<br/>
<b> ...And there's no good<br/> in it!</b>
</div>
</section>
<h2>LCHtenstein</h2>
<p>They use the latest CSS features: filters, transforms, colors... LCH and OKLab are their best friends.</p>
</article>
<article>
<section role="img" aria-label="Imitation of Juan Gris painting Guitar on a Table drawn in HTML and CSS">
<div class="table-0"></div>
<div class="guitar-1"></div>
<div class="table-1"></div>
<div class="guitar-0"></div>
</section>
<h2>Juan Grid</h2>
<p>Grid artists are so skilled with clip-path that their art may look like a Clipasso.</p>
</article>
</main>
@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&family=PT+Sans:wght@700&family=Pinyon+Script&family=Rye&display=swap');
body {
display: grid;
place-items: center;
margin: 0;
min-height: 100vh;
font-family: Helvetica, Arial, sans-serif;
}
main {
--w: 100vmin;
width: var(--w);
aspect-ratio: 1.3;
position: relative;
}
h1 {
left: 50%;
top: 1%;
transform: translate(-50%, 0);
position: absolute;
font-weight: 700;
font-size: 5vmin;
font-family: PT Sans, Lato, Helvetica, sans-serif;
}
h1 + h2 {
position: absolute;
left: 50%;
top: 11%;
transform: translate(-50%, 0);
white-space: pre;
font-weight: 300;
font-size: 2.75vmin;
}
article {
--s: calc(var(--w) / 4);
width: var(--s);
min-height: 30vmin;
position: absolute;
}
article:nth-of-type(1) {
left: -5%;
top: -5%;
}
article:nth-of-type(2) {
right: -5%;
top: -3%;
}
article:nth-of-type(3) {
left: 2%;
bottom: -1%;
}
article:nth-of-type(4) {
left: 50%;
top: 30%;
transform: translateX(-50%);
}
article:nth-of-type(5) {
right: 4%;
bottom: -1%;
}
h2 {
font-weight: 400;
font-size: 3vmin;
margin: 0;
height: 6vmin;
line-height: 7vmin;
}
p {
font-size: 2vmin;
font-family: Helvetica, Arial, sans-serif;
font-weight: 300;
margin: 0;
line-height: 2.75vmin;
}
/* general */
section div,
section div::before,
section div::after {
position: absolute;
display: block;
box-sizing: border-box;
}
main main,
section {
overflow: hidden;
width: var(--s);
aspect-ratio: 1;
position: relative;
font-family: 'Comic Neue', Helvetica, Arial, sans-serif;
color: #000;
color: lch(0% 0 0);
box-shadow: 0 calc(0.0125 * var(--s)) calc(0.075 * var(--s)) calc(-0.025 * var(--s));
background: currentColor;
}
/* Roy Lichtenstein */
.bubble {
width: 25%;
height: 20%;
color: #fff;
color: lch(100% 0 0);
background: currentColor;
border-radius: 50%;
right: -3%;
top: -9%;
}
.bubble::before {
content: "";
width: 340%;
height: 200%;
background: currentColor;
border-radius: 50% 50% 50% 60%;
transform: translate(-92%, -34%) rotate(12deg)
}
.bubble::after {
content: "";
width: 135%;
height: 115%;
background: currentColor;
border-radius: 100% 60% 120% 100% / 100% 40% 170% 90%;
transform: translate(-236%, 50%) rotate(50deg);
}
.text {
font-size: calc(0.070625 * var(--s));
line-height: calc(0.078125 * var(--s));
letter-spacing: calc(-0.001875 * var(--s));
text-transform: uppercase;
}
.text b {
font-style: italic;
}
.hole {
width: 50%;
height: 50%;
border-radius: 50%;
top: 50%;
left: 48.5%;
transform: translate(-50%, -50%);
box-shadow:
calc(0.00625 * var(--s)) calc(0.00625 * var(--s)),
calc(0.0125 * var(--s)) calc(0.0125 * var(--s)) #fff,
calc(-0.090625 * var(--s)) calc(-0.2875 * var(--s)) 0 calc(-0.15 * var(--s)),
calc(-0.15 * var(--s)) calc(-0.275 * var(--s)) 0 calc(-0.1875 * var(--s)) #fff;
/* box-shadow:
calc(0.00625 * var(--s)) calc(0.00625 * var(--s)),
calc(0.0125 * var(--s)) calc(0.0125 * var(--s)) lch(100% 0 0),
calc(-0.090625 * var(--s)) calc(-0.2875 * var(--s)) 0 calc(-0.15 * var(--s)),
calc(-0.15 * var(--s)) calc(-0.275 * var(--s)) 0 calc(-0.1875 * var(--s)) lch(100% 0 0); */
overflow: hidden;
background-color: #fdff3b;
background-color: lch(98% 86 101);
}
.hole ~ .hole {
background: none;
box-shadow: none;
}
.lid {
width: 50%;
height: 50%;
border-radius: 50%;
background: currentColor;
top: 26.5%;
left: 75.25%;
transform: translate(-50%, -50%);
box-shadow:
calc(0.00625 * var(--s)) calc(0.0015625 * var(--s)) #fff,
inset calc(0.00625 * var(--s)) 0,
inset calc(0.01125 * var(--s)) 0 0 calc(-0.0025 * var(--s)) #fff;
/* box-shadow:
calc(0.00625 * var(--s)) calc(0.0015625 * var(--s)) lch(100% 0 0),
inset calc(0.00625 * var(--s)) 0,
inset calc(0.01125 * var(--s)) 0 0 calc(-0.0025 * var(--s)) lch(100% 0 0); */
}
.lid::before {
content: "";
width: calc(0.059375 * var(--s));
aspect-ratio: 1;
background: radial-gradient(circle at 45% 50%, currentColor 17%, #fff 0 20%, currentColor 0);
background: radial-gradient(circle at 45% 50%, currentColor 17%, lch(100% 0 0) 0 20%, currentColor 0);
border-radius: 50%;
top: 37%;
left: -8%;
box-shadow:
calc(-0.0015625 * var(--s)) calc(0.0009375 * var(--s)) #fff,
calc(-0.00625 * var(--s)) calc(0.003125 * var(--s));
/* box-shadow:
calc(-0.0015625 * var(--s)) calc(0.0009375 * var(--s)) lch(100% 0 0),
calc(-0.00625 * var(--s)) calc(0.003125 * var(--s)); */
}
.face {
width: 130%;
height: 100%;
transform: rotate(-52deg) skew(-60deg);
border-radius: 10%;
border: calc(0.0125 * var(--s)) solid;
border-bottom-width: calc(0.0075 * var(--s));
left: -39.5%;
top: -17%;
background: linear-gradient(70deg, transparent 70%, #ffe 70.25%);
background: linear-gradient(70deg, transparent 70%, lch(99% 8 104) 70.25%);
background-color: #fdc;
background-color: lch(90% 16 51);
box-shadow: inset calc(-0.075 * var(--s)) calc(-0.0125 * var(--s)) #ffe;
/* box-shadow: inset calc(-0.075 * var(--s)) calc(-0.0125 * var(--s)) lch(99% 8 104); */
}
.face-lines {
width: 9%;
height: 6%;
left: 39.5%;
top: 21.5%;
background:
radial-gradient(80% 100% at 0% 100%, transparent 85%, currentColor 0 95%, transparent 0),
radial-gradient(105% 100% at 10% 100%, transparent 85%, currentColor 0 95%, transparent 0);
}
.face-lines::before {
content: "";
width: 85%;
height: 200%;
background:
radial-gradient(120% 100% at -10% 110%, transparent 88%, currentColor 0 95%, transparent 0),
radial-gradient(120% 100% at -10% 120%, transparent 88%, currentColor 0 95%, transparent 0),
radial-gradient(120% 100% at -10% 129%, transparent 89%, currentColor 0 95%, transparent 0),
radial-gradient(117% 100% at -10% 138%, transparent 88%, currentColor 0 95%, transparent 0)
;
top: 120%;
left: 10%;
transform: rotate(20deg);
}
.face-lines::after {
content: "";
width: 140%;
height: 250%;
background:
/* 99.9% because Safari */
radial-gradient(103% 98% at 0% -5%, transparent 88%, currentColor 0 94%, transparent 0 96%, currentColor 0 99.9%, transparent 0),
radial-gradient(120% 100% at 0% 0%, transparent 88%, currentColor 0 95%, transparent 0)
;
top: 10%;
left: 70%;
}
.neck {
width: 100%;
height: 200%;
border: calc(0.0075 * var(--s)) solid;
border-radius: 50%;
top: -49%;
left: 44.5%;
box-shadow: calc(-0.125 * var(--s)) 0 #ffe;
/* box-shadow: calc(-0.125 * var(--s)) 0 lch(99% 8 104); */
}
.cheek {
width: 10%;
height: 15%;
border-radius: 0 0 70% 0;
border: calc(0.005 * var(--s)) solid;
border-left: 0;
border-top: 0;
transform: rotate(-42deg);
top: 60%;
left: 34%;
}
.lip-top {
width: 1%;
height: 4%;
background: currentColor;
top: 57.25%;
left: 22.75%;
border-radius: 0 100% 100% 0 / 0 40% 50% 0;
}
.lip-bottom {
width: 8%;
height: 1%;
background: currentColor;
top: 77%;
left: 20%;
transform: rotate(4deg);
border-radius: 100% 50% 0 0;
}
.lip-bottom::before,
.lip-bottom::after {
content: "";
width: 110%;
height: 350%;
border: calc(0.0015625 * var(--s)) solid transparent;
border-bottom: calc(0.00625 * var(--s)) solid;
border-radius: 0 0 50% 40%;
left: 85%;
transform: translate(0, -62%) rotate(-1deg);
}
.lip-bottom::after {
left: 0;
width: 130%;
border-right: calc(0.004125 * var(--s)) solid transparent;
transform: translate(-85%, -54%) rotate(3deg);
}
.nostril {
width: 5.5%;
height: 7.5%;
border-radius: 100% 100% 0 0 / 60% 60% 0 0; /* could be simplified to 100% / 60%... but Safari */
top: 53.5%;
left: 25%;
border-top: calc(0.0075 * var(--s)) solid currentColor;
transform: rotate(0deg); /* this used to be 4deg... but Safari :( */
}
.nostril::before {
content: "";
width: 120%;
height: 90%;
border-radius: 0 0 0 40%;
border: calc(0.004125 * var(--s)) solid;
border-top: 0;
border-right: 0;
top: -105%;
left: -170%;
transform-origin: top left;
transform: rotate(18deg) skew(10deg);
background: radial-gradient(100% 27% at 49% 100%, currentColor 50%, transparent 0);
clip-path: polygon(0% 1%, 100% 1%, 100% 100%, 0% 100%); /* Safari!! */
}
.nose {
width: 3%;
height: 30%;
background: currentColor;
border-radius: 0 100%;
top: 20.5%;
left: 19.75%;
transform: rotate(5deg);
}
.nose::before {
content: "";
width: 30%;
height: 30%;
background: currentColor;
top: -15%;
border-radius: 100% 0 20% 0;
}
.hand {
width: 45%;
height: 50%;
border: calc(0.005 * var(--s)) solid;
border-radius: 100% 140% 100% 100% / 40% 120% 0 100%;
top: 69%;
left: 52%;
transform: rotate(3deg) skew(-3deg);
background-color: #fdc;
background-color: lch(90% 16 51);
}
.hand::before {
content: "";
height: 20%;
width: 40%;
border-top: calc(0.0035 * var(--s)) solid;
border-bottom: calc(0.005 * var(--s)) solid;
left: 48%;
top: 28%;
transform: rotate(15deg);
background: radial-gradient(200% 40% at 40% 0, currentColor 15%, transparent 0);
}
.hand::after {
content: "";
width: 30%;
height: 20%;
border: calc(0.005 * var(--s)) solid transparent;
border-bottom-color: currentColor;
border-radius: 50%;
transform: rotate(-20deg);
top: 12%;
left: 26%;
}
.lip {
width: 21%;
height: 5.25%;
border: calc(0.00625 * var(--s)) solid;
background: #fff;
background: lch(100% 0 0);
border-radius: 100% 10% 80% 33.3%;
transform: rotate(7deg);
left: 7%;
top: 67%;
}
.lip + .lip {
transform: rotate(-5deg) scaleX(-1);
left: 18.5%;
top: 67.25%;
}
.lip::before,
.lip::after {
content: "";
border-radius: 50%;
width: 50%;
height: 50%;
background: #fff;
background: lch(100% 0 0);
right: 0;
transform: rotate(3deg)
}
.lip::after {
right: -13%;
height: 60%;
width: 55%;
background: #fff;
background: lch(100% 0 0);
transform: rotate(-14deg);
top: -10%;
}
.teeth {
width: 12%;
height: 2.5%;
background: #fff;
background: lch(100% 0 0);
border-radius: 100% / 30%;
top: 68.85%;
left: 17%;
transform: rotate(1.5deg);
}
.eye {
top: 15.25%;
left: 40%;
height: 5.5%;
width: 8%;
border-top: calc(0.005 * var(--s)) solid;
border-bottom: calc(0.003125 * var(--s)) solid;
background:
radial-gradient(circle at 50% 40%, currentColor 16%, transparent 0),
radial-gradient(90% 170% at 50% 50%, transparent 0 38%, currentColor 0 47%, transparent 0),
radial-gradient(at 100% 100%, #ffe 50%, transparent 0),
radial-gradient(90% 170% at 50% 50%, #def 0 38%, currentColor 0 47%, transparent 0);
background:
radial-gradient(circle at 50% 40%, currentColor 16%, transparent 0),
radial-gradient(90% 170% at 50% 50%, transparent 0 38%, currentColor 0 47%, transparent 0),
radial-gradient(at 100% 100%, lch(99% 8 104) 50%, transparent 0),
radial-gradient(90% 170% at 50% 50%, lch(93% 10 252) 0 38%, currentColor 0 47%, transparent 0);
}
.eye::before {
content: "";
width: 60%;
top: -34%;
left: 5%;
height: 20%;
background: currentColor;
transform-origin: 0% 50%;
transform: rotate(140deg);
}
.eye::after {
content: "";
width: 80%;
top: -60%;
left: 95%;
height: 55%;
border: calc(0.00375 * var(--s)) solid transparent;
border-bottom: calc(0.005 * var(--s)) solid;
transform-origin: 0% 50%;
transform: rotate(40deg);
border-radius: 0 0 50% 50%;
}
.eyebrow {
width: 22%;
height: 3.33%;
background: currentColor;
top: 11%;
left: 30%;
transform: rotate(-14deg);
border-radius: 30% 0 100% 50%;
}
.eyebrow::before {
content: "";
width: 30%;
height: 80%;
left: 100%;
background: currentColor;
transform-origin: 0% 0%;
transform: rotate(40deg);
border-radius: 0 30% 140% 0;
}
.eyebrow::after {
content: "";
background: currentColor;
width: 15%;
height: 40%;
transform-origin: 100% 0;
transform: translate(-90%, 30%) rotate(-20deg);
border-radius: 100% 0 0 50%;
}
.eyebrow + .eyebrow {
left: -5.5%;
top: 15%;
transform: rotate(-15deg)
}
.eyebrow + .eyebrow::before {
height: 65%;
border-radius: 0 130% 20% 0;
}
.eyebrow + .eyebrow::after {
left: 75%;
transform: rotate(70deg);
border-radius: 100% 0;
top: 135%;
}
.finger,
.finger::before,
.finger::after {
background-color: #fdc;
background-color: lch(90% 16 51);
}
.finger-tip {
width: 17%;
height: 11.5%;
border: calc(0.005 * var(--s)) solid;
top: 44.5%;
right: 6.5%;
transform-origin: 100% 0%;
transform: rotate(-33deg);
border-radius: 100% 30% 100% 80% / 20% 70% 140% 20%;
border-left: 0;
overflow: hidden;
}
.finger-tip::before {
content: "";
border: calc(0.005 * var(--s)) solid;
width: 70%;
height: 70%;
border-radius: 20% 0 100% 40%;
transform: skew(-10deg);
top: -15%;
left: 30%;
}
.finger-middle {
width:30%;
height: 12%;
border-radius: 50%;
border: calc(0.005 * var(--s)) solid transparent;
border-bottom: calc(0.005 * var(--s)) solid;
transform: rotate(-54deg);
top: 61%;
left: 62%;
}
.finger-middle::before {
content: "";
width: 75%;
height: 80%;
border: calc(0.005 * var(--s)) solid transparent;
border-bottom: calc(0.005 * var(--s)) solid;
border-left: calc(0.0075 * var(--s)) solid transparent;
border-radius: 50%;
transform: rotate(-18deg);
left: -60%;
top: 45%;
background:
}
.finger-bottom {
width: 20%;
height: 25%;
border-top: calc(0.0075 * var(--s)) solid;
border-left: calc(0.005 * var(--s)) solid;
bottom: -1%;
left: 50%;
border-radius: 50% 0;
transform: skewY(-50deg) rotate(-30deg);
}
.finger-top {
width: 25%;
height: 9%;
background: radial-gradient(100% 10% at 50% 0, currentColor 80%, #fdc 0);
background: radial-gradient(100% 10% at 50% 0, currentColor 80%, lch(90% 16 51) 0);
top: 60.75%;
left: 61.75%;
transform: rotate(-43deg);
}
.finger-lines {
width: 5%;
height: 5%;
top: 53.25%;
left: 79%;
background:
radial-gradient(100% 150% at 100% 100%, transparent 80%, currentColor 0 93%, transparent 0),
radial-gradient(100% 200% at 100% 110%, transparent 60%, currentColor 0 73%, transparent 0)
;
transform: rotate(-23deg);
}
.finger-lines::before {
content: "";
width: 155%;
height: 140%;
background:
radial-gradient(100% 150% at 100% 100%, transparent 86%, currentColor 0 97%, transparent 0),
radial-gradient(100% 170% at 100% 110%, transparent 66%, currentColor 0 75%, transparent 0),
radial-gradient(90% 180% at 105% 100%, transparent 50%, currentColor 0 59%, transparent 0)
;
transform: rotate(-18deg);
top: 145%;
left: -430%;
}
/* Piet Mondrian */
main main {
--g: calc(var(--s) * 0.01875);
--blue: #8cb7d4;
--white: #fff;
--black: #000;
--red: #e50000;
--gray: #9cabb5;
--orange: #ff9400;
--navy: #00183a;
background: black;
display: grid;
gap: var(--g);
grid-template-columns: 11.8fr 11fr 11fr 23.6fr 14fr 14fr 5.3fr;
grid-template-rows: 10.8fr 23.6fr 23.6fr 11fr 11fr 5.3fr 1.3fr;
width: var(--s);
aspect-ratio: 1;
box-sizing: border-box;
box-shadow: 0 calc(0.0125 * var(--s)) calc(0.075 * var(--s)) calc(-0.025 * var(--s));
}
main main section {
width: 100%;
height: 100%;
min-height: 1vmin;
}
section.blue { background: var(--blue); }
section.white { background: var(--white); }
section.black { background: var(--black); }
section.red { background: var(--red); }
section.gray { background: var(--gray); }
section.orange { background: var(--orange); }
section.navy { background: var(--navy); }
main main section:nth-child(1) {
grid-row: 1;
grid-column: 1 / 3;
}
main main section:nth-child(2) {
grid-column: 3 / 5;
}
main main section:nth-child(3) {
grid-column: 5 / 7;
}
main main section:nth-child(4) {
grid-row: 1 / 5;
}
main main section:nth-child(6) {
grid-row: 2 / 4;
grid-column: 2 / 5;
}
main main section:nth-child(7) {
grid-row: 2;
grid-column: 5 / 7;
}
main main section:nth-child(8) {
grid-row: 3 / 5;
}
main main section:nth-child(11) {
grid-row: 4 / 6;
grid-column: 2 / 4;
}
main main section:nth-child(13) {
grid-column: 5 / 7;
}
main main section:nth-child(14) {
grid-row: 5 / 8
}
main main section:nth-child(16) {
grid-row: 5 / 7;
grid-column: 5 / 7;
}
main main section:nth-child(17) {
grid-column: 7;
grid-row: 5 / 8;
}
main main section:nth-child(18) {
grid-row: 6 / 8;
grid-column: 2 / 4;
}
main main section:nth-child(20) {
grid-column: 4 / 7;
}
/* Kandinsky */
abstract {
display: block;
box-sizing: border-box;
width: var(--s);
aspect-ratio: 1;
background: #016b47;
position: relative;
box-shadow: 0 calc(0.0125 * var(--s)) calc(0.075 * var(--s)) calc(-0.025 * var(--s));
}
abstract * {
position: absolute;
display: block;
box-sizing: border-box;
}
base {
width: 100%;
height: 100%;
background: linear-gradient(90deg, #e5dfb3 48%, #010 0);
clip-path: polygon(35% 90.48%, 35% 75.50%, 48% 65.77%, 58.31% 72.50%, 51.70% 72.50%, 51.70% 75.21%, 61.43% 75.21%, 61.43% 79.85%, 50.71% 79.85%, 50.71% 84.09%, 59.23% 84.09%, 59.23% 90.48%);
}
dot {
width: 2.5%;
aspect-ratio: 1;
background: #000;
box-shadow: 0 0 calc(var(--s) * 0.02) #0005;
border-radius: 50%;
top: 30.75%;
left: 55.5%;
}
circle {
width: 47.5%;
aspect-ratio: 1;
background: #f004;
border-radius: 50%;
bottom: 34.23%;
left: 48%;
transform: translateX(-50%);
clip-path: polygon(42% 0, 100% 0, 100% 100%, 42% 100%);
background: conic-gradient(#a1b99c 25%, #bc9484 0 50%, #9a3f1a 0 75%, #e5dfb3 0)
}
circle + circle {
clip-path: polygon(0 0, 32.25% 0, 32.25% 100%, 0% 100%);
left: 56.5%;
bottom: 44.5%;
background: #dea160;
mix-blend-mode: hard-light;
}
line {
right: 52%;
top: 60%;
height: 2.1%;
width: 13%;
background: #a33320;
mix-blend-mode: multiply;
}
line + line {
width: 18.5%;
height: 0.7%;
top: 57%;
background: #1c7d16;
mix-blend-mode: difference;
}
box {
width: 3%;
height: 5%;
background: #74695f;
bottom: 4.5%;
left: 20.5%;
}
shape {
top: 3%;
left: 73%;
width: 7%;
height: 17%;
border-left: calc(var(--s) * 0.01) solid #000;
border-bottom: calc(var(--s) * 0.01) solid #000;
background: linear-gradient(#000 0 0) 0 43% / 75% 12% no-repeat
}
shape::before {
content: "";
display: block;
position: absolute;
top: 25%;
height: 4%;
width: 120%;
background: #e5dfb3;
}
/* Andy Warhol */
article:nth-of-type(2) section {
--red: #d90000;
--white: #fffaf8;
--gold: #b99e4d;
--black: #000;
--silver: #a29ea5;
background: var(--white);
}
.can {
width: 53.5%;
height: 87%;
background-color: var(--red);
top: 50%;
left: 49.875%;
transform: translate(-50%, -50%);
border-radius: 170% / 10% 10% 35% 35%;
border: calc(var(--s) * 0.005) solid;
box-shadow:
inset 0 calc(var(--s) * -0.01875) var(--white),
inset 0 calc(var(--s) * -0.025) var(--red),
inset 0 calc(var(--s) * -0.5) 0 calc(var(--s) * -0.11875) var(--white),
inset calc(var(--s) * -0.0125) calc(var(--s) * -1.13125) 0 calc(var(--s) * -0.375) var(--red),
inset 0 calc(var(--s) * -1.25) 0 calc(var(--s) * -0.4875) var(--gold),
inset calc(var(--s) * -0.025) calc(var(--s) * -1.25) 0 calc(var(--s) * -0.4875) var(--gold);
}
.condensed {
top: 41%;
left: 50%;
transform: translate(-50%, -50%);
color: var(--white);
font-family: Lato, Helvetica, sans-serif;
letter-spacing: calc(var(--s) * 0.01125);
font-size: calc(var(--s) * 0.034375);
}
.condensed span {
display: inline-block;
position: relative;
}
.condensed span:nth-child(1) { transform: translateY(calc(var(--s) * -0.00125)) skewY(15deg); }
.condensed span:nth-child(2) { transform: translateY(calc(var(--s) * 0.00625)) skewY(12deg); }
.condensed span:nth-child(8) { transform: translateY(calc(var(--s) * 0.00625)) skewY(-12deg); }
.condensed span:nth-child(3) { transform: translateY(calc(var(--s) * 0.01125)) skewY(9deg); }
.condensed span:nth-child(7) { transform: translateY(calc(var(--s) * 0.01125)) skewY(-9deg); }
.condensed span:nth-child(4) { transform: translateY(calc(var(--s) * 0.01375)) skewY(3deg); }
.condensed span:nth-child(5) { transform: translateY(calc(var(--s) * 0.015)); }
.condensed span:nth-child(6) { transform: translateY(calc(var(--s) * 0.01375)) skewY(-3deg); }
.condensed span:nth-child(9) { transform: translateY(calc(var(--s) * -0.00125)) skewY(-15deg); }
.type {
top: 69.5%;
left: 50%;
transform: translate(-50%, -50%);
color: var(--red);
font-family: Lato, Helvetica, sans-serif;
letter-spacing: calc(var(--s) * -0.00125);
font-size: calc(var(--s) * 0.08125);
font-weight: bold;
}
.type span {
display: inline-block;
position: relative;
}
.type span:nth-of-type(1) { transform: skewY(15deg) }
.type span:nth-of-type(2) { transform: translateY(calc(var(--s) * 0.00875)) skewY(12deg) }
.type span:nth-of-type(3) { transform: translateY(calc(var(--s) * 0.01625)) skewY(9deg) }
.type span:nth-of-type(4) { transform: translateY(calc(var(--s) * 0.02125)) skewY(3deg) }
.type span:nth-of-type(8) { transform: skewY(-15deg) }
.type span:nth-of-type(7) { transform: translateY(calc(var(--s) * 0.01)) skewY(-12deg) }
.type span:nth-of-type(6) { transform: translateY(calc(var(--s) * 0.01625)) skewY(-9deg) }
.type span:nth-of-type(5) { transform: translateY(calc(var(--s) * 0.02125)) skewY(-3deg) }
.soup {
font-family: Rye, serif;
top: 80%;
left: 50%;
transform: translate(-50%);
font-size: calc(var(--s) * 0.09375);
letter-spacing: calc(var(--s) * 0.0125);
}
.soup span {
display: inline-block;
position: relative;
font-weight: 500;
}
.soup span:nth-child(1) { transform: translateY(calc(var(--s) * -0.0075)) skewY(9deg); }
.soup span:nth-child(2) { transform: translateY(calc(var(--s) * -0.00125)) skewY(-3deg) rotate(-35deg); }
.soup span:nth-child(3) { transform: translateY(calc(var(--s) * 0.0025)) skewY(-3deg); }
.soup span:nth-child(4) { transform: translateY(calc(var(--s) * -0.0075)) skewY(-9deg); }
.campbells {
top: 20%;
left: 50%;
transform: translate(-50%, 0%);
font-family: 'Pinyon Script', Rye, script;
font-size: calc(var(--s) * 0.1375);
font-weight: bold;
color: var(--white);
text-shadow: calc(var(--s) * 0.00625) calc(var(--s) * 0.00125) var(--black);
letter-spacing: calc(var(--s) * -0.00125);
}
.campbells span {
display: inline-block;
position: relative;
}
.campbells span:nth-child(1) { transform: translateY(calc(var(--s) * -0.0125)) skewY(6deg); }
.campbells span:nth-child(2) { transform: translateY(calc(var(--s) * 0.00125)) skewY(5deg); }
.campbells span:nth-child(3) { transform: translateY(calc(var(--s) * 0.0075)) skewY(4deg); }
.campbells span:nth-child(4) { transform: translateY(calc(var(--s) * 0.01)) skewY(3deg); }
.campbells span:nth-child(5) { transform: translateY(calc(var(--s) * 0.01375)) skewY(0deg); }
.campbells span:nth-child(6) { transform: translateY(calc(var(--s) * 0.01)) skewY(-3deg); }
.campbells span:nth-child(7) { transform: translateY(calc(var(--s) * 0.00625)) skewY(-4deg); }
.campbells span:nth-child(8) { transform: translateY(calc(var(--s) * 0.00125)) skewY(-5deg); }
.campbells span:nth-child(9) { transform: translateY(calc(var(--s) * -0.00875)) skewY(-6deg) rotate(-10deg); }
.shield {
width: 16%;
aspect-ratio: 1;
border-radius: 50%;
background: var(--gold);
top: 53.5%;
left: 49.5%;
transform: translate(-50%, -50%);
}
.base {
width: 54.5%;
height: 20%;
background:
radial-gradient(75% 110% at 50% 0%, var(--silver) 85%, #0000 85.1%),
radial-gradient(75% 110% at 13% 67%, var(--black) 10%, #0000 10.1%),
radial-gradient(65% 110% at 16% 69%, var(--black) 10%, var(--silver) 10.1% 11%, #0000 0),
radial-gradient(75% 110% at 18% 74%, var(--black) 10%, #0000 10.1%),
radial-gradient(115% 110% at 78% 74%, var(--black) 10%, #0000 10.1%),
radial-gradient(145% 100% at 80% 70%, var(--black) 10%, #0000 10.1%)
;
background-color: var(--silver);
top: 76%;
left: 49.875%;
transform: translateX(-50%);
border-radius: 100%;
border: calc(var(--s) * 0.005) solid;
}
.top {
width: 54.5%;
height: 10%;
background-color: var(--silver);
top: 4%;
left: 49.875%;
transform: translateX(-50%);
border-radius: 110% 100% / 89% 80% 100% 100%;
border: calc(var(--s) * 0.005) solid;
box-shadow:
inset 0 calc(var(--s) * -0.01) var(--silver),
inset 0 calc(var(--s) * -0.01375) var(--black)
}
.top-lid {
width: 97%;
height: 62%;
left: 2%;
top: 8%;
background:
radial-gradient(130% 190% at 50% 100%, #0000 20%, var(--black) 20.1% 22%, #0000 22.1% 28%, var(--black) 28.1% 34%, #0000 34.1% 41.9%, var(--black) 42.1% 45%, #0000 45.1%)
;
border-radius: 50%;
box-shadow:
inset 0 calc(var(--s) * -0.004375),
inset calc(var(--s) * 0.025) calc(var(--s) * -0.00125);
transform: rotate(-1deg);
}
.lis {
width: 3.75%;
aspect-ratio:1;
background:
conic-gradient(from 0.985turn at 50% 120%, var(--gold) 0.03turn, #0000 0) 50% 0% / 90% 90%,
linear-gradient(var(--gold) 0 0) 50% 60% / 60% 8%
;
background-repeat: no-repeat;
border-radius: 100% / 120% 120% 80% 80%;
position: absolute;
}
.lis::before,
.lis::after {
content: "";
position: absolute;
border-radius: 50%;
width: 40%;
height: 65%;
box-shadow: calc(var(--s) * -0.0025) calc(var(--s) * -0.0025) 0 calc(var(--s) * 0.00125) var(--gold);
top: 30%;
right: -8%;
}
.lis::after {
left: -8%;
transform: scaleX(-1);
}
.lis-1 {
top: 84%;
left: 29%;
transform: scale(0.9) skewY(20deg);
}
.lis-4 {
top: 84.5%;
right: 30.5%;
transform: scale(0.9) skewY(-20deg);
}
.lis-2 {
top: 82.5%;
left: 25.5%;
transform: scale(0.75) skewY(30deg);
}
.lis-5 {
top: 83%;
right: 27%;
transform: scale(0.75) skewY(-30deg) rotate(3deg);
}
.lis-3 {
top: 80.75%;
left: 22.75%;
transform: scale(0.66) skewY(40deg);
}
.lis-6 {
top: 81%;
right: 23.75%;
transform: scale(0.66) skewY(-40deg);
}
/* Juan Gris */
article:nth-of-type(5) section {
width: var(--s);
aspect-ratio: 1;
background: conic-gradient(at 43.44% 20.75%, #a2936f 43deg, #c4811e 0 119deg, #2a541d 0 270deg, #a2936f 0);
box-shadow: 0 calc(0.0125 * var(--s)) calc(0.075 * var(--s)) calc(-0.025 * var(--s));
}
article:nth-of-type(5) section div {
position: absolute;
box-sizing: border-box;
width: 100%;
aspect-ratio: 1;
top: 0;
left: 0;
}
.guitar-1 {
background:
radial-gradient(100% 260% at 110% 0%, #0000 29%, #fff 29.1%) 70% 50% / 20% 20% no-repeat,
radial-gradient(105% 100% at 60.75% 39.5%, #fff 10.9%, #0000 11%),
radial-gradient(105% 100% at 68% 67%, #fff 14.9%, #0000 0),
linear-gradient(67deg, #fff 60%, #0000 0)
;
clip-path: polygon(59.91% 102.81%, 50.70% 90.17%, 87.99% 74.10%, 66.93% 24.65%, 23.40% 44.77%, 39.24% 90.33%, 47.11% 104.99%);
}
.guitar-0 {
background:
radial-gradient(100% 59% at 100% 100%, #0000 90%, #fff 0 99.9%, #0000 0) 43.25% 49% / 6.5% 8% no-repeat,
radial-gradient(100% 39% at 30% 0%, #0000 85%, #fff 0 99.9%, #0000 0) 44% 54.25% / 8% 6% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 90%, #000 0 99.9%, #0000 0) 49.5% 48.5% / 6.5% 9% no-repeat,
radial-gradient(100% 49% at 0% 0%, #0000 90%, #000 0 99.9%, #0000 0) 49.5% 53% / 6.5% 8% no-repeat,
linear-gradient(67deg, #0000 40%, #fff 0 41.5%, #0000 0) 29% 20% / 15% 15% no-repeat,
linear-gradient(67deg, #0000 40%, #fff 0 41.5%, #0000 0) 32% 18% / 16% 16% no-repeat,
linear-gradient(67deg, #0000 40%, #fff 0 41.5%, #0000 0) 34.5% 15% / 17% 17% no-repeat,
linear-gradient(67deg, #0000 40%, #fff 0 41.5%, #0000 0) 38.5% 12.5% / 18% 18% no-repeat,
linear-gradient(67deg, #0000 40%, #fff 0 41.5%, #0000 0) 42.25% 10.25% / 19% 19% no-repeat,
conic-gradient(at 39.08% 30.58%, #0000 69deg, #ce7219 0 157deg, #0000 0),
radial-gradient(100% 100% at 40% 70.5%, #000 11.5%, #0000 11.6%),
radial-gradient(100% 100% at 30% 39%, #000 11.5%, #0000 11.6%),
radial-gradient(at 21.5% 45.25%, #1d3d7a 2%, #0000 2.1%),
radial-gradient(100% 165% at -10% 110%, #0000 63%, #000 64%) 23.75% 61% / 17% 29% no-repeat,
linear-gradient(#000 29%, #0000 0),
linear-gradient(70deg, #0000 37%, #000 0)
;
clip-path: polygon(10.06% 35.80%, 28.94% 26.68%, 25.94% 19.15%, 13.14% 19.11%, 37.56% 3.20%, 65.99% 72.07%, 26.21% 88.69%);
}
.table-0 {
background:
linear-gradient(95.65deg, #ea7a2e 18.25%, #4b2021 18.5%) 50% 0% / 100% 91% no-repeat,
linear-gradient(#0000 50%, #ea7a2e 0)
;
clip-path: polygon(-0.70% 19.11%, 36.74% 19.11%, 43.92% 19.81%, 76.60% 20.20%, 78.78% 68.95%, 39.24% 90.33%, 47.11% 105.0%, 0% 105%);
}
.table-1 {
color: #aa9469;
clip-path: polygon(43.60% 70.12%, 55.5% 95%, 10.5% 95%, 18.25% 19.11%, 36.74% 19.11%, 43.92% 19.81%, 76.60% 20.20%, 78.78% 68.95%);
background:
radial-gradient(100% 220% at 0 110%, #0000 43%, #1d3d7a 44%) 15.1% 72% / 10% 15% no-repeat,
radial-gradient(100% 100% at 28% 75%, #1d3d7a 10%, #0000 10.1%),
radial-gradient(100% 100% at 24% 55.75%, #1d3d7a 12%, #0000 12.1%),
linear-gradient(96deg, #0000 50%, #322 0 60%, #0000 0) 11.5% 89% / 6% 6% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 15% 87.5% / 6.5% 9% no-repeat,
radial-gradient(100% 59% at 60% 0%, #0000 94%, #322 0 99.9%, #0000 0) 22.5% 88.6% / 10% 10% no-repeat,
radial-gradient(100% 59% at 45% 0%, #0000 92%, #322 0 99.9%, #0000 0) 21.5% 94% / 10% 10% no-repeat,
radial-gradient(100% 59% at 45% 0%, #0000 92%, #322 0 99.9%, #0000 0) 37.5% 94.5% / 8% 9% no-repeat,
radial-gradient(100% 59% at 45% 0%, #0000 92%, #322 0 99.9%, #0000 0) 36% 91.5% / 10% 10% no-repeat,
radial-gradient(100% 59% at 45% 0%, #0000 88%, #322 0 99.9%, #0000 0) 23.5% 89% / 7% 5% no-repeat,
radial-gradient(100% 59% at 50% 0%, #0000 92%, #322 0 99.9%, #0000 0) 39% 85% / 13% 8% no-repeat,
radial-gradient(100% 59% at 50% 0%, #0000 92%, #322 0 99.9%, #0000 0) 43% 88.5% / 10% 8% no-repeat,
radial-gradient(140% 59% at 20% 100%, #0000 80%, #322 0 99.9%, #0000 0) 30% 88.55% / 4% 4% no-repeat,
radial-gradient(100% 59% at 50% 100%, #0000 87%, #322 0 99.9%, #0000 0) 45% 89.4% / 8% 6% no-repeat,
radial-gradient(100% 59% at 27% 100%, #0000 87%, #322 0 99.9%, #0000 0) 30.75% 92.1% / 6% 6% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 15.25% 90.25% / 8% 9% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 14.5% 93.5% / 6.5% 9% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 47% 94% / 9.5% 9% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 33% 88.5% / 9.5% 9% no-repeat,
radial-gradient(130% 80% at 24% 90%, currentColor 5.5%, #0000 5.6%),
radial-gradient(130% 80% at 37.5% 90.5%, currentColor 5.5%, #0000 5.6%),
radial-gradient(200% 80% at 54% 90%, currentColor 5.5%, #0000 5.6%),
radial-gradient(100% 80% at 9% 88.5%, currentColor 5.5%, #0000 5.6%),
radial-gradient(100% 80% at 50% 100%, #0000 65.5%, currentColor 66%) 10.75% 96.5% / 10% 10% no-repeat,
radial-gradient(130% 80% at 50% 100%, #0000 90%, currentColor 86%) 29% 100.5% / 6% 10% no-repeat,
radial-gradient(130% 80% at 50% 100%, #0000 90%, currentColor 86%) 44% 100.5% / 10% 10% no-repeat,
linear-gradient(84deg, #0000 50%, #322 0 58%, #0000 0) 11.5% 71% / 6.5% 5.5% no-repeat,
linear-gradient(-4deg, #0000 50%, #322 0 58%, #0000 0) 15% 68.5% / 6.5% 5.5% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 93%, #322 0 99.9%, #0000 0) 15% 72% / 6.5% 9% no-repeat,
linear-gradient(-4deg, #0000 50%, #322 0 56%, #0000 0) 15.5% 73.75% / 6.5% 5.5% no-repeat,
linear-gradient(84deg, #0000 50%, #322 0 60%, #0000 0) 11.5% 80% / 6% 6% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 93%, #322 0 99.9%, #0000 0) 15% 80.5% / 6.5% 9% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 14.5% 77.75% / 6.5% 9% no-repeat,
radial-gradient(100% 59% at 45% 100%, #0000 92%, #322 0 99.9%, #0000 0) 15.5% 84.25% / 8.5% 9% no-repeat,
linear-gradient(#0000 60%, #aa9469 0 90%, #0000 0) 0 0 / 52% 100% no-repeat
;
}
Also see: Tab Triggers