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

              
                <container>
	<h1>👋 If you find this guide helpful, consider <a href="https://jonlehman.medium.com/" style="color: var(--blue)">following me on Medium</a> or check out the <a href="https://jonlehman.medium.com/how-to-underline-text-with-css-customize-the-style-dce7f8541bbd" style="color: var(--blue)">article I put togeter on this topic.</a></h1>
</container>

<container>
	<div class="setting-title">
		<h2>Decorations</h2>
		<div></div>
	</div>
</container>

<!-- Decor Style -->
<section>
	<container>
		<h3>Decor Style</h3>
		<div class="grid">
			<!-- A1 Basic Underline -->
			<div class="card">
				<div class="example">
					<p class="a1">Basic Underline</p>
					<div class="class-tag">a1</div>
				</div>
				<code>text-decoration-line: underline;
					text-decoration-style: solid;
					/* ▲ solid is default ▲ */
				</code>
			</div>
			<!-- A2 Double Underline -->
			<div class="card">
				<div class="example">
					<p class="a2">Double Underline</p>
					<div class="class-tag">a2</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-style: double;
				</code>
			</div>
			<!-- A3 Dashed Underline -->
			<div class="card">
				<div class="example">
					<p class="a3">Dashed Underline</p>
					<div class="class-tag">a3</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-style: dashed;
				</code>
			</div>
			<!-- A4 Dotted Underline -->
			<div class="card">
				<div class="example">
					<p class="a4">Dotted Underline</p>
					<div class="class-tag">a4</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-style: dotted;
				</code>
			</div>
			<!-- A5 Wavy Underline -->
			<div class="card">
				<div class="example">
					<p class="a5">Wavy Underline</p>
					<div class="class-tag">a5</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-style: wavy;
				</code>
			</div>
		</div><!--end grid-->
	</container>
</section>

<!-- Decor Placement -->
<section>
	<container>
		<h3>Decor Placement</h3>
		<div class="grid">
			<!-- B1 Underline -->
			<div class="card">
				<div class="example">
					<p class="b1">Underline</p>
					<div class="class-tag">b1</div>
				</div>
				<code>text-decoration-line: underline;
				</code>
			</div>
			<!-- B2 Double Underline -->
			<div class="card">
				<div class="example">
					<p class="b2">Overline</p>
					<div class="class-tag">b2</div>
				</div>
				<code>text-decoration-line: overline;
				</code>
			</div>
			<!-- B3 Line-Through -->
			<div class="card">
				<div class="example">
					<p class="b3">Line-through</p>
					<div class="class-tag">b3</div>
				</div>
				<code>text-decoration-line: line-through;
				</code>
			</div>
			<!-- Tip -->
			<div class="tip">
				<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="none" viewBox="0 0 40 40">
						<path fill="var(--blue)" d="M24.167 15.833c0-5.05-4.117-9.166-9.167-9.166s-9.167 4.116-9.167 9.166c0 4.117 2.484 6.484 3.917 7.5h10.5c1.433-1.016 3.917-3.383 3.917-7.5Z" opacity=".3"/>
						<path fill="var(--blue)" d="M11.816 34.318c-.164-.527.298-.985.85-.985h4.667c.553 0 1.015.458.85.985A3.347 3.347 0 0 1 15 36.667a3.347 3.347 0 0 1-3.184-2.349ZM8.333 30c0 .92.747 1.667 1.667 1.667h10a1.667 1.667 0 1 0 0-3.334H10c-.92 0-1.667.747-1.667 1.667ZM27.5 15.833c0 6.367-4.433 9.767-6.283 10.834H8.783C6.933 25.6 2.5 22.2 2.5 15.833c0-6.9 5.6-12.5 12.5-12.5s12.5 5.6 12.5 12.5Zm-3.333 0c0-5.05-4.117-9.166-9.167-9.166s-9.167 4.116-9.167 9.166c0 4.117 2.484 6.484 3.917 7.5h10.5c1.433-1.016 3.917-3.383 3.917-7.5Zm11.527-3.718a.5.5 0 0 1-.245.246l-1.128.518a.5.5 0 0 0 0 .909l1.128.518a.5.5 0 0 1 .245.245l.518 1.128a.5.5 0 0 0 .909 0l.518-1.128a.5.5 0 0 1 .246-.245l1.127-.518a.5.5 0 0 0 0-.909l-1.127-.518a.5.5 0 0 1-.246-.246l-.518-1.127a.5.5 0 0 0-.909 0l-.518 1.127Zm-4.482-3.112a.5.5 0 0 0 .91 0l1.034-2.267a.5.5 0 0 1 .247-.247l2.267-1.034a.5.5 0 0 0 0-.91l-2.267-1.034a.5.5 0 0 1-.247-.247L32.12.997a.5.5 0 0 0-.91 0l-1.034 2.267a.5.5 0 0 1-.247.247l-2.267 1.034a.5.5 0 0 0 0 .91l2.267 1.034a.5.5 0 0 1 .247.247l1.035 2.267Z"/>
				</svg>
				<p>Tip: text-decoration-line can be used along with text-decoration-style, creating unique combos. See the “Shorthand Combos” section below for examples.</p>
			</div>
		</div><!--end grid-->
	</container>
</section>

<!-- Decor Thickness -->
<section>
	<container>
		<h3>Decor Thickness</h3>
		<div class="grid">
			<!-- C1 Auto Thick -->
			<div class="card">
				<div class="example">
					<p class="c1">Basic Underline</p>
					<div class="class-tag">c1</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-thickness: auto;
							/* ▲ auto is default ▲ */
				</code>
			</div>
			<!-- C2 From-Font Thick -->
			<div class="card">
				<div class="example">
					<p class="c2">From-Font Thick</p>
					<div class="class-tag">c2</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-thickness: from-font;
				</code>
			</div>
			<!-- C3 Dashed Underline -->
			<div class="card">
				<div class="example">
					<p class="c3">4px Thick</p>
					<div class="class-tag">c3</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-thickness: 4px;
				</code>
			</div>
			<!-- C4 10% Thick -->
			<div class="card">
				<div class="example">
					<p class="c4">10% Thick</p>
					<div class="class-tag">c4</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-thickness: 10%;
				</code>
			</div>
			<!-- C5 Wavy Underline -->
			<div class="card">
				<div class="example">
					<p class="c5">0.5em Thick</p>
					<div class="class-tag">c5</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-thickness: 0.5em;
				</code>
			</div>
			<!-- C6 Thicc -->
			<div class="card">
				<div class="example">
					<p class="c6">Thicc</p>
					<div class="class-tag">c6</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-thickness: 100%;
				</code>
			</div>
		</div><!--end grid-->
	</container>
</section>

<!-- Decor Color -->
<section>
	<container>
		<h3>Decor Color</h3>
		<div class="grid">
			<!-- D1 Current Color Underline -->
			<div class="card">
				<div class="example">
					<p class="d1">Current Color Underline</p>
					<div class="class-tag">d1</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-color: currentcolor;
							/* ▲ currentcolor is default ▲ */
				</code>
			</div>
			<!-- D2 Turquoise Underline -->
			<div class="card">
				<div class="example">
					<p class="d2">Deep Turquoise Underline</p>
					<div class="class-tag">d2</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-color: DeepPink;
				</code>
			</div>
			<!-- D3 #C55555 Underline -->
			<div class="card">
				<div class="example">
					<p class="d3">#C55555 Underline</p>
					<div class="class-tag">d3</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-color: #C55;
				</code>
			</div>
			<!-- D4 rgba(255, 128, 128, 0.5) -->
			<div class="card">
				<div class="example">
					<p class="d4">rgba(255, 128, 128, 0.5)</p>
					<div class="class-tag">d4</div>
				</div>
				<code>text-decoration-line: underline;
							text-decoration-color: rgba(255, 128, 128, 0.5)
				</code>
			</div>
		</div><!--end grid-->
	</container>
</section>

<!-- Underline Offset -->
<section>
	<container>
		<h3>Underline Offset</h3>
		<div class="grid">
			<!-- E1 Auto Offset -->
			<div class="card">
				<div class="example">
					<p class="e1">Auto Offset</p>
					<div class="class-tag">e1</div>
				</div>
				<code>text-decoration-line: underline;
							text-underline-offset: auto;
							/* ▲ auto is default ▲ */
				</code>
			</div>
			<!-- E2 From Font Offset -->
			<div class="card">
				<div class="example">
					<p class="e2">From Font Offset</p>
					<div class="class-tag">e2</div>
				</div>
				<code>text-decoration-line: underline;
							text-underline-offset: from-font;
				</code>
			</div>
			<!-- E3 8px Offset -->
			<div class="card">
				<div class="example">
					<p class="e3">8px Offset</p>
					<div class="class-tag">e3</div>
				</div>
				<code>text-decoration-line: underline;
							text-underline-offset: 8px;
				</code>
			</div>
			<!-- E4 10% Offset -->
			<div class="card">
				<div class="example">
					<p class="e4">10% Offset</p>
					<div class="class-tag">e4</div>
				</div>
				<code>text-decoration-line: underline;
							text-underline-offset: 10%;
				</code>
			</div>
			<!-- E5 0.5em Offset -->
			<div class="card">
				<div class="example">
					<p class="e5">0.5em Offset</p>
					<div class="class-tag">e5</div>
				</div>
				<code>text-decoration-line: underline; 
							text-underline-offset: 0.5em;
				</code>
			</div>
			<!-- Tip -->
			<div class="tip">
				<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="none" viewBox="0 0 40 40">
						<path fill="var(--blue)" d="M24.167 15.833c0-5.05-4.117-9.166-9.167-9.166s-9.167 4.116-9.167 9.166c0 4.117 2.484 6.484 3.917 7.5h10.5c1.433-1.016 3.917-3.383 3.917-7.5Z" opacity=".3"/>
						<path fill="var(--blue)" d="M11.816 34.318c-.164-.527.298-.985.85-.985h4.667c.553 0 1.015.458.85.985A3.347 3.347 0 0 1 15 36.667a3.347 3.347 0 0 1-3.184-2.349ZM8.333 30c0 .92.747 1.667 1.667 1.667h10a1.667 1.667 0 1 0 0-3.334H10c-.92 0-1.667.747-1.667 1.667ZM27.5 15.833c0 6.367-4.433 9.767-6.283 10.834H8.783C6.933 25.6 2.5 22.2 2.5 15.833c0-6.9 5.6-12.5 12.5-12.5s12.5 5.6 12.5 12.5Zm-3.333 0c0-5.05-4.117-9.166-9.167-9.166s-9.167 4.116-9.167 9.166c0 4.117 2.484 6.484 3.917 7.5h10.5c1.433-1.016 3.917-3.383 3.917-7.5Zm11.527-3.718a.5.5 0 0 1-.245.246l-1.128.518a.5.5 0 0 0 0 .909l1.128.518a.5.5 0 0 1 .245.245l.518 1.128a.5.5 0 0 0 .909 0l.518-1.128a.5.5 0 0 1 .246-.245l1.127-.518a.5.5 0 0 0 0-.909l-1.127-.518a.5.5 0 0 1-.246-.246l-.518-1.127a.5.5 0 0 0-.909 0l-.518 1.127Zm-4.482-3.112a.5.5 0 0 0 .91 0l1.034-2.267a.5.5 0 0 1 .247-.247l2.267-1.034a.5.5 0 0 0 0-.91l-2.267-1.034a.5.5 0 0 1-.247-.247L32.12.997a.5.5 0 0 0-.91 0l-1.034 2.267a.5.5 0 0 1-.247.247l-2.267 1.034a.5.5 0 0 0 0 .91l2.267 1.034a.5.5 0 0 1 .247.247l1.035 2.267Z"/>
				</svg>
				<p>Tip: text-underline-offset is only available for underlines. Overlines and line-through decorations don’t have offset options. :(</p>
			</div>
		</div><!--end grid-->
	</container>
</section>

<!-- Shorthand Combos -->
<section>
	<container>
		<h3>Shorthand Combos</h3>
		<div class="grid" style="grid-template-columns: repeat(2, 1fr);">
			<!-- DeepSkyBlue Wavy Strikethrough -->
			<div class="card">
				<div class="example">
					<p class="f1">DeepSkyBlue Wavy Strikethrough</p>
					<div class="class-tag">f1</div>
				</div>
				<code>text-decoration: line-through wavy deepskyblue 4px;</code>
			</div>
			<!-- F2 Redacted Text -->
			<div class="card">
				<div class="example">
					<p>Hover to reveal <span class="f2">shocking</span> redacted text</p>
					<div class="class-tag">f2</div>
				</div>
				<code>text-decoration: line-through solid black 100%;
							/* remove the decoration on hover for a cool reveal */
				</code>
			</div>
			<!-- F3 Perforated Text -->
			<div class="card">
				<div class="example">
					<p class="f3">Perforated Text</p>
					<div class="class-tag">f3</div>
				</div>
				<code>text-decoration: overline underline dotted silver 2px;
							text-underline-offset: 4px
				</code>
			</div>
			<!-- F4 Peaking Through Blinds -->
			<div class="card">
				<div class="example">
					<p class="f4">Peaking Through Blinds</p>
					<div class="class-tag">f4</div>
				</div>
				<code>text-decoration: overline line-through underline double silver 2px;</code>
			</div>
			<!-- F5 Bad Grammmar -->
			<div class="card">
				<div class="example">
					<p class="f5">Bad Grammmar</p>
					<div class="class-tag">f5</div>
				</div>
				<code>text-decoration: underline wavy red;</code>
			</div>
		</div><!--end grid-->
	</container>
</section>

<!-- Silliness & Animations -->
<section>
	<container>
		<h3>Silliness & Animations</h3>
		<div class="grid" style="grid-template-columns: repeat(1, 1fr);">
			<!-- G1 Meteor Shower -->
			<div class="card">
				<div class="example">
					<p class="g1"><span>M</span><span>e</span><span>t</span><span>e</span><span>o</span><span>r</span><span> </span><span>s</span><span>h</span><span>o</span><span>w</span><span>e</span><span>r</span>
					<p>
					<div class="class-tag">g1</div>
				</div>
				<code class="scroll">.g1 span {
	text-decoration: underline 2px black;
	text-underline-offset: 8px;
	animation: g1 linear 1400ms infinite forwards
}
					
.g1 span:nth-of-type(1) {animation-delay: 0ms}
.g1 span:nth-of-type(2) {animation-delay: 100ms}
.g1 span:nth-of-type(3) {animation-delay: 200ms}
.g1 span:nth-of-type(4) {animation-delay: 300ms}
.g1 span:nth-of-type(5) {animation-delay: 400ms}
.g1 span:nth-of-type(6) {animation-delay: 500ms}
.g1 span:nth-of-type(7) {animation-delay: 600ms}
.g1 span:nth-of-type(8) {animation-delay: 700ms}
.g1 span:nth-of-type(9) {animation-delay: 800ms}
.g1 span:nth-of-type(10) {animation-delay: 900ms}
.g1 span:nth-of-type(11) {animation-delay: 1000ms}
.g1 span:nth-of-type(12) {animation-delay: 1100ms}
.g1 span:nth-of-type(13) {animation-delay: 1200ms}
					
@keyframes g1 {
	0% { text-decoration-color: DarkOrange }
	10% { text-decoration-color: LightYellow}
	70% { text-decoration-color: black }
}
				</code>
			</div>
			<!-- G2 Rainbow Dots -->
			<div class="card">
				<div class="example">
					<p class="g2"><span>o</span><span>o</span><span>o</span><span>o</span><span>o</span><span>o</span><span>o</span><span>o</span><span>o</span><span>o</span><p>
					<div class="class-tag">g2</div>
				</div>
				<code class="scroll">.g2 span {
	text-decoration: line-through 100% dotted Salmon;
	text-underline-offset: 8px;
	animation: g2 linear 4000ms infinite;
}
					
.g2 span:nth-of-type(1) {animation-delay: 0ms}
.g2 span:nth-of-type(2) {animation-delay: 100ms}
.g2 span:nth-of-type(3) {animation-delay: 200ms}
.g2 span:nth-of-type(4) {animation-delay: 300ms}
.g2 span:nth-of-type(5) {animation-delay: 400ms}
.g2 span:nth-of-type(6) {animation-delay: 500ms}
.g2 span:nth-of-type(7) {animation-delay: 600ms}
.g2 span:nth-of-type(8) {animation-delay: 700ms}
.g2 span:nth-of-type(9) {animation-delay: 800ms}
.g2 span:nth-of-type(10) {animation-delay: 900ms}
					
@keyframes g2 {
	0% { text-decoration-color: Salmon }
	12.5% { text-decoration-color: LightSalmon }
	25% { text-decoration-color: Gold }
	37.5% { text-decoration-color: PaleGreen }
	50% { text-decoration-color: Turquoise }
	62.5% { text-decoration-color: MediumPurple }
	75% { text-decoration-color: Violet }
	87.5% { text-decoration-color: MediumVioletRed  }
}
				</code>
			</div>
			<!-- G3 Wavy Waves -->
			<div class="card">
				<div class="example">
					<p class="g3"><span>W</span><span>a</span><span>v</span><span>y</span><span> </span><span>w</span><span>a</span><span>v</span><span>e</span><span>s</span><p>
					<div class="class-tag">g3</div>
				</div>
				<code class="scroll">.g3 span {
	display: inline-block;
	text-decoration: underline 3px RoyalBlue;
	text-underline-offset: 12px;
	animation: g3 linear 3000ms infinite;
}
					
.g3 span:nth-of-type(1) {animation-delay: 0ms}
.g3 span:nth-of-type(2) {animation-delay: 100ms}
.g3 span:nth-of-type(3) {animation-delay: 200ms}
.g3 span:nth-of-type(4) {animation-delay: 300ms}
.g3 span:nth-of-type(5) {animation-delay: 400ms}
.g3 span:nth-of-type(6) {animation-delay: 500ms}
.g3 span:nth-of-type(7) {animation-delay: 600ms}
.g3 span:nth-of-type(8) {animation-delay: 700ms}
.g3 span:nth-of-type(9) {animation-delay: 800ms}
.g3 span:nth-of-type(10) {animation-delay: 900ms}
					
@keyframes g3 {
	0% { text-decoration-style: wavy; text-underline-offset: 8px; text-decoration-color: PowderBlue }
	5% { text-decoration-style: wavy; text-underline-offset: 0px; text-decoration-color: RoyalBlue }
	25% { text-decoration-style: solid; text-underline-offset: 12px }
	37.5% { text-decoration-color: PowderBlue }
	45% { text-decoration-color: RoyalBlue }
	87.5% { text-decoration-color: RoyalBlue }
	98% { text-decoration-color: PowderBlue}
}
				</code>
			</div>
		</div><!--end grid-->
	</container>
</section>
              
            
!

CSS

              
                .a1 {
	text-decoration-line: underline;
	text-decoration-style: solid;
	/* ▲ solid is default ▲ */
}

.a2 {
	text-decoration-line: underline;
	text-decoration-style: double;
}

.a3 {
	text-decoration-line: underline;
	text-decoration-style: dashed;
}

.a4 {
	text-decoration-line: underline;
	text-decoration-style: dotted;
}

.a5 {
	text-decoration-line: underline;
	text-decoration-style: wavy;
}

.b1 {
	text-decoration-line: underline;
}

.b2 {
	text-decoration-line: overline;
}

.b3 {
	text-decoration-line: line-through;
}

.c1 {
	text-decoration-line: underline;
	text-decoration-thickness: auto;
	/* ▲ auto is default ▲ */
}

.c2 {
	text-decoration-line: underline;
	text-decoration-thickness: from-font;
}

.c3 {
	text-decoration-line: underline;
	text-decoration-thickness: 4px;
}

.c4 {
	text-decoration-line: underline;
	text-decoration-thickness: 10%;
}

.c5 {
	text-decoration-line: underline;
	text-decoration-thickness: 0.5em;
}

.c6 {
	text-decoration-line: underline;
	text-decoration-thickness: 100%
}

.d1 {
	text-decoration-line: underline;
	text-decoration-color: currentcolor;
	/* ▲ currentcolor is default ▲ */
}

.d2 {
	text-decoration-line: underline;
	text-decoration-color: Turquoise;
}

.d3 {
	text-decoration-line: underline;
	text-decoration-color: #C55;
}

.d4 {
	text-decoration-line: underline;
	text-decoration-color: rgba(255, 128, 128, 0.5)
}

.e1 {
	text-decoration-line: underline;
	text-underline-offset: auto;
	/* ▲ auto is default ▲ */
}

.e2 {
	text-decoration-line: underline;
	text-underline-offset: from-font;
}

.e3 {
	text-decoration-line: underline;
	text-underline-offset: 8px;
}

.e4 {
	text-decoration-line: underline;
	text-underline-offset: 10%;
}

.e5 {
	text-decoration-line: underline;
	text-underline-offset: 0.5em;
}

.f1 {
	text-decoration: line-through wavy deepskyblue 4px;
}

.f3 {
	text-decoration: overline underline dotted silver 2px;
	text-underline-offset: 4px;
}

.f4 {
	text-decoration: overline line-through underline double silver 2px ;
}

.f5 {
	text-decoration: underline wavy red;
}

.g1 span {
	text-decoration: underline 2px black;
	text-underline-offset: 8px;
	animation: g1 linear 1400ms infinite forwards
}
.g1 span:nth-of-type(1) {animation-delay: 0ms}
.g1 span:nth-of-type(2) {animation-delay: 100ms}
.g1 span:nth-of-type(3) {animation-delay: 200ms}
.g1 span:nth-of-type(4) {animation-delay: 300ms}
.g1 span:nth-of-type(5) {animation-delay: 400ms}
.g1 span:nth-of-type(6) {animation-delay: 500ms}
.g1 span:nth-of-type(7) {animation-delay: 600ms}
.g1 span:nth-of-type(8) {animation-delay: 700ms}
.g1 span:nth-of-type(9) {animation-delay: 800ms}
.g1 span:nth-of-type(10) {animation-delay: 900ms}
.g1 span:nth-of-type(11) {animation-delay: 1000ms}
.g1 span:nth-of-type(12) {animation-delay: 1100ms}
.g1 span:nth-of-type(13) {animation-delay: 1200ms}
@keyframes g1 {
	0% { text-decoration-color: DarkOrange }
	10% { text-decoration-color: LightYellow}
	70% { text-decoration-color: black }
}

.g2 span {
	text-decoration: line-through 100% dotted Salmon;
	text-underline-offset: 8px;
	animation: g2 linear 4000ms infinite;
}
.g2 span:nth-of-type(1) {animation-delay: 0ms}
.g2 span:nth-of-type(2) {animation-delay: 100ms}
.g2 span:nth-of-type(3) {animation-delay: 200ms}
.g2 span:nth-of-type(4) {animation-delay: 300ms}
.g2 span:nth-of-type(5) {animation-delay: 400ms}
.g2 span:nth-of-type(6) {animation-delay: 500ms}
.g2 span:nth-of-type(7) {animation-delay: 600ms}
.g2 span:nth-of-type(8) {animation-delay: 700ms}
.g2 span:nth-of-type(9) {animation-delay: 800ms}
.g2 span:nth-of-type(10) {animation-delay: 900ms}
@keyframes g2 {
	0% { text-decoration-color: Salmon }
	12.5% { text-decoration-color: LightSalmon }
	25% { text-decoration-color: Gold }
	37.5% { text-decoration-color: PaleGreen }
	50% { text-decoration-color: Turquoise }
	62.5% { text-decoration-color: MediumPurple }
	75% { text-decoration-color: Violet }
	87.5% { text-decoration-color: MediumVioletRed  }
}

.g3 span {
	display: inline-block;
	text-decoration: underline 3px RoyalBlue;
	text-underline-offset: 12px;
	animation: g3 linear 3000ms infinite;
}
.g3 span:nth-of-type(1) {animation-delay: 0ms}
.g3 span:nth-of-type(2) {animation-delay: 100ms}
.g3 span:nth-of-type(3) {animation-delay: 200ms}
.g3 span:nth-of-type(4) {animation-delay: 300ms}
.g3 span:nth-of-type(5) {animation-delay: 400ms}
.g3 span:nth-of-type(6) {animation-delay: 500ms}
.g3 span:nth-of-type(7) {animation-delay: 600ms}
.g3 span:nth-of-type(8) {animation-delay: 700ms}
.g3 span:nth-of-type(9) {animation-delay: 800ms}
.g3 span:nth-of-type(10) {animation-delay: 900ms}
@keyframes g3 {
	0% { text-decoration-style: wavy; text-underline-offset: 8px; text-decoration-color: PowderBlue }
	5% { text-decoration-style: wavy; text-underline-offset: 0px; text-decoration-color: RoyalBlue }
	25% { text-decoration-style: solid; text-underline-offset: 12px }
	37.5% { text-decoration-color: PowderBlue }
	45% { text-decoration-color: RoyalBlue }
	87.5% { text-decoration-color: RoyalBlue }
	98% { text-decoration-color: PowderBlue}
}

/*////////////////////////////////
  Presentation / Layout Styles
////////////////////////////////*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono&display=swap');

:root {
	--white: white;
	--gray0: #F8FAFC;
	--gray1: #F1F5F9;
	--gray2: #E2E8F0;
	--gray4: #94A3B8;
	--gray5: #64748B;
	--gray7: #334155;
	--gray9: #0F172A;
	--blue: #4F46E5;
}

* {
	font-family: 'Inter', sans-serif;
}

body {
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: var(--gray1);
}

h1 {
	font-size: 32px;
	font-weight: 600;
	color: var(--gray5);
	line-height: 165%;
	padding: 100px 0px;
}

h2 {
	font-size: 28px;
	font-weight: 600;
	color: var(--gray7);
}

h3 {
	font-size: 24px;
	font-weight: normal;
	color: var(--gray7);
}

.setting-title {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
}

.setting-title div {
	height: 2px;
	width: 100%;
	margin-left: 16px;
	background-color: var(--gray5)
}

section {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
}

section:not(:first-of-type) {
	margin-top: 40px;
}

container {
	width: 920px;
	max-width: 95%;
	display: flex;
	flex-direction: column;
}

.grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-template-rows: repeat(1fr);
	grid-column-gap: 16px;
	grid-row-gap: 16px;
}

@media only screen and (max-width: 800px) {
	.grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media only screen and (max-width: 560px) {
	.grid {
		grid-template-columns: repeat(1, 1fr);
	}
}

.card {
	width: 100%;
	display: inline-flex;
	flex-direction: column;
	background-color: var(--white);
	border: 1px solid var(--gray2);
	border-radius: 6px;
	overflow: hidden;
	margin: 0px;
}

.example {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
	padding: 24px 24px;
	font-size: 18px;
	color: var(--gray9);
}

.class-tag {
	position: absolute;
	bottom: -8px;
	margin-top: -20px;
	padding: 2px 4px;
	border-radius: 2px;
	background-color: var(--gray2);
	font-size: 12px;
	color: var(--gray5)
}

.class-tag::before {
	content: 'class: '
}

code {
	white-space: pre-line;
	max-width: 100%;
	min-height: 100%;
	padding: 24px;
	background-color: var(--gray0);
	font-family: 'Roboto Mono', monospace;
	font-size: 12px;
	color: var(--gray5);
	line-height: 1.5
}

code.scroll {
	white-space: pre;
	min-height: auto;
	max-height: 180px;
	overflow-y: scroll;
}

.tip {
	grid-column: 1 / -1;
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 24px;
	background-color: var(--white);
	border: 1px solid var(--gray2);
	border-radius: 6px;
	font-family: 'Roboto Mono', monospace;
	font-size: 12px;
	color: var(--blue);
	line-height: 1.5;
}

.tip p {
	margin-left: 24px;
	font-family: 'Roboto Mono', monospace;
}





.underline p:nth-of-type(2) {
	text-decoration: underline wavy red;
}

.test1 span {
	font-size: 22px;
	text-decoration: underline 2px black;
	text-underline-offset: 8px;
	animation: test1 linear 1400ms infinite forwards
}

.test1 span:nth-of-type(1) {animation-delay: 0ms}
.test1 span:nth-of-type(2) {animation-delay: 100ms}
.test1 span:nth-of-type(3) {animation-delay: 200ms}
.test1 span:nth-of-type(4) {animation-delay: 300ms}
.test1 span:nth-of-type(5) {animation-delay: 400ms}
.test1 span:nth-of-type(6) {animation-delay: 500ms}
.test1 span:nth-of-type(7) {animation-delay: 600ms}
.test1 span:nth-of-type(8) {animation-delay: 700ms}
.test1 span:nth-of-type(9) {animation-delay: 800ms}
.test1 span:nth-of-type(10) {animation-delay: 900ms}
.test1 span:nth-of-type(11) {animation-delay: 1000ms}
.test1 span:nth-of-type(12) {animation-delay: 1100ms}
.test1 span:nth-of-type(13) {animation-delay: 1200ms}

@keyframes test1 {
	0% { text-decoration-color: DarkOrange }
	10% { text-decoration-color: LightYellow}
	70% { text-decoration-color: black }
}

.test2 span {
	font-size: 22px;
	text-decoration: line-through 100% dotted Salmon;
	text-underline-offset: 8px;
	animation: test2 linear 4000ms infinite;
}

.test2 span:nth-of-type(1) {animation-delay: 0ms}
.test2 span:nth-of-type(2) {animation-delay: 100ms}
.test2 span:nth-of-type(3) {animation-delay: 200ms}
.test2 span:nth-of-type(4) {animation-delay: 300ms}
.test2 span:nth-of-type(5) {animation-delay: 400ms}
.test2 span:nth-of-type(6) {animation-delay: 500ms}
.test2 span:nth-of-type(7) {animation-delay: 600ms}
.test2 span:nth-of-type(8) {animation-delay: 700ms}
.test2 span:nth-of-type(9) {animation-delay: 800ms}
.test2 span:nth-of-type(10) {animation-delay: 900ms}

@keyframes test2 {
	0% { text-decoration-color: Salmon }
	12.5% { text-decoration-color: LightSalmon }
	25% { text-decoration-color: Gold }
	37.5% { text-decoration-color: PaleGreen }
	50% { text-decoration-color: Turquoise }
	62.5% { text-decoration-color: MediumPurple }
	75% { text-decoration-color: Violet }
	87.5% { text-decoration-color: MediumVioletRed  }
}

.test3 span {
	font-size: 22px;
	text-decoration: underline 3px RoyalBlue;
	text-underline-offset: 12px;
	animation: test3 linear 3000ms infinite;
}

.test3 span:nth-of-type(1) {animation-delay: 0ms}
.test3 span:nth-of-type(2) {animation-delay: 100ms}
.test3 span:nth-of-type(3) {animation-delay: 200ms}
.test3 span:nth-of-type(4) {animation-delay: 300ms}
.test3 span:nth-of-type(5) {animation-delay: 400ms}
.test3 span:nth-of-type(6) {animation-delay: 500ms}
.test3 span:nth-of-type(7) {animation-delay: 600ms}
.test3 span:nth-of-type(8) {animation-delay: 700ms}
.test3 span:nth-of-type(9) {animation-delay: 800ms}
.test3 span:nth-of-type(10) {animation-delay: 900ms}

@keyframes test3 {
	0% { text-decoration-style: wavy; text-underline-offset: 8px; text-decoration-color: PowderBlue }
	5% { text-decoration-style: wavy; text-underline-offset: 0px; text-decoration-color: RoyalBlue }
	25% { text-decoration-style: solid; text-underline-offset: 12px }
	37.5% { text-decoration-color: PowderBlue }
	45% { text-decoration-color: RoyalBlue }
	87.5% { text-decoration-color: RoyalBlue }
	98% { text-decoration-color: PowderBlue}
}

.test4 {
	font-style: oblique 90deg
}
              
            
!

JS

              
                
              
            
!
999px

Console