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

Auto pesudo content fallback #18

Closed
mikestreety opened this issue Sep 3, 2015 · 4 comments
Closed

Auto pesudo content fallback #18

mikestreety opened this issue Sep 3, 2015 · 4 comments
Labels

Comments

@mikestreety
Copy link

Would love to see an extension which adds missing

content: '';

To :before/:after pseudo elements. It is always needed and unless preset, should add it.

Yet to find a post-css (or otherwise) plugin that does this.

@madeleineostoja
Copy link
Owner

I recall seeing a postcss plugin out in the wild that does this, but can’t seem to find it atm. In any case, it would be simple to do, just not sure it fits in Rucksack’s purview. I’ll leave this issue open for now though and see if anyone else would like to chime in.

@mikestreety
Copy link
Author

Yeah, there is this one: https://github.com/omgovich/postcss-pseudo-elements-content

But you have to put -c which, if you can remember/be bothered to add the extra characters, you can remember to add content: ''; 😄

@madeleineostoja
Copy link
Owner

Thinking about this a bit more, and I really can't see how it could fit into Rucksack. It's not a fallback or a replacement, and it's not a new feature. Would make a neat standalone plugin, though I don't have time to build it personally. It'd be pretty easy to do, might be a good way to learn PostCSS if you're keen ;-)

@mikestreety
Copy link
Author

Thanks @seaneking - makes sense.

For anyone stumbling across this issue - I have started development of such a plugin:

https://github.com/liquidlight/postcss-pseudo-content-insert

At time of writing, it's still very much in beta, but should be prod ready soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants