Css vendor prefix why
CSS vendors prefixes are not hacks, however, and you should have no reservations about using them in your work. A CSS hack exploits flaws in the implementation of another element or property in order to get another property to work correctly. But these hacks were used to fix the problem of the difference between how Internet Explorer 5. Thankfully these two outdated browsers are ones we do not have to concern ourselves with these days. Furthermore, these prefixes are working with CSS properties that will eventually be a part of the specification.
We are simply adding some code in order to get access to the property early. This is another reason why you end the CSS rule with the normal, non-prefixed property. That way you can drop the prefixed versions once full browser support is achieved. Want to know what the browser support for a certain feature is? The website CanIUse. For example, just a few years ago, to set a rounded corner on a box you had to write:. But now that browsers have come to fully support this feature, you really only need the standardized version:.
Chrome has supported the CSS3 property since version 5. In the end, writing browser prefixes is much easier than finding and exploiting errors that will most likely be fixed in a future version, requiring that you find another error to exploit and so on. Actively scan device characteristics for identification. Use precise geolocation data.
Select personalised content. Create a personalised content profile. Measure ad performance. Because developers instead of considering vendor prefixes as a way to preview features, they shipped them in production - something considered harmful by the CSS Working Group. Mostly because once you add a flag and developers start using it in production, browsers are in a bad position if they realise something must change.
I specifically remember them for working with CSS Transitions in the past. Instead of just using the transition property, you had to do this:. Historically, vendors have also used prefixes for experimental APIs. If an entire interface is experimental, then the interface's name is prefixed but not the properties or methods within. If an experimental property or method is added to a standardized interface, then the individual method or property is prefixed.
0コメント