5 ms·
I include this kind of rewrite in my webserver, so my CSS files stay clean. For instance, data = data.replace(/^\s*border-radius:\s*(\w+);$/mg, 'border-radiu
by tlb 17y ago
I include this kind of rewrite in my webserver, so my CSS files stay clean. For instance,
data = data.replace(/^\s*border-radius:\s*(\w+);$/mg, 'border-radius: $1; -moz-border-radius: $1; -webkit-border-radius: $1;');
I just have to change it in the one place when some new CSS tweak comes along.
- cheald 17y agoI solve it with Sass, which lets me define "functions" (more like macros, really). http://pastie.org/881370 http://pastie.org/881370 is what I use for corners - just tweaking the macro definition as needed provides what I need. In regards to the article, other people have touched on why we can't drop vendor prefixes just yet. Not all vendors implement a feature consistently yet. In the case of something like border-radius, the shorthand forms mean completely different things in different browsers, and the longhand forms don't have consistent naming. Vendor prefixes serve a very valid purpose - the ability to say "we've implemented an interpretation of the CSS3 draft standard, use at your own peril" is wonderful, because you don't need CSS hacks and horrible rewrites and all sorts of other voodoo to work around problems.