-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
@apply with custom classes and focus in shared class don't work #2815
Comments
Umm, you need to add the class .button to it... |
Nope, I don't think so! |
No that's not how that works you need to add both classes check out: https://tailwindcss.com/docs/functions-and-directives |
Then please open this part in the docs for Tailwind 2.0 and check section with "Any rules inlined with @apply will have !important removed by default to avoid specificity issues" - it shows |
At first glance this looks like a bug to me for sure, will investigate. |
Thanks @benji014628 ! I don't understand why, but yeah, you're right. I will leave this open for now. I would love to see someone explaining why.
|
Thanks @adamwathan ! |
I've pushed up a failing test for this, hoping to have time to look at it next week. If someone feels like working on it and submitting a PR of course that's welcome too! |
Hey! This is now fixed and will be available in the next version! Relevant PR: #2832 |
Describe the problem:
When I create a
.button
class and.button-yellow
that extends.button
, as soon as I addfocus:
to.button
class, TailwindCSS removes padding. Movingfocus:
to.button-yellow
class fixes it. Why?I would expect
focus:
to work either way.Error - no padding:
Good - padding is in:
Link to a minimal reproduction:
Tailwind Play example
The text was updated successfully, but these errors were encountered: