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

Feature requests: selectors to ignore, write to separate files #27

Open
kctdfh opened this issue Mar 29, 2022 · 0 comments
Open

Feature requests: selectors to ignore, write to separate files #27

kctdfh opened this issue Mar 29, 2022 · 0 comments

Comments

@kctdfh
Copy link

kctdfh commented Mar 29, 2022

Thanks a lot for this - helps us a ton!

Two features you may want to consider:

1/ An ignore option that leaves the :hover psudo unwrapped if the CSS rule mentions a specific set of selectors. So lets say we want to have our menu links show the hover state even on touch-screens. We'd write our CSS for .always-hover .menu-link:hover instead of .menu-link:hover and add .always-hover to the ignore option. Any CSS rule mentioning .always-hover as a combination class of or as a parent of a :hover element would not be wrapped.

2/ I don't know if this is possible outside of a CLI but it'd be nice to instead of wrapping the CSS rules, we could just export them to a different stylesheet and remove them from the source stylesheet. Like this, we could use the media="hover" attribute on our <link> tags to reduce the size of the CSS request if the user cannot hover.

Cheers!

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

No branches or pull requests

1 participant