Adam Wathan Profile picture
Sep 17, 2020 4 tweets 2 min read Read on X
Four hours of trying to build an "unprose" feature for the Tailwind typography plugin and I have determined that it is essentially impossible.

The inevitable conclusion is "create a CSS variable for every inheritable property" which is just, no. Image
Selectors like this get you very close, but the nail in the coffin is anything added to the `prose` class itself that is inheritable: Image
These styles are inherited to children even if you stick an `unprose` in between and there's literally nothing you can do about it beyond `all: initial` (unset maintains the inheritance), which also overrides reset styles you _do_ want to preserve from elsewhere in your CSS. Image
If anyone wants to play with it I've got a branch here:

github.com/tailwindlabs/t…

...but can't invest any more time into it unfortunately right now. Hard friggin' problem.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Adam Wathan

Adam Wathan Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @adamwathan

Feb 14
A ton of confusion amongst Tailwind users comes from not realizing that if you are using CSS modules, or