Text

Example typography use throughout the website.

<div class="typography">
    <h1>Typography</h1>
    <p>A plugin that provides a <code>typography</code> class you can use to add sensible typographic defaults to any
        vanilla HTML you don't control (like HTML rendered from Markdown, or pulled from a CMS).</p>
    <p>What follows is just a big block of example content designed to dogfood the plugin.</p>
    <p>It includes every sensible typographic element I could think of, like <strong>bold text</strong>, unordered
        lists, ordered lists, code blocks, block quotes, <em>and even italics</em>.</p>
    <p>It's important to cover all of these use cases for a few reasons:</p>
    <ol>
        <li>We want everything to look good out of the box.</li>
        <li>Really just the first reason, that's the whole point of the plugin.</li>
    </ol>
    <p>Now we're going to try out a header style.</p>
    <h2>Typography should be easy</h2>
    <p>So that's a header for you — with any luck by the time I'm done writing this plugin that will look pretty
        reasonable.</p>
    <p>Something a wise person once told me about typography is:</p>
    <blockquote>
        <p>Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be
            bad.</p>
    </blockquote>
    <p>It's probably important that images look okay here by default as well:</p>
    <p>
        <img src="https://images.unsplash.com/photo-1556740758-90de374c12ad?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=1000&amp;q=80" alt="Someone paying for something at a check out counter" title="" />
    </p>
    <p>Now I'm going to show you an example of an unordered list to make sure that looks good, too:</p>
    <ul>
        <li>So here is the first item in this list.</li>
        <li>In this example we're keeping the items short.</li>
        <li>Later, we'll use longer, more complex list items.</li>
    </ul>
    <p>And that's the end of this section.</p>
    <h2>What if we stack headings?</h2>
    <h3>We should make sure that looks good, too.</h3>
    <p>Sometimes you have headings directly underneath each other. In those cases you have to be careful not to use too
        much margin, because typically the space you need between a heading and a paragraph is more than you want
        between two headings.</p>
    <h3>When a heading comes after a paragraph...</h3>
    <p>When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see
        what a more complex list would look like.</p>
    <ul>
        <li>
            <p><strong>I often do this thing where list items have headings.</strong></p>
            <p>For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the
                styles right.</p>
            <p>I often have two or three paragraphs in these list items too, so the hard part is getting the spacing
                between the paragraphs, list item heading, and separate list items to all make sense.</p>
            <p>Pretty tough honestly.</p>
        </li>
        <li>
            <p><strong>Since this is a list, I need at least two items.</strong></p>
            <p>I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only
                had one item, and we really want this to look realistic.</p>
            <p>That's why I've added this second list item so I actually have something to look at when writing the
                styles.</p>
        </li>
        <li>
            <p><strong>It's not a bad idea to add a third item either.</strong></p>
            <p>I think it probably would've been fine to just use two items but three is definitely not worse, and since
                I seem to be having no trouble making up arbitrary things to type, I might as well include it.</p>
            <p>With any luck this will make it even easier for me to get the styles right.</p>
        </li>
    </ul>
    <p>After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping
        right to a heading.</p>
    <h3>What about nested lists?</h3>
    <p>Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess
        since some of you goofballs are going to do it I have to carry the burden of at least making it work.</p>
    <ol>
        <li><strong>Nested lists are rarely a good idea.</strong>
            <ul>
                <li>You might feel like you are being really "organized" or something but you are just creating a gross
                    shape on the screen that is hard to read.</li>
                <li>Nested navigation in UIs is a bad idea too, keep things as flat as possible.</li>
                <li>Nesting tons of folders in your source code is also not helpful.</li>
            </ul>
        </li>
        <li><strong>Since we need to have more items, here's another one.</strong>
            <ul>
                <li>I'm not sure if I'll bother styling more than two levels deep.</li>
                <li>Two is already too much, three is guaranteed to be a bad idea.</li>
                <li>If you nest four levels deep you belong in prison.</li>
            </ul>
        </li>
        <li><strong>Two items isn't really a list, three is good though.</strong>
            <ul>
                <li>Again please don't nest lists if you want people to actually read your content.</li>
                <li>Nobody wants to look at this.</li>
                <li>I'm upset that I even have to bother styling this.</li>
            </ul>
        </li>
    </ol>
    <p>The most annoying thing about lists in Markdown is that <code>&lt;li&gt;</code> elements aren't given a child
        <code>&lt;p&gt;</code> tag unless there are multiple paragraphs in the list item. That means I have to worry
        about styling that annoying situation too.
    </p>
    <ul>
        <li>
            <p><strong>For example, here's another nested list.</strong></p>
            <p>But this time with a second paragraph.</p>
            <ul>
                <li>These list items won't have <code>&lt;p&gt;</code> tags</li>
                <li>Because they are only one line each</li>
            </ul>
        </li>
        <li>
            <p><strong>But in this second top-level list item, they will.</strong></p>
            <p>This is especially annoying because of the spacing on this paragraph.</p>
            <ul>
                <li>
                    <p>As you can see here, because I've added a second line, this list item now has a
                        <code>&lt;p&gt;</code> tag.
                    </p>
                    <p>This is the second line I'm talking about by the way.</p>
                </li>
                <li>
                    <p>Finally here's another list item so it's more like a list.</p>
                </li>
            </ul>
        </li>
        <li>
            <p>A closing list item, but with no nested list, because why not?</p>
        </li>
    </ul>
    <p>And finally a sentence to close off this section.</p>
    <h2>There are other elements we need to style</h2>
    <p>I almost forgot to style links, like <a href="https://tailwindcss.com">this link to the Tailwind CSS website</a>.
        How should those look by default, blue I guess? I dunno.</p>
    <p>We also need to make sure inline code looks good, like if I wanted to talk about <code>&lt;span&gt;</code>
        elements or tell you the good news about <code>@tailwindcss/typography</code>.</p>
    <h4>We haven't used an <code>h4</code> yet</h4>
    <p>But now we have. Please don't use <code>h5</code> or <code>h6</code> in your content, Medium only supports two
        heading levels for a reason you animals.</p>
    <h3>We still need to think about stacked headings though.</h3>
    <h4>Let's make sure we don't screw that up with <code>h4</code> elements, either.</h4>
    <p>Phew, with any luck we have styled the headings above this text and they look pretty good.</p>
    <p>Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want
        things to end that way but I have to assume it's because I think things will look weird or unbalanced if there
        is a heading too close to the end of the document.</p>
    <p>What I've written here is probably long enough, but adding this final sentence can't hurt.</p>
</div>
<div class="typography">
    <h1>Typography</h1>
    <p>A plugin that provides a <code>typography</code> class you can use to add sensible typographic defaults to any
        vanilla HTML you don't control (like HTML rendered from Markdown, or pulled from a CMS).</p>
    <p>What follows is just a big block of example content designed to dogfood the plugin.</p>
    <p>It includes every sensible typographic element I could think of, like <strong>bold text</strong>, unordered
        lists, ordered lists, code blocks, block quotes, <em>and even italics</em>.</p>
    <p>It's important to cover all of these use cases for a few reasons:</p>
    <ol>
        <li>We want everything to look good out of the box.</li>
        <li>Really just the first reason, that's the whole point of the plugin.</li>
    </ol>
    <p>Now we're going to try out a header style.</p>
    <h2>Typography should be easy</h2>
    <p>So that's a header for you — with any luck by the time I'm done writing this plugin that will look pretty
        reasonable.</p>
    <p>Something a wise person once told me about typography is:</p>
    <blockquote>
        <p>Typography is pretty important if you don't want your stuff to look like trash. Make it good then it won't be
            bad.</p>
    </blockquote>
    <p>It's probably important that images look okay here by default as well:</p>
    <p>
        <img src="https://images.unsplash.com/photo-1556740758-90de374c12ad?ixlib=rb-1.2.1&amp;ixid=eyJhcHBfaWQiOjEyMDd9&amp;auto=format&amp;fit=crop&amp;w=1000&amp;q=80"
            alt="Someone paying for something at a check out counter" title="" />
    </p>
    <p>Now I'm going to show you an example of an unordered list to make sure that looks good, too:</p>
    <ul>
        <li>So here is the first item in this list.</li>
        <li>In this example we're keeping the items short.</li>
        <li>Later, we'll use longer, more complex list items.</li>
    </ul>
    <p>And that's the end of this section.</p>
    <h2>What if we stack headings?</h2>
    <h3>We should make sure that looks good, too.</h3>
    <p>Sometimes you have headings directly underneath each other. In those cases you have to be careful not to use too
        much margin, because typically the space you need between a heading and a paragraph is more than you want
        between two headings.</p>
    <h3>When a heading comes after a paragraph...</h3>
    <p>When a heading comes after a paragraph, we need a bit more space, like I already mentioned above. Now let's see
        what a more complex list would look like.</p>
    <ul>
        <li>
            <p><strong>I often do this thing where list items have headings.</strong></p>
            <p>For some reason I think this looks cool which is unfortunate because it's pretty annoying to get the
                styles right.</p>
            <p>I often have two or three paragraphs in these list items too, so the hard part is getting the spacing
                between the paragraphs, list item heading, and separate list items to all make sense.</p>
            <p>Pretty tough honestly.</p>
        </li>
        <li>
            <p><strong>Since this is a list, I need at least two items.</strong></p>
            <p>I explained what I'm doing already in the previous list item, but a list wouldn't be a list if it only
                had one item, and we really want this to look realistic.</p>
            <p>That's why I've added this second list item so I actually have something to look at when writing the
                styles.</p>
        </li>
        <li>
            <p><strong>It's not a bad idea to add a third item either.</strong></p>
            <p>I think it probably would've been fine to just use two items but three is definitely not worse, and since
                I seem to be having no trouble making up arbitrary things to type, I might as well include it.</p>
            <p>With any luck this will make it even easier for me to get the styles right.</p>
        </li>
    </ul>
    <p>After this sort of list I usually have a closing statement or paragraph, because it kinda looks weird jumping
        right to a heading.</p>
    <h3>What about nested lists?</h3>
    <p>Nested lists basically always look bad which is why editors like Medium don't even let you do it, but I guess
        since some of you goofballs are going to do it I have to carry the burden of at least making it work.</p>
    <ol>
        <li><strong>Nested lists are rarely a good idea.</strong>
            <ul>
                <li>You might feel like you are being really "organized" or something but you are just creating a gross
                    shape on the screen that is hard to read.</li>
                <li>Nested navigation in UIs is a bad idea too, keep things as flat as possible.</li>
                <li>Nesting tons of folders in your source code is also not helpful.</li>
            </ul>
        </li>
        <li><strong>Since we need to have more items, here's another one.</strong>
            <ul>
                <li>I'm not sure if I'll bother styling more than two levels deep.</li>
                <li>Two is already too much, three is guaranteed to be a bad idea.</li>
                <li>If you nest four levels deep you belong in prison.</li>
            </ul>
        </li>
        <li><strong>Two items isn't really a list, three is good though.</strong>
            <ul>
                <li>Again please don't nest lists if you want people to actually read your content.</li>
                <li>Nobody wants to look at this.</li>
                <li>I'm upset that I even have to bother styling this.</li>
            </ul>
        </li>
    </ol>
    <p>The most annoying thing about lists in Markdown is that <code>&lt;li&gt;</code> elements aren't given a child
        <code>&lt;p&gt;</code> tag unless there are multiple paragraphs in the list item. That means I have to worry
        about styling that annoying situation too.</p>
    <ul>
        <li>
            <p><strong>For example, here's another nested list.</strong></p>
            <p>But this time with a second paragraph.</p>
            <ul>
                <li>These list items won't have <code>&lt;p&gt;</code> tags</li>
                <li>Because they are only one line each</li>
            </ul>
        </li>
        <li>
            <p><strong>But in this second top-level list item, they will.</strong></p>
            <p>This is especially annoying because of the spacing on this paragraph.</p>
            <ul>
                <li>
                    <p>As you can see here, because I've added a second line, this list item now has a
                        <code>&lt;p&gt;</code> tag.</p>
                    <p>This is the second line I'm talking about by the way.</p>
                </li>
                <li>
                    <p>Finally here's another list item so it's more like a list.</p>
                </li>
            </ul>
        </li>
        <li>
            <p>A closing list item, but with no nested list, because why not?</p>
        </li>
    </ul>
    <p>And finally a sentence to close off this section.</p>
    <h2>There are other elements we need to style</h2>
    <p>I almost forgot to style links, like <a href="https://tailwindcss.com">this link to the Tailwind CSS website</a>.
        How should those look by default, blue I guess? I dunno.</p>
    <p>We also need to make sure inline code looks good, like if I wanted to talk about <code>&lt;span&gt;</code>
        elements or tell you the good news about <code>@tailwindcss/typography</code>.</p>
    <h4>We haven't used an <code>h4</code> yet</h4>
    <p>But now we have. Please don't use <code>h5</code> or <code>h6</code> in your content, Medium only supports two
        heading levels for a reason you animals.</p>
    <h3>We still need to think about stacked headings though.</h3>
    <h4>Let's make sure we don't screw that up with <code>h4</code> elements, either.</h4>
    <p>Phew, with any luck we have styled the headings above this text and they look pretty good.</p>
    <p>Let's add a closing paragraph here so things end with a decently sized block of text. I can't explain why I want
        things to end that way but I have to assume it's because I think things will look weird or unbalanced if there
        is a heading too close to the end of the document.</p>
    <p>What I've written here is probably long enough, but adding this final sentence can't hurt.</p>
</div>