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

              
                <h1 class="heading main">Should you use <code>text-emphasis</code> CSS Property for your headlines?</h1>

<p>Using <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/text-emphasis" target="_blank"><code>text-emphasis</code></a> to highlight your headlines might not be the best idea outside of East Asian languages or monospace fonts.</p>

<hr>

<h2 class="heading helloworld">Why is that?</h2>
<p>It looks unbalanced and messy, to be honest, as the emphasis spacing isn't uniform but instead follows characters.</p>

<hr>

<h2 class="heading doublecircle">Really?</h2>
<p>Yes, depending on the style you're using, it can look pretty bad, particularly when the shapes start to overlap.</p>

<hr>

<h2 class="heading uppercase">Uppercased?</h2>
<p>You can sort of get away with it if you're using uppercase text style.</p>

<hr>

<h2 class="heading monospace">Monospaced?</h2>
<p>Monospace fonts should look reasonably well, as the emphasis is evenly spaced, just like the text characters.</p>

<hr>

<h2 class="heading east">こんにちは世界</h2>
<p>The <code>text-emphasis</code> property is mainly intended for use with East Asian languages; in this case, it looks pretty good.</p>

<hr>

<h2 class="heading">Conclusion</h2>
<p>Avoid using <code>text-emphasis</code> to spice up your headlines unless you're using East Asian languages, monospace fonts, or, in some cases, uppercase style.</p>

<hr>

<p class="author">
	Zoran Jambor
	<br>
	CSS Weekly

	<br>
<p>

<ul>
	<li><a href="https://css-weekly.com" target="_blank">Newsletter</a></li>
	<li><a href="https://stickers.css-weekly.com" target="_blank">CSS Stickers</a></li>
	<li><a href="https://youtube.com/@cssweekly" target="_blank">YouTube Channel</a></li>
	<li><a href="https://masteringlinting.com" target="_blank">Mastering Linting</a></li>
	<li><a href="https://twitter.com/@cssweekly" target="_blank">Twitter</a></li>
</ul>
              
            
!

CSS

              
                body {
	padding: 2rem;
	padding-block-end: 5rem;
	min-block-size: 100vb;
	box-sizing: border-box;
	line-height: 1.5;
	font-size: 1.4rem;
	font-family: sans-serif;
	background: linear-gradient(
    120deg, 
    hsl(260 90% 45%), 
    hsl(0 100% 45%)
  );
  color: hsl(261deg 100% 95% / 95%);
	text-align: center;
}

a {
	color: hsl(261deg 70% 90% / 95%);
}

a:hover {
	color: hsl(261deg 70% 100%)
}

p {
	margin-block: 2rem;
	margin-inline: auto;
	max-inline-size: 40ch;
	text-wrap: balance;
}

.author {
	margin-block-start: 2.5rem;
}

hr {
	margin-block-start: 3rem; 
	opacity: 0.3;
	inline-size: 10rem;
}

@counter-style emoji {
  system: cyclic;
  symbols: 💌 🏷️ 📺 🎓 🐦;
  suffix: " ";
}

ul {
	display: block flex;
	margin-block: -1rem;
	margin-inline: auto;
	padding-inline: 3.5rem 1.5rem;
	padding-block: 1.3rem;
	max-inline-size: fit-content;
	list-style: emoji;
	flex-direction: column;
	max-inline-size: fit-content;
	border: 1px dashed hsl(0 0% 100% / 0.3);
	border-block-start: none;
}

li {
	margin: 0;
	inline-size: fit-content;
	text-align: start;
}

/* DEMO CODE */

.heading {
	margin-block: 2rem;
	margin-inline: auto;
	max-inline-size: 50ch;
	text-wrap: balance;
	font-size: 3rem;
	color: hsl(261deg 100% 100% / 95%);
	text-emphasis-style: triangle;
	text-emphasis-color: yellow;
	text-emphasis-position: under left;
}

.main {
	font-size: 3rem;
	line-height: 1.1;
	text-emphasis-style: open;
}

.doublecircle {
		text-emphasis-style: double-circle open;
}

.uppercase {
	font-size: 3rem;
	text-transform: uppercase;
	text-emphasis-style: double-circle;
}

.monospace {
	margin-block: 2.5rem 1rem;
	font-family: monospace;
	text-emphasis-style: filled sesame;
	text-emphasis-position: over right;
}

.monospace + p {
	margin-block-start: 1rem;
}

.east {
	margin-block: 3rem 1rem;
	text-emphasis-style: '🌟';
	text-emphasis-position: over right;
}

.east + p {
	margin-block-start: 1rem;
}

@media screen and (max-width: 30rem) {
	html {
		font-size: 0.7rem;
	}
	
	.main {
		font-size: 2.2rem;
	}
}
              
            
!

JS

              
                
              
            
!
999px

Console