About CSS3
Cascading Style Sheets (CSS) standard is a stylesheet language that allows web developers to add visual and temporal styles to Web pages using mark-up languages—typically HTML. CSS3 (or CSS Level 3) is the latest iteration of the CSS specification as defined by the World Wide Web Consortium’s CSS Workgroup. It builds on features already defined in the CSS1, CSS2, and CSS2.1 specifications. CSS4 is also currently under development by the CSS Workgroup but its features are still experimental.
Because it is a progression of the previous standards rather than a replacement, there are few changes from the previous versions, mostly additions. There are a few cases, however, where older syntax is being depreciated in favor of new syntax. Those cases will be highlighted in this document.
Browser Support
CSS3 is a standard that is supported in part by all modern web browsers. However, web browsers have gradually implemented CSS3 over the last several years, so older browsers may not have properties implemented, have the properties fully implemented, or may be using a browser extension. Universal browser support should be assumed unless otherwise indicated.
Rendering Engines and Browser Extensions
The rendering engine (sometimes called layout engine or web browser engine) is a software component used to display and interpret HTML, CSS, JavaScript, or other code used to create web pages.
Extension | Rendering Engine | Browsers Include |
---|---|---|
-webkit- | Webkit | Chrome |
-moz- | Mozilla | Firefox |
-o- | Presto | Opera to v14 |
-ms- | Trident | Internet Explorer |
Some of the features in CSS3 (and CSS4) are supported using browser extensions, which were used to test experimental features in rendering engines in advance of their inclusion in the full CSS specification. Although referred to as browser extensions, they are actually prefixes based on the specific company of origin or the rendering engine used by the browser, rather than the specific, name-brand browser.
Using Browser Extensions
To ensure maximum backwards - and cross-browser compatibility, always include the declaration using all possible browser extensions available for the specific property along with the CSS3 syntax.
.mybox { -webkit-transform: scale(2);
-moz-transform: scale(2);
-o-transform: scale(2);
-ms-transform: scale(2);
transform: scale(2);
It is a good idea to place the W3C version of the property last in order, so that it will override the older browser extension versions if recognized.
Will I always need browser extensions?
Eventually, after the property is added to the CSS standard, the browser extension is no longer needed, but it could take several years before all legacy browsers have been updated. In the meantime, the website caniuse.com provides an easy to reference chart of supported properties and extensions.
{{ parent.title || parent.header.title}}
{{ parent.tldr }}
{{ parent.linkDescription }}
{{ parent.urlSource.name }}