5 ms·
Ugh. We should get rid of prefixes already. They are a hassle for web developers, and reality is the web moves so fast that what's supposed to be "experimental"
by TazeTSchnitzel 14y ago
Ugh. We should get rid of prefixes already. They are a hassle for web developers, and reality is the web moves so fast that what's supposed to be "experimental" may be very quickly put into production use. Removing them would not prevent changing the syntax of a CSS property. Prefixes are bad anyway because they ensure only 4 engines can be ahead of the curve, unless web developers decide another matters enough to add the prefix for it.
Edit: Actually, if we don't get rid of prefixes entirely, we should get rid specifically of vendor prefixes. Using -experimental- or -x- is fine with me. Just don't segment by vendors so only some browsers are explicitly supported.
- tvdw 14y agoI don't think you understand why the prefixes are there. CSS was designed in a way that things should either work or not. There shouldn't be different ways to interpret a property. With browsers battling over several syntaxes for CSS3 implementation, the last thing we want is to have webdevs build a separate stylesheet for every browser out there, because (for example) "transform:" works different on Firefox 3 than on Firefox 4, and Chrome's implementation is also different. The prefixes help a lot here: you can group all these different stylesheets into one by using the prefixes, and once the standards are finalized they'll just use one syntax that can't be interpreted any other way.
- TazeTSchnitzel 14y agoCSS parsing rules mean it doesn't matter. You can simply specify a property with several syntaxes, and browsers ignore the ones they don't recognise.
- daeken 14y agoLet's say that you have a property that takes in two color parameters, crazy-coloring. Webkit implements crazy-coloring: bgcolor fgcolor; Gecko implements crazy-coloring: fgcolor bgcolor;. How do you propose we differentiate these and know what the designer meant? That's why we have prefixes, until it's standardized.
- TazeTSchnitzel 14y agoUsually we don't end up with cases that are that drastically different. And in that case, now only Webkit, Gecko, and maybe Trident and Presto are considered. Other, less popular rendering engines are rarely included in the set of prefixed properties, excluding them from the ability to use new features.
- daleharvey 14y agoindexedDB specifically had very different behaviour in webkit and firefox, it still does afaik
- TazeTSchnitzel 14y agoThere's also different behaviour across versions. Prefixes don't help.
- Permit 14y agoHow could one differentiate between different implementations in browsers? Prefixes help. My favorite example is CSS gradients with transparency. Mozilla: background-image: -moz-linear-gradient( rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 95% ); IE 9: filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=#550000FF, endColorstr=#550000FF ); IE 8: -ms-filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=#550000FF, endColorstr=#550000FF ); Webkit: background-image: -webkit-gradient( linear, left top, left bottom, from(rgba(50,50,50,0.8)), to(rgba(80,80,80,0.2)), color-stop(.5,#333333) ); How would one properly differentiate between browsers implementing functionality differently in this case without prefixes? The only option would be to wait years for standards to be finalized and then implemented.
- TazeTSchnitzel 14y agoWell, each of those values will only work correctly in one browser, other browsers would skip the ones they don't understand, yes?
- emil0r 14y agoNow the client wonders why the website looks so different in different browsers.
- TazeTSchnitzel 14y agoEh? Did you even read what I posted? Browsers ignore CSS they don't understand, hence you can put several versions of a rule, and a browser will use the one it understands.
- jonathanyc 14y agoHow is the browser supposed to magically discern developer intent?
- TazeTSchnitzel 14y ago