PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Written By
Views

TailwindCSS Ignore Typography

TailwindCSS Ignore Typography

TailwindCSS has an excellent typography plugin that allows you to stylize a set of elements by applying a simple class .prose to the parent container.

The Typography plugin can make a boring piece of content look amazing and easy to read. Perhaps a little demo might help. Take a look at this codepen 👇

Now, take a look at this same content that uses the typography plug-in 🧙‍♂️

Pretty cool, right!


But, what happens when you want to dyanmically include a partial or a component in the middle of your article. The content inside the component or partial will have all the .prose styles applied by default...

Well, thanks to the awesome Tailwind team, you can easily override this by applying the class of .not-prose to the parent element and all children inside will not be stylized (allowing you to apply your own styles). Here is a quick example:

You can see that the first <ul> element has the .not-prose class applied and it does not have the default styles applied by the typography plug-in 👏

You can learn more about the official PR of this feature here https://github.com/tailwindlabs/tailwindcss-typography/pull/205 🤙

Comments (1)

loading comments