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.
<ol id="slides">
<li class="slide slide--text">
<div class="content">
<h1>The Modern CSS Toolkit</h1>
<p>Presented by Stephanie Eckles</p>
<p><a target="_blank" href="https://twitter.com/5t3ph">@5t3ph</a> • <a target="_blank" href="https://moderncss.dev">ModernCSS.dev</a> • <a target="_blank" href="https://smolcss.dev">SmolCSS.dev</a></p>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h2>🤔 What is "Modern CSS"?</h2>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h3>🤩⚡️💡 TL;DR:</h3>
<p>All the stuff that eliminates the hacks we used to need</p>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h2>Toolkit Contents</h2>
<ul>
<li>Layout Techniques</li>
<li>New and Enhanced Selectors</li>
<li>Super-Charged Properties</li>
</ul>
</div>
</li>
<li class="slide slide--title" data-topic="Layout">
<div class="content">
<h2>🔨 Layout Techniques</h2>
</div>
</li>
<!-- modern container -->
<li class="slide slide--demo" data-topic="Layout">
<div class="style">
<style contenteditable="true" style="--num-lines: 5">
.modern-container {
--container-width: 40ch;
width: min(
var(--container-width), 100% - 3rem
);
margin-inline: auto;
}
</style>
</div>
<div class="demo container">
<div class="modern-container">
<div class="box">container</div>
</div>
</div>
</li>
<!-- centering -->
<li class="slide slide--demo" data-topic="Layout">
<div class="style">
<style contenteditable="true" style="--num-lines: 2">
.centering {
display: grid;
place-content: center;
}
</style>
</div>
<div class="container centering">
<div class="box">centering</div>
</div>
</li>
<!-- grid -->
<li class="slide slide--demo" data-topic="Layout">
<div class="style">
<style contenteditable="true" style="--highlight-start: calc(5 * var(--line-height)); --num-lines: 2">
.grid {
display: grid;
/* grid-template-columns:
repeat(3, 1fr); */
grid-template-columns:
repeat(auto-fit, minmax(15ch, 1fr));
}
</style>
</div>
<div class="container demo grid">
<div class="box centering">a</div>
<div class="box centering">b</div>
<div class="box centering">c</div>
<div class="box centering">d</div>
<div class="box centering">e</div>
</div>
</li>
<!-- fit-content -->
<li class="slide slide--demo" data-topic="Layout">
<div class="style">
<style contenteditable="true">
.fit-content {
width: fit-content;
}
</style>
</div>
<div class="container demo">
<p class="fit-content" contenteditable spellcheck="false">Edit me!</p>
</div>
</li>
<!-- grid fit-content -->
<li class="slide slide--demo" data-topic="Layout">
<div class="style">
<style contenteditable="true" style="--highlight-start: calc(3 * var(--line-height)); --num-lines: 2">
.grid-fit-content {
display: grid;
grid-template-columns:
fit-content(15ch) 1fr;
}
</style>
</div>
<div class="demo centering">
<div class="grid-fit-content container">
<div contenteditable spellcheck="false">Ipsum</div>
<div>Lorem ipsum dolor sit amet.</div>
</div>
</div>
</li>
<li class="slide slide--title" data-category="Selectors">
<div class="content">
<h2>🔧 New and Enhanced Selectors</h2>
</div>
</li>
<!-- :is -->
<li class="slide slide--demo" data-topic="Selectors">
<div class="style">
<style contenteditable="true" class="highlight--rule-only">
/* Try changing to :where() */
:is(#id, h1, h2, h3) {
margin-bottom: 0.65em;
}
h2 {
margin-bottom: 2rem;
}
</style>
</div>
<div class="modern-container centering demo">
<h1>Headline 1</h1>
<h2>Headline 2</h2>
<h3>Headline 3</h3>
</div>
</li>
<!-- :not -->
<li class="slide slide--demo" data-topic="Selectors">
<div class="style">
<style contenteditable="true" class="highlight--rule-only">
a:not([class], nav *) {
color: mediumvioletred;
}
</style>
</div>
<div class="modern-container centering demo" style="--gap: 2rem;">
<nav><a href="#">nav link</a></nav>
<p><a href="#">content link</a></p>
<a href="#" class="button">.button link</a>
</div>
</li>
<!-- :focus-visible -->
<li class="slide slide--demo" data-topic="Selectors">
<div class="style">
<style contenteditable="true" class="highlight--rule-only">
button:focus-visible {
outline: 2px solid currentColor;
outline-offset: 2px;
}
button:focus {
outline: 2px solid currentColor;
outline-offset: 2px;
}
button:focus:not(:focus-visible) {
outline: none;
}
</style>
</div>
<div class="modern-container centering demo" style="--gap: 2rem;">
<button type="button">Button 1</button>
<button type="button">Button 2</button>
</div>
</li>
<!-- :focus-within -->
<li class="slide slide--demo" data-topic="Selectors">
<div class="style">
<style contenteditable="true" class="highlight--rule-only">
.fw-demo:focus-within {
outline: 2px dashed currentColor;
outline-offset: -1rem;
}
</style>
</div>
<div class="fw-demo modern-container centering demo" style="--gap: 2rem;">
<button type="button">Button 1</button>
<button type="button">Button 2</button>
</div>
</li>
<!-- ::marker -->
<li class="slide slide--demo" data-topic="Selectors">
<div class="style">
<style contenteditable="true" class="highlight--rule-only">
::marker {
color: mediumvioletred;
font-size: 1.25em;
}
</style>
</div>
<div class="modern-container centering demo">
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
</div>
</li>
<li class="slide slide--title" data-category="Properties">
<div class="content">
<h2>⚙️ Super-Charged Properties</h2>
</div>
</li>
<!-- aspect-ratio -->
<li class="slide slide--demo" data-topic="Properties">
<div class="style">
<style contenteditable="true" style="--num-lines: 2">
.aspect-ratio {
/* Try options like 1 or 3/2 */
aspect-ratio: ?;
}
</style>
</div>
<div class="container centering demo">
<div class="aspect-ratio centering">aspect-ratio</div>
</div>
</li>
<!-- object-fit -->
<li class="slide slide--demo" data-topic="Properties">
<div class="style">
<style contenteditable="true" style="--highlight-start: calc(3 * var(--line-height))">
img.object-fit {
aspect-ratio: 1;
object-fit: cover;
object-position: right;
width: 100%;
}
</style>
</div>
<div class="container modern-container centering demo" style="--container-width: 30ch;">
<img src="https://source.unsplash.com/vYpbBtkDhNE/1600x900" alt="" class="object-fit">
</div>
</li>
<!-- accent-color -->
<li class="slide slide--demo" data-topic="Properties">
<div class="style">
<style contenteditable="true" style="--num-lines: 2">
:root {
/* Try your own color */
accent-color: ?;
}
</style>
</div>
<div class="modern-container centering demo" style="--gap: 2rem;">
<label>
<input type="radio" checked>
Radio
</label>
<label>
<input type="checkbox" checked>
Checkbox
</label>
<label>
Range<br>
<input type="range" min="0" max="100" value="30">
</label>
<label>
Progress<br>
<progress max="100" value="70">70%</progress>
</label>
<p class="note">To fully control form input styling, review the posts on ModernCSS.dev</p>
</div>
</li>
<!-- scroll-margin-top -->
<li class="slide slide--demo" data-topic="Properties">
<div class="style">
<style contenteditable="true" style="--highlight-start: calc(5 * var(--line-height)); --num-lines: 3">
[id] {
/* Try a value like 2rem,
then click the anchor link */
scroll-margin-top: ?;
}
</style>
</div>
<div class="demo-overflow">
<div class="modern-container centering demo">
<p><a href="#anchor">Anchor link</a></p>
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Animi, ratione! Accusamus soluta necessitatibus sunt, molestias cumque magni. Vero dicta officia modi vel explicabo, dolores, deleniti ad facilis a accusamus doloremque?</p>
<p>Voluptate iusto reprehenderit cupiditate facilis blanditiis vero tempora quasi, rerum impedit odit dignissimos maxime quis ab temporibus maiores repellendus ipsum atque tempore labore est. Sequi repellat earum officia illum hic.</p>
<p>Earum tempore accusantium quis distinctio illum autem reiciendis quod. At doloremque, quidem accusamus sed odit hic maxime animi? Amet deserunt, ea quis earum velit voluptatum nihil esse vel repellat neque.</p>
<h2 id="anchor">Anchor heading</h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore repellat dolores assumenda odio quis impedit blanditiis officiis, incidunt, accusantium ab nostrum, delectus ea deserunt beatae maxime quia sit voluptatibus enim?</p>
<p>Unde, ducimus eius. Nobis dolore magnam ipsam sapiente qui reiciendis harum corrupti perspiciatis architecto iste dicta quia fugiat veritatis nisi laudantium quae aspernatur omnis error incidunt, facere sunt molestiae blanditiis.</p>
<p>Aliquam modi perferendis dignissimos ut qui amet perspiciatis ipsum omnis ex, quam maxime illo minima incidunt sint ducimus dolorum quisquam similique quae maiores iste eos molestiae. Aliquam labore repellendus eveniet.</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis veniam esse non, id ducimus excepturi repellendus ab eos ut laudantium quae nulla cumque quos voluptatum quibusdam repudiandae, aut molestias amet.</p>
<p>Voluptatum, cupiditate aut hic eos iure expedita saepe molestiae quo vero sit nihil deserunt? Vel ullam nostrum nobis, aperiam quos reiciendis, magnam itaque facere saepe atque provident laudantium eveniet exercitationem!</p>
<p>Voluptates delectus obcaecati totam reiciendis cupiditate ab nesciunt sint, blanditiis corrupti laboriosam tenetur dolor rerum aliquam repellat reprehenderit sunt earum laborum fuga recusandae minus porro modi. Cum soluta ea repellat?</p>
</div>
</div>
</li>
<!-- scroll-margin-bottom -->
<li class="slide slide--demo" data-topic="Properties">
<div class="style">
<style contenteditable="true" style="--num-lines: 3">
a {
/* Try a value like 8vh then
tab between the links in the content */
scroll-margin-bottom: ?;
}
</style>
</div>
<div class="demo-overflow">
<div class="modern-container centering demo">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Animi, ratione! Accusamus soluta necessitatibus sunt, molestias cumque magni. Vero dicta officia modi vel explicabo, dolores, deleniti ad facilis a accusamus doloremque?</p>
<p>Voluptate iusto reprehenderit cupiditate facilis blanditiis vero tempora quasi, rerum impedit odit dignissimos maxime quis ab temporibus maiores repellendus ipsum atque tempore labore est. Sequi repellat earum officia illum hic.</p>
<p>Earum tempore accusantium quis distinctio illum autem reiciendis quod. At doloremque, quidem accusamus sed odit hic maxime animi? Amet deserunt, ea quis earum velit voluptatum nihil esse vel repellat neque.</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Inventore repellat dolores assumenda odio quis impedit blanditiis officiis, incidunt, accusantium ab nostrum, delectus ea deserunt beatae maxime quia sit voluptatibus enim?</p>
<p>Unde, <a href="#">ducimus eius</a>. Nobis dolore magnam ipsam sapiente qui reiciendis harum corrupti perspiciatis architecto iste dicta quia fugiat veritatis nisi laudantium quae aspernatur omnis error incidunt, facere sunt molestiae blanditiis.</p>
<p>Aliquam modi perferendis dignissimos ut qui amet perspiciatis ipsum omnis ex, quam maxime illo minima incidunt sint ducimus dolorum quisquam similique quae maiores iste eos molestiae. <a href="#">Aliquam labore repellendus eveniet</a>.</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis veniam esse non, id ducimus excepturi repellendus ab eos ut laudantium quae nulla cumque quos voluptatum quibusdam repudiandae, aut molestias amet.</p>
<p>Voluptatum, cupiditate aut hic eos iure expedita saepe molestiae quo vero sit nihil deserunt? Vel ullam nostrum nobis, aperiam quos reiciendis, magnam itaque facere saepe atque provident laudantium eveniet exercitationem!</p>
<p>Unde, <a href="#">ducimus eius</a>. Nobis dolore magnam ipsam sapiente qui reiciendis harum corrupti perspiciatis architecto iste dicta quia fugiat veritatis nisi laudantium quae aspernatur omnis error incidunt, facere sunt molestiae blanditiis.</p>
<p>Aliquam modi perferendis dignissimos ut qui amet perspiciatis ipsum omnis ex, quam maxime illo minima incidunt sint ducimus dolorum quisquam similique quae maiores iste eos molestiae. <a href="#">Aliquam labore repellendus eveniet</a>.</p>
<p>Voluptates delectus obcaecati totam reiciendis cupiditate ab nesciunt sint, blanditiis corrupti laboriosam tenetur dolor rerum aliquam repellat reprehenderit sunt earum laborum fuga recusandae minus porro modi. Cum soluta ea repellat?</p>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Blanditiis veniam esse non, id ducimus excepturi repellendus ab eos ut laudantium quae nulla cumque quos voluptatum quibusdam repudiandae, aut molestias amet.</p>
<p>Voluptatum, cupiditate aut hic eos iure expedita saepe molestiae quo vero sit nihil deserunt? Vel ullam nostrum nobis, aperiam quos reiciendis, magnam itaque facere saepe atque provident laudantium eveniet exercitationem!</p>
<p>Unde, <a href="#">ducimus eius</a>. Nobis dolore magnam ipsam sapiente qui reiciendis harum corrupti perspiciatis architecto iste dicta quia fugiat veritatis nisi laudantium quae aspernatur omnis error incidunt, facere sunt molestiae blanditiis.</p>
<p>Aliquam modi perferendis dignissimos ut qui amet perspiciatis ipsum omnis ex, quam maxime illo minima incidunt sint ducimus dolorum quisquam similique quae maiores iste eos molestiae. <a href="#">Aliquam labore repellendus eveniet</a>.</p>
<p>Voluptates delectus obcaecati totam reiciendis cupiditate ab nesciunt sint, blanditiis corrupti laboriosam tenetur dolor rerum aliquam repellat reprehenderit sunt earum laborum fuga recusandae minus porro modi. Cum soluta ea repellat?</p>
</div>
</div>
</li>
<!-- touch media query -->
<li class="slide slide--demo">
<div class="style">
<style contenteditable="true" class="highlight--none">
.icons {
gap: 1rem;
}
.icon {
width: 44px;
}
@media (any-hover: hover) and (any-pointer: fine) {
.icons {
gap: .5rem;
}
.icon {
width: 36px;
}
}
</style>
</div>
<div class="modern-container centering demo">
<ul class="icons container">
<li class="icon centering">1</li>
<li class="icon centering">2</li>
<li class="icon centering">3</li>
</ul>
</div>
</li>
<!-- @supports -->
<li class="slide slide--style-only">
<div class="style" >
<style contenteditable="true" style="--highlight-start: calc(5 * var(--line-height))">
.supports-aspect-ratio {
aspect-ratio: 1;
}
@supports not (aspect-ratio: 1) {
.supports-aspect-ratio {
max-height: 25vh;
}
}
</style>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h2>webhint VS Code extension</h2>
<p>Check support during development</p>
<p>Support calculated based on your <code>browserslist</code></p>
<img src="https://assets.codepen.io/1101822/Screen+Shot+2021-11-28+at+2.22.17+PM.png" alt="Preview of webhint popover in VS Code, with text: 'accent-color' is not supported by Chrome < 93, Edge < 93, Firefox < 92, Opera < 79, Safari, Safari on iOS, Samsung Internet. webhint (compat-api/css)" />
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h2>Upcoming Toolkit Additions</h2>
<ul>
<li>Container queries</li>
<li>Layers</li>
<li>Scope</li>
<li>Color functions</li>
<li>:has()</li>
<li>...<em>so much more</em></li>
</ul>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h2>.slide:last-of-type</h2>
<p>These slides were built with zero JS thanks to <strong>CSS Scroll Snap</strong></p>
<p>🤓 Plus the HTML attribute <code>contenteditable</code> used within Firefox allowed the exposed <code><style></code> to be fully editable</p>
<p>💜 And the wonderfulness of the CSS cascade compounding each demo's styles to enable other slide styles</p>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h1>Modern CSS Challenges</h1>
<p>Guided practice to level-up your CSS skills</p>
<p><a target="_blank" href="https:/challenges.moderncss.dev">challenges.moderncss.dev</a></p>
</div>
</li>
<li class="slide slide--text">
<div class="content">
<h1>The Modern CSS Toolkit</h1>
<p>Presented by Stephanie Eckles</p>
<p><a target="_blank" href="https://twitter.com/5t3ph">@5t3ph</a> • <a target="_blank" href="https://moderncss.dev">ModernCSS.dev</a> • <a target="_blank" href="https://smolcss.dev">SmolCSS.dev</a></p>
</div>
</li>
</ol>
:root {
--theme-hue: 260;
--theme-saturation: 85%;
--theme-hs: var(--theme-hue), var(--theme-saturation);
}
* {
margin: 0;
box-sizing: border-box;
}
body {
padding: 0;
min-height: 100vh;
font-family: system-ui, sans-serif;
font-size: 1.5rem;
background-color: hsl(var(--theme-hs), 95%);
color: hsl(var(--theme-hs), 25%);
}
body,
#slides,
.slide {
display: grid;
}
#slides {
list-style: none;
padding: 0;
margin: 0;
counter-reset: slides;
}
@media screen and (min-width: 120ch) {
#slides {
grid-auto-flow: column;
overflow-x: auto;
scroll-snap-type: x mandatory;
}
}
.slide {
position: relative;
counter-increment: slides;
}
@media screen and (min-width: 120ch) {
.slide {
width: 100vw;
height: 100vh;
scroll-snap-align: center;
scroll-snap-stop: always;
}
}
@media (max-width: 120ch) {
.slide {
min-height: 80vh;
}
.slide + .slide {
border-top: 1px dashed;
}
}
.slide::before {
content: counter(slides);
position: absolute;
top: 0.25rem;
left: 0.25rem;
width: 1.65em;
height: 1.65em;
display: grid;
place-content: center;
border-radius: 50%;
font-size: 1.25rem;
color: hsl(var(--theme-hs), 95%);
background-color: hsl(var(--theme-hs), 55%);
}
@media (min-width: 120ch) {
.slide::before {
top: auto;
bottom: 1rem;
left: 1rem;
}
}
[data-topic]::before {
content: counter(slides) ": " attr(data-topic);
padding: 0.25em 0.4em;
width: auto;
border-radius: 0.5rem;
}
.slide--text,
.slide--title {
place-content: center;
}
.slide--title {
background-image:
linear-gradient(125deg,
hsl(var(--theme-hs), 95%),
hsl(var(--theme-hs), 75%)
);
}
@media screen and (min-width: 120ch) {
.slide--demo {
grid-template-columns: fit-content(85ch) 1fr;
}
}
.slide--style-only {
place-content: center;
.style {
padding-inline: 3rem;
border-radius: 1rem;
}
}
h1, h2 {
line-height: 1.1;
}
a {
color: inherit;
}
.content {
padding: 2rem;
font-size: 1.5rem;
line-height: 1.5;
width: calc(100vw - 2rem);
}
.content * + * {
margin-top: 0.5em;
}
@media screen and (min-width: 120ch) {
.content {
width: unset;
max-width: 45ch;
}
}
.style {
display: grid;
align-items: center;
background-color: hsl(var(--theme-hs), 5%);
padding-inline: max(5vw, 2rem) 3rem;
font-size: 1.35rem;
overflow-y: hidden;
resize: horizontal;
}
style {
--line-height: 1.65em;
--highlight-start: calc(2 * var(--line-height));
--lines: calc(var(--highlight-start) + var(--num-lines, 1) * var(--line-height));
display: block;
outline: none;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
color: hsl(var(--theme-hs), 75%);
background: none;
white-space: pre;
line-height: 1.65;
tab-size: 2;
hyphens: none;
-webkit-text-fill-color: transparent;
-webkit-background-clip: text;
background-image: linear-gradient(
hsl(var(--theme-hs), 75%) 0 var(--highlight-start),
hsl(var(--theme-hs), 90%) var(--highlight-start) var(--lines),
hsl(var(--theme-hs), 75%) var(--lines) 100%
);
}
.highlight--rule-only {
--highlight-start: calc(1 * var(--line-height))
}
.highlight--none {
background-image: none;
background-color: currentColor;
}
.demo {
padding: 2rem;
}
.demo-overflow {
overflow-y: auto;
max-height: 100vh;
}
/* Extra demo presentation styles */
.modern-container {
gap: var(--gap);
}
button {
all: unset;
border: 1px solid;
padding: 0.25em 0.5em;
border-radius: 0.25rem;
cursor: pointer;
font-size: 2.5rem;
justify-self: center;
&:hover {
background-color: hsl(260, 85%, 90%);
}
}
[type="radio"],
[type="checkbox"] {
width: 2rem;
height: 2rem;
}
li li {
list-style: disc;
}
.note {
border: 2px dashed hsl(260, 85%, 65%);
color: hsl(260, 85%, 25%);
font-size: 1.35rem;
padding: 0.25rem 1rem;
line-height: 1.5;
margin-top: 4rem;
}
p + :is(p, h2) {
margin-top: 1.5em;
}
a:focus {
outline: 2px solid currentColor;
outline-offset: 1px;
}
.icons {
display: flex;
gap: 1rem;
}
.icon {
padding: 0 !important;
border-radius: 50%;
aspect-ratio: 1;
font-size: 1rem;
}
.grid {
align-self: start;
}
::selection {
-webkit-text-fill-color: hsl(260, 85%, 5%);
color: hsl(260, 85%, 5%);
background-color: hsl(260, 85%, 95%);
}
Also see: Tab Triggers