Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nested style have redundant CSS #9644

Merged
merged 4 commits into from Oct 24, 2022
Merged

Fix nested style have redundant CSS #9644

merged 4 commits into from Oct 24, 2022

Conversation

KhooHaoYit
Copy link
Contributor

@KhooHaoYit KhooHaoYit commented Oct 23, 2022

This PR fixes the way how a nested style gets generated using max-screen

The bug occurred because it tries to use the container without cloning it first

This PR also includes a test to check for this bug in the future

Expected result:

@media not all and (min-width: 768px) {
  .max-md\:2-wide-grid {
    display: grid;
  }
  .max-md\:2-wide-grid > * {
    grid-column: span 2;
  }
}

Actual result:

@media not all and (min-width: 768px) {
  .max-md\:2-wide-grid {
    display: grid;
  }
  @media not all and (min-width: 768px) {
    .max-md\:2-wide-grid {
      display: grid;
    }
  }
  .max-md\:2-wide-grid > * {
    grid-column: span 2;
  }
}

@thecrypticace thecrypticace merged commit 0bdd19a into tailwindlabs:master Oct 24, 2022
@thecrypticace
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants