3 ms·
It'd be nice if the browsers could adopt a standard prefix for experimental styles (-exp- maybe) which is then replaced by the browser prefix before being used
by gazrogers 15y ago
It'd be nice if the browsers could adopt a standard prefix for experimental styles (-exp- maybe) which is then replaced by the browser prefix before being used - so in Chrome -exp-text-size-adjust would become -webkit-text-size-adjust and in Firefox it would become -moz-text-size-adjust. That way we can escape the necessity of doing one rule for each prefix (-webkit- -moz- -o- -ms- etc.) and just have one. Browsers could just ignore the rules which they haven't implemented yet and web devs would not be able to cause problems by targeting just one family of browsers.
It could probably be implemented by a quick text replace before parsing (the c++ equivalent of s/-exp-/-webkit-/g) and would shrink the size of some stylesheets considerably.
- padenot 15y agoThis could work if and only if there weren't different syntaxes and implementations differences between prefixed properties with the same name.
- gazrogers 15y agoI agree it's certainly not a panacea for all the ills of the current system, but as the syntaxes converge it could provide a way for web devs to use one prefix without breaking the web or forcing minority browsers to adopt the prefixes of the majority browser. And it is often the case that you're using an experimental style that's only available on one browser family which is then adopted at a later date by other browsers. This method would mean that as soon as other browsers adopted the style it would render without any changes or additions required on the web site.