Japan tour featured image

Japan Tour - Discover a new part of world

trending
11.09.2021
by admin
2 comments
5 min read time

Until now, trying to style an article, document, or blog post with Tailwind has been a tedious task that required a keen eye for typography and a lot of complex custom CSS.

By default, Tailwind removes all of the default browser styling from paragraphs, headings, lists and more. This ends up being really useful for building application UIs because you spend less time undoing user-agent styles, but when you really are just trying to style some content that came from a rich-text editor in a CMS or a markdown file, it can be surprising and unintuitive.

We get lots of complaints about it actually, with people regularly asking us things like:

Why is Tailwind removing the default styles on my h1 elements? How do I disable this? What do you mean I lose all the other base styles too?

We hear you, but we're not convinced that simply disabling our base styles is what you really want. You don't want to have to remove annoying margins every time you use a p element in a piece of your dashboard UI. And I doubt you really want your blog posts to use the user-agent styles either — you want them to look awesome, not awful.

That's why today we're excited to release @tailwindcss/typography — a plugin that gives you what you actually want, without any of the downside of doing something stupid like disabling our base styles.

It adds a new set of prose classes that you can slap on any block of vanilla HTML content and turn it into a beautiful, well-formatted document:

<article class="prose lg:prose-xl">
  <h1>Garlic bread with cheese: What the science tells us</h1>
  <p>
    For years parents have espoused the health benefits of eating garlic bread with cheese to their
    children, with the food earning such an iconic status in our culture that kids will often dress
    up as warm, cheesy loaf for Halloween.
  </p>
  <p>
    But a recent study shows that the celebrated appetizer may be linked to a series of rabies cases
    springing up around the country.
  </p>
  <!-- ... -->
</article>

So how does it actually look? Well you're looking at it right now — we use it to style the content on this very blog!

Check out the documentation to learn more and try it out today.

Comments

Showing 1–2 of 2 comments

Elicia
11.09.2021

Lorem ipsum dolor sit amet, consectetur adipiscing elit ut aliquam, purus sit amet luctus venenatis, lectus magna fringilla urna, porttitor rhoncus dolor purus non enim praesent elementum facilisis leo, vel

Reply
John Doe
11.09.2021

Lorem ipsum dolor sit amet, consectetur adipiscing elit ut aliquam, purus sit amet luctus venenatis, lectus magna fringilla urna, porttitor rhoncus dolor purus non enim praesent elementum facilisis leo, vel

Reply

Leave a comment

Recent posts

Best Europe water falls to visit this summer
Europe
11.09.2021
by admin
12

Best Europe water falls to visit this summer

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ac praesent etiam mattis quis a risus, justo, vel. Suspendisse sem sit nunc, ullamcorper hendrerit vel eu sapien. Eros diam adipiscing nec,

Read more
Going to Egypt, here is what you need to know.
Travel
21.11.2020
by Stela
0

Going to Egypt, here is what you need to know.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ac praesent etiam mattis quis a risus, justo, vel. Suspendisse sem sit nunc, ullamcorper hendrerit vel eu sapien. Eros diam adipiscing nec,

Read more
How to make awesome trip photos for your Instagram.
Instagram
21.11.2020
by admin
0

How to make awesome trip photos for your Instagram.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ac praesent etiam mattis quis a risus, justo, vel. Suspendisse sem sit nunc, ullamcorper hendrerit vel eu sapien. Eros diam adipiscing nec,

Read more
Paris is the city of love, here are some restaurants.
Trending
01.04.2019
by Geo
0

Paris is the city of love, here are some restaurants.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ac praesent etiam mattis quis a risus, justo, vel. Suspendisse sem sit nunc, ullamcorper hendrerit vel eu sapien. Eros diam adipiscing nec,

Read more
Russia trip report, what you need to know.
Travel
11.11.2018
by Alex
0

Russia trip report, what you need to know.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ac praesent etiam mattis quis a risus, justo, vel. Suspendisse sem sit nunc, ullamcorper hendrerit vel eu sapien. Eros diam adipiscing nec,

Read more

Getting in touch is simpler than ever

Leave us your email address and we contact you back