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

Skip transformation #1

Closed
niksy opened this issue May 24, 2015 · 7 comments
Closed

Skip transformation #1

niksy opened this issue May 24, 2015 · 7 comments

Comments

@niksy
Copy link

niksy commented May 24, 2015

Is there any way of skipping transformation for particular selectors (e.g. you only want to have :hover styles)?

@ai
Copy link
Member

ai commented May 24, 2015

Yeap, I think skipping will be useful. But what API we should use?

input:only-hover {}
/* postcss-focus: disable */
input:only-hover {}

What do you think?

@ai ai added the enhancement label May 24, 2015
@niksy
Copy link
Author

niksy commented May 25, 2015

:only-hover sounds nice, didn’t think of that! But, following currently available pseudo selectors, maybe parsing something like :hover:not(:focus) could produce only :hover styles? Or is this something too complicated?

@ai
Copy link
Member

ai commented May 25, 2015

@niksy :hover:not(:focus) is awesome idea!

Do you want to make a PR? (I will be able to fix it only in Wednesday)

@niksy
Copy link
Author

niksy commented May 25, 2015

@ai looking at it more closely, :hover:not(:focus) maybe doesn’t represent something which will produce desired output—it just isn’t clear enough, it means that hover styles should be applied only when focus is not active. :only-hover probably gives more expecting end result.

I had similar idea for this plugin some time ago and was delighted to see you created something like that. My idea was to create new pseudo selector, :fover (as in focus+hover) which will do this, and could also remove outline as described in #2. Is going the route of new pseudo selector something you would consider?

@ai
Copy link
Member

ai commented May 25, 2015

@niksy postcss-fover is a nice solution too. We can crosslink each other.

@niksy
Copy link
Author

niksy commented Jun 15, 2015

@ai There is a new PostCSS plugin which does exactly this with :enter pseudo class https://github.com/jonathantneal/postcss-pseudo-class-enter

@ai
Copy link
Member

ai commented Jun 15, 2015

Done 904572b

@ai ai closed this as completed Jun 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants