Skip to content

Instantly share code, notes, and snippets.

@anon987654321
Created July 8, 2025 14:33
Show Gist options
  • Save anon987654321/c378a46112009c355f218ca597560b55 to your computer and use it in GitHub Desktop.
Save anon987654321/c378a46112009c355f218ca597560b55 to your computer and use it in GitHub Desktop.
Typography Quote
<blockquote>
<p>Big type, even huge type, can be beautiful and useful. But poise is usually far&nbsp;more important than size – and poise consists primarily of emptiness. Typographically, poise is&nbsp;made of&nbsp;white&nbsp;space.</p>
<footer>Robert Bringhurst</footer>
</blockquote>
//For what it's worth, you can replace the quote with one of your own. As long as each paragraph is marked up properly and the author attribution is in the <footer> element, the quotes will still function the same way!
body {
display: flex;
align-items: center;
justify-content: space-around;
height: 100vh;
font-family: 'EB Garamond', serif;
background-color: #fff;
padding: 0 2em;
box-sizing: border-box;
margin: 0;
}
blockquote {
margin: 0;
padding: 0;
position: relative;
width: 60%;
min-width: 400px;
max-width: 820px;
font-size: 1.25vw;
line-height: 1.4;
text-rendering: optimizeLegibility;
font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
-moz-osx-fon-smoothing: grayscale;
}
blockquote p:first-of-type:before {
content: '\201c';
position: absolute;
left: -.5em;
}
blockquote p:last-of-type:after {
content: '\201d';
position: absolute;
}
blockquote footer {
position: relative;
}
blockquote footer:before {
content: '–';
position: absolute;
left: -.6em;
}
@media screen and (max-width: 1600px) {
blockquote {
font-size: 2vw;
}
}
@media all and (max-width: 1200px) {
blockquote {
font-size: 2.5vw;
}
}
@media all and (max-width: 600px) {
blockquote {
font-size: 18px;
}
blockquote {
width: 100%;
min-width: 100%;
}
}

Typography Quote

Just a simple experiment with web typography involving web fonts, flex and newer sizing units. Including punctuation that hangs into the margin! By one of my favorite authors, Robert Bringhurst.

A Pen by Josh Collinsworth on CodePen.

License.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment