-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
What version of Tailwind CSS are you using?
3.0.2
What build tool (or framework if it abstracts the build tool) are you using?
- [email protected]
- [email protected]
- nextjs or postcss-cli or [email protected]
What version of Node.js are you using?
- Node v14.16.1
What browser are you using?
Chrome, Firefox
What operating system are you using?
macOS and Windows
Reproduction URL
https://github.com/widemeshio/bug-tailwind-v3-leading-vs-text-height
Describe your issue
In a brand new Next.js project(or also legacy using v3 and gulp with postcss),
leading-loose css classes are generated before screen size variants(md, xl, etc) so because what matters is the order in which the css classes are defined not in the order they're used in class="", its currently not possible to do something like lg:text-6xl leading-loose because lg:text-6xl's line-height takes priority. text-6xl leading-loose works though, so this is specific about screen size variants.
Example code:
<main className="w-1/4">
<h3 className="text-6xl leading-loose text-green-600">
text-6xl + leading (OK)
</h3>
<h3 className="lg:text-6xl leading-loose text-red-600">
lx:text-6xl + leading (Buggy)
</h3>
</main>Inspector:
Page View:

