Skip to content

It's resolved now #17923

Answered by wongjn
eloraa asked this question in Help
Discussion options

You must be logged in to vote

This is a by-product of how Tailwind structures its class name rules in development. Tailwind uses CSS nesting in development. So when we have a class like lg:grid-cols-3, it generates:

.lg\:grid-cols-3 {
  @media (width >= 64rem) {
    grid-template-columns: repeat(3, minmax(0px, 1fr));
  }
}

In the case when the media query does not match, the outer class name still matches, but the inner media query does not match, so it is removed from view in devtools:

.lg\:grid-cols-3 {
  /**
   * This is removed since it does not match.
   * @media (width >= 64rem) {
   *   grid-template-columns: repeat(3, minmax(0px, 1fr));
   * }
   */
}

Thus, it turns into this:

.lg\:grid-cols-3 {
}

The outer se…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by eloraa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #17922 on May 08, 2025 08:24.