-
-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add mixins by new proposal #203
Comments
This one require postcss v5, will add that after #202 |
For any who land here, it looks as though #208 is the new issue that needs to be resolved before this lands. |
Hey MoOx - we are very excited about the function. do you have a timeline for it? Thanks ;-) |
I think Mixin is very useful. This is a simple example: :root {
--clearfix: {
content: '';
display: table;
clear: both;
}
}
#header {
......
&::after {
@apply --clearfix;
}
} Look forward for the new feature! |
If someone can double check that a plugin exists and follow the spec, this should be easy to add (PR welcome, and btw, here is the way to add a feature (maybe outdated a little, but should help, it's very easy to add a new plugin) https://github.com/MoOx/postcss-cssnext/blob/master/CONTRIBUTING.md#add-a-feature) |
Not sure I have the time or the chops to take this on, but would love to see it supported in cssnext! |
The aim of Anyhow, I would be happy to see it used in CSSnext. |
As far as the limitation does not produce any change with or without the transformation, it's not an issue. postcss-custom-properties supported code will works in modern browsers without any different behavior. I didn't read the spec at all so I can't say anything for now (and to be honest, I am not personally interested yet by this feature, and may never be - that don't mean it does not have its place to this project). |
Just wanted to show good willing after the last days "social highlight". Open to move it to the PostCSS org if you feel it's needed. Collaboration over fragmentation. |
@pascalduez feel free to make a PR with proper doc about limitation (like custom props). |
FYI: This has landed in Chrome 51 behind the experimental features flag. |
If anyone want to handle this, it should take a minute if the corresponding postcss plugin is ready. |
@MoOx I'll give it a spin, sorry for the delay. |
New proposal by @tabatkins with mixins by
@apply
rule http://tabatkins.github.io/specs/css-apply-rule/The text was updated successfully, but these errors were encountered: