-
Notifications
You must be signed in to change notification settings - Fork 3.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
Auto adding vendor prefixes #225
Comments
Great functionnality indeed. |
Another example (I'm currently on), instead of this:
write this:
|
I kinda feel like if it can be done through mixins, it probably shouldn't be built in to the core. I did however come across this http://snipplr.com/view/47181/less-classes/ which should help to keep from rewriting them all. |
I don't agree with this technique. It significantly increase size of the less css, which is not the goal. |
Moreover, ms-filter use #aarrggbb instead of rgba() for colors and mixin can do the conversion. |
I do understand, sometimes it is not welcomed to have an auto prefixing or in some circumstances only a specific set of properties is allowed be prefixed. Thus I propose a directive to make this happen. Some other technologies already such an approach. So lets have a look at them.
Something similar to this one would first allow the css prefixing and later one can define the allowed prefixes. Sounds good and offers great flexibility. For example there would be different rewrite rules for opacity. The "rewrite rules" need to be defined at the very top of your less styles. Each property that matches one rewrite rule would then automatically translated. Sounds good to me, but on the downside this can grow very large.
Summary:
Hey this already can be done with mixins one might say! |
you can autoadd prefixes using this: http://sjevsejev.blogspot.com/2012/07/lessjs-function-generates-prefixes-for.html and to write only this: .pf('transition','all 1s ease-in-out'); |
move discussion to #1199 |
For now, I need to write a mixin for sth like border-radius, gradients, etc. and add all vendor prefixes within the mixin. Could less itself care about this?
gets transformed into:
So mixins for all the new properties coming along are handled internally and we can write cleaner, vanilla css without abusing mixins for that stuff.
The text was updated successfully, but these errors were encountered: