-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
3.0.12 gives non-applicable warning about @apply #6989
Comments
Can also confirm I don't see this error after reverting to 3.0.11. |
Hey, thanks for the report and reproduction! Unfortunately, this is working as intended. The workaround should be fairly simple: split the So, what's going on then?
.italic, i, cite, em, var, address, dfn, h3, .h3, h5, .h5 {
/* clipped */
}
h3, .h3, h5, .h5 {
@apply italic;
} This coupled with the fact that For example, these two selectors while seemingly separate, are not (h/t @RobinMalfait for the example): /* <div class="a">This will **not** be red</div> */
.a, .b::unknown-and-broken-thing { color: red; }
/* <div class="a">This **will** be red</div> */
.a { color: red; }
.b::unknown-and-broken-thing { color: red; } Since the browser doesn't know about You can read even more details on how apply works in this comment: #6451 (comment) Hopefully that answers your question — if you have more questions please feel free to comment. |
@thecrypticace Much obliged, sir. Giving |
Long-story short: apply got better at detecting these cases and also applying css when defined with rules like |
@thecrypticace We have some cases which also have broken in the 3.0.12 upgrade. The following is an example where
How could this be handled correctly following this update? |
What version of Tailwind CSS are you using?
Tailwind version: 3.0.12
What build tool (or framework if it abstracts the build tool) are you using?
@11ty/eleventy 1.0.0, postcss 8.4.5, postcss-cli 9.1.0
What version of Node.js are you using?
14.16.0
What browser are you using?
N/A
What operating system are you using?
macOS 12.1
Reproduction URL
https://github.com/brycewray/eleventy_site (Note: trying to run that repo right now is problematic due to an apparent bug in Eleventy 1.0.0.)
Describe your issue
When running a build for dev or production, Tailwind generates the following error message:
. . . which didn't occur before 3.0.12. The CSS to which it apparently objects is there to handle the peculiarities of using the variable version of the Inter font for both regular and oblique/italic text. But here's the thing: that particular CSS doesn't use
@apply
:While I can get around this by using a different font which doesn't require this kind of babying 😄 I would guess that this issue's having cropped up in 3.0.12, and never before, is something worth noting.
The text was updated successfully, but these errors were encountered: