-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support for additional state prefixes and customizing which utilities have state variants #136
Comments
Now that we have the ability to easily customize which states are available for which utility modules, I want to start thinking about what other states make sense to include and which ones we should say "you should make a component" for. We currently have I'm thinking
That said, it's absolutely trivial to support all of these and we can keep them all disabled by default, so maybe it just doesn't matter at all? |
I think it would be indeed a good idea to implement them, but disable the lesser common ones by default. |
what’s about before/after pseudo elements? |
I get the thought process behind |
|
I really want to add this but seriously I have no idea how to do so. Never messed with postCSS and I can't figure where the hover and focus states are generated. Guess it's done by postCSS itself, with Hoverable.js? |
|
@LasseRafn I've got an open pull request (#379) for the |
I feel like |
Focus and active are now supported, with no concrete plans to support other states right now, so going to close this. Happy to discuss |
No plans to support |
What's the compelling use-case? Not opposed to it but have never found myself needing it personally. |
Something like:
|
Cool, so I can't help but feel like that's ultimately better solved with additional colors instead of extra overlay elements vs. adding another complex-ish variant :/ Or even implementing these overlays as single color background gradients, so you can stack them as background images on top? |
Any reactions to before and after pseudoelements? #136 (comment) |
Just because I haven't seen it mentioned anywhere else, the reason I went looking for a 👇 All the inputs here are disabled and would have red text <fieldset disabled>
<input class="disabled:text-red" />
<input class="disabled:text-red" />
<button class="disabled:text-red" type="submit" />
</fieldset> This is a much more convenient way to disable everything while the form is submitting than passing |
@kimroen Great argument, didn't know about that! I'll add |
Hi guys, I just wanted to know if there was anything new about 'before' and 'after' pseudo elements ? |
+1 for group-active |
+1 for group-active. Really wish it was available. The web would be a better place if more people set styles for :active. |
Hey @arndeash, the Take a look at the documentation for more information on plugins. |
@adamwathan |
Consolidating #27, #121, #125.
Right now we only support
hover:{utility}
state variants and only for the following modules:It would be great to also add support for other states:
active:
focus:
placeholder:
, although this is a bit differentdisabled:
valid:
invalid:
required:
(We may not add support for all of these, but listing ideas for reference.)
It would also be great to allow customizing which modules have these variants enabled, as enabling all of these for every utility would quickly bloat the outputted CSS.
We have plans for all of this, but this issue will serve as a single point of reference so we can keep duplicate issues under control.
The text was updated successfully, but these errors were encountered: