Comparison of layout engines (CSS)
The following tables compare CSS compatibility and support for a number of layout engines. Please see the individual products' articles for further information. This article is not all-inclusive or necessarily up-to-date. Unless otherwise specified in footnotes, comparisons are based on The Stable versions without any add-ons, extensions or external programs.
__TOC__
Explanation of the tables
Engines
Rather than the names of web browsers, the names of the underlying engines are used. The browsers that use the various engines are listed below.
- Trident – Internet Explorer. IE6 uses Trident IV; IE7 uses Trident V.
- Tasman – Internet Explorer 5 for Apple Mac.
- Gecko – Various open-source browsers (Firefox, Netscape 6+, Camino, Flock, SeaMonkey, K-Meleon)
- WebCore – Apple Safari
- KHTML – Konqueror. KHTML and WebCore are quite similar, and developments in one are often copied to the other.
- Presto – Opera 7+
- iCab – iCab
Values
Values indicate the level of support in the most recent version of the layout engine, or (if a version number is given) in the specified version. Version numbers without any other value indicate the version at which the layout engine first fully supported the feature.
Value |
Meaning |
|---|---|
Indicates that the layout engine fully supports this property when valid values are used. |
|
Indicates that this property is completely ignored. |
|
Indicates that the property is understood, but that not all values are supported. Supported values are implemented correctly. |
|
Indicates that the property is understood, but that it is not implemented correctly in all cases. |
|
Indicates that the property is provided in experimental form under an alternative name, generally with only partial functionality. |
CSS version support
See the article Cascading Style Sheets for more information on the different versions of CSS. This table doesn't reference CSS2.0, as CSS2.1 was intended to replace it by correcting or removing a few errors and features rejected by the CSS community. Most of the removed CSS2 features will be made obsolete by CSS3.
Trident |
Tasman |
Gecko |
WebCore |
KHTML |
Presto |
iCab |
|
|---|---|---|---|---|---|---|---|
CSS1 |
|||||||
CSS2.1 |
|||||||
CSS3 |
Grammar and rules
Trident |
Tasman |
Gecko |
WebCore |
KHTML |
|||
|---|---|---|---|---|---|---|---|
CSS2 |
|
Weight increasing |
|||||
|
Comments |
||||||
|
Import stylesheet |
||||||
|
Character set |
? |
|||||
|
Media-specific rules |
||||||
|
For paged media |
||||||
CSS3 |
|
Namespace declaration |
|||||
|
Define font |
||||||
Trident grammar and rule notes
@font-face— Only supports Embedded OpenType (.eot) font format, does not understand theformat()identifier.!important— !important doesn't override rules defined later in the same declaration block prior to IE7.
Tasman grammar and rule notes
@font-face— Versions 5.16 and 5.17 will download fonts specified but not use them. 5.23 no longer downloads the font.
Presto grammar and rule notes
@import— Whilst Gecko, WebCore and iCab download all media stylesheets immediately, Opera only downloads handheld, print, projection and screen media, as well as speech if "voice" feature is enabled and tv, on tv devices. Text browser emulation mode is only a user stylesheet, so it does not switch to tty media type. This is consistent with older text browsers, which do not respect any CSS.
Selectors
Trident |
Tasman |
Gecko |
WebCore |
KHTML |
|||
|---|---|---|---|---|---|---|---|
Element selectors |
|||||||
CSS2 |
|
Universal |
|||||
|
Element |
||||||
|
Class |
||||||
|
ID |
||||||
CSS3 |
|
Namespaced |
|||||
Relationship selectors |
|||||||
CSS2 |
|
Descendant |
|||||
|
Child |
||||||
|
Direct adjacent |
||||||
CSS3 |
|
Indirect adjacent |
|||||
Attribute selectors |
|||||||
CSS2 |
|
Has |
|||||
|
Equals |
||||||
|
Contains (space-separated) |
||||||
|
Contains (hyphen-separated) |
||||||
CSS3 |
|
Begins with |
|||||
|
Ends with |
||||||
|
Contains substring |
||||||
|
Namespaced |
||||||
Pseudo-classes |
|||||||
CSS2 |
|
Unvisited hyperlink |
|||||
|
Visited hyperlink |
||||||
|
Active |
||||||
|
Mouseover |
||||||
|
Focused |
||||||
|
First child |
||||||
|
Language |
||||||
CSS3 |
|
Root |
|||||
|
First child of type |
||||||
|
Last child |
||||||
|
Last child of type |
||||||
|
Only child |
||||||
|
Only child of type |
||||||
|
Nth child |
||||||
|
Nth last child |
||||||
|
Nth child of type |
||||||
|
Nth last child of type |
||||||
|
Target |
||||||
|
Empty |
||||||
|
Negation |
||||||
|
Enabled state |
||||||
|
Disabled state |
||||||
|
Checked state |
||||||
|
Indeterminate state |
||||||
|
Default |
||||||
|
Valid |
||||||
|
Invalid |
||||||
|
In range |
||||||
|
Out of range |
||||||
|
Required |
||||||
|
Optional |
||||||
|
Read-only |
||||||
|
Read and write |
||||||
Pseudo-elements |
|||||||
CSS2 |
|
First letter |
|||||
|
First line |
||||||
|
Before |
||||||
|
After |
||||||
CSS3 |
|
Double colon notation |
|||||
|
Double colon notation |
||||||
|
Double colon notation |
||||||
|
Double colon notation |
||||||
|
Selection |
||||||
|
Double colon notation |
||||||
|
Double colon notation |
||||||
|
Double colon notation |
||||||
|
Double colon notation |
||||||
|
Trident |
Tasman |
Gecko |
WebCore |
KHTML |
||
Trident selector notes
:active—:activeis for anchor element only.:hover—:hoveris applied for all elements only in standards-compliant mode, not quirks mode 1. Prior to 7.0,:hoveris for anchor element only..one.two— only.twoclass selector was taken into consideration before 7.0.*— Prior to 7.0 this was treated as a single or no element.
Tasman selector notes
:hover— For anchor element only prior to 0.9..one.two— only.twoclass selector is taken into consideration.
WebCore selector notes
:lang()— Only detected when explicitly present on element being tested, attribute not inherited.:target— Style doesn't get applied when navigating using back and forward buttons.:last-child&:last-of-type— will match all siblings, or all siblings of the same type, respectively.:only-child&:only-of-type— identical behaviour to:first-child&:first-of-type.::pseudo-element— Mistakenly also triggers on::pseudo-classprior to version 416.0.
Properties
Trident |
Tasman |
Gecko |
WebCore |
KHTML |
Presto |
||
|---|---|---|---|---|---|---|---|
Box model |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
Borders |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
Line Layout |
|||||||
CSS2 |
|
||||||
|
|||||||
Positioning |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Generated and Replaced Content |
|||||||
CSS2 |
|
rowspan="4" |
|||||
|
|||||||
|
|||||||
|
|||||||
Lists |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
Colors |
|||||||
| CSS2 |
|
||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
Backgrounds |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Fonts |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Text |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Tables |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
User interface |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Paged media |
|||||||
CSS2 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
CSS3 |
|
||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Speech |
|||||||
CSS3 |
|
rowspan="22" |
rowspan="22" |
rowspan="22" |
rowspan="22" |
rowspan="22" |
|
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Media Queries |
|||||||
CSS3 |
|
rowspan="11" |
rowspan="11" |
rowspan="11" |
rowspan="11" |
||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Ruby characters |
|||||||
CSS3 |
|
rowspan="4" |
rowspan="4" |
rowspan="4" |
rowspan="4" |
||
|
|||||||
|
|||||||
|
|||||||
Multi-column Layout |
|||||||
CSS3 |
|
rowspan="7" |
rowspan="7" |
rowspan="7" |
rowspan="7" |
||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
|
|||||||
Trident property notes
overflow—overflow:visibleis incorrectly supported prior to IE7.border-style—dottedis rendered asdashedprior to IE7.display— Onlynone,block,inline,table-header-group, andtable-footer-groupare supported prior to 7.0. In 5.5+, inline-block is supported on elements that are naturally inline.position— Prior to IE 7, fixed positioning was not supported, IE 7 supports it in standards-compliant mode only.background-attachment— Prior to IE 7,fixedwas allowed on thebodyelement only.background-position— Fixed positioning is not supported.font-weight— Incorrect rendering when value is 600 2.text-decoration— Optional propertyblinkis not supported.white-space—nowrapis supported in IE 5.5 and later.preis supported in IE 6 and later in standards-compliant mode.pre-lineandpre-wrapare not supported.list-style-type—decimal-leading-zero,lower-greek,lower-latin,upper-latin,upper-romanare not supported.
Gecko property notes
display—run-in3 is not supported.inline-table4 andinline-block5 are supported in Gecko 1.9a2+.quotes— Does not support nested quotes prior to 1.8 6.content— Only works with:beforeand:after. Only support image. does not work prior to 1.8 7. background-position— Gecko versions prior to 1.7 implement the CSS2 syntax, not the proposed CSS2.1 expanded syntax.font-size-adjust— Supported in Windows only8. This problem will be fixed in the future Gecko 1.9.font-weight— Only Regular and Bold weights get used, even if Light or Heavy/Black faces are installed.white-space—pre-lineis not supported.pre-wrapis only supported experimentally as-moz-pre-wrap;.visibility—collapseis not supported prior to 1.8.border-radius— border curves are circular, but the W3C specs 9 define them as elliptical. Dashed curves are not available. Short-cut definitions forborder-radiusread "tl tr br bl" instead of the W3C's "tr br bl tl". Interesting bugs: 10 11 12page-break-before; page-break-after— Only thealwaysandautovalues are supported.
WebCore property notes
box-shadow— The system font keywords are not supported that allow designers to tailor presentation to the user’s operating system environment.font— The system font keywords are not supported that allow designers to tailor presentation to the user’s operating system environment.font-weight— Only Regular and Bold weights get used, even if Light or Heavy/Black faces are installed.page-break-before; page-break-after— Only thealwaysandautovalues are supported.text-decoration— Optional propertyblinkis not supported.white-space—pre-lineandpre-wrapfrom the proposed CSS2.1 draft are not supported.text-shadow— Multiple shadows are not supported.visibility—collapseis not supported prior to 522.
KHTML property notes
overflow— Valuesscrollandautoare unsupported.page-break-before; page-break-after— Before 3.5 only thealwaysandautovalues were supported.text-decoration— Optional propertyblinkis not supported.visibility— All supported except forcollapse.
Presto property notes
list-style-type— The CSS2 values are not supported prior to 8.0.counter-increment, counter-reset— Implemented the algorithm in REC CSS2.background-position— Presto versions prior to 8.0 implement the CSS2 syntax, not the proposed CSS2.1 expanded syntax.font-weight— Incorrect rendering when value is 600 13.white-space—pre-lineis not supported prior to Opera 9.5.visibility—collapseis unsupported until 9.5, in whichcollapseis only unsupported in table columns.
iCab property notes
display—run-inis not supported.text-align—justifyis not supported.font-stretch— Simulated using letter-spacing property.font-weight— Incorrect (bold) rendering when value is 500.visibility—collapseonly partial.caption-side—topandbottomonly which would comply with the proposed CSS2.1 elimination of the values:leftandright.empty-cells— Compresses hidden rows but does not hide them completely.
Values and units
Trident |
Tasman |
Gecko |
WebCore |
||||
|---|---|---|---|---|---|---|---|
Numbers |
CSS2 |
A floating-point number |
|||||
An integer |
|||||||
CSS3 |
rowspan="3" |
rowspan="3" |
rowspan="3" |
||||
Strings |
CSS2 |
String |
|||||
|
Unicode escapes |
||||||
Shapes |
| CSS2 |
|
A rectangle |
||||
Functions |
CSS2 |
|
Uniform Resource Identifier |
||||
|
? |
||||||
|
Attribute identifier |
||||||
| CSS3 |
|
? |
? |
||||
Colors |
CSS2 |
|
| 16 predefined web colors |
||||
|
Hexadecimal notation |
||||||
|
RGB notation |
||||||
|
28 predefined system colors 14 |
||||||
|
Full transparency |
||||||
CSS3 |
|
RGBA notation |
|||||
|
HSL notation |
||||||
|
HSLA notation |
||||||
Keywords |
CSS2 |
|
Automatically calculated |
||||
|
Inherited from the parents |
? |
|||||
CSS3 |
|
||||||
Units |
CSS2 |
|
Pixel |
||||
|
Point |
||||||
|
Pica |
||||||
|
Centimetre |
||||||
|
Millimetre |
||||||
|
inch |
||||||
|
em |
||||||
|
ex |
||||||
|
Percentage |
||||||
CSS3 |
|
Degree |
rowspan="14" |
rowspan="14" |
rowspan="14" |
||
|
Grad |
||||||
|
Radian |
||||||
|
Millisecond |
||||||
|
Second |
||||||
|
Hertz |
||||||
|
Kilohertz |
||||||
|
turn |
||||||
|
Cells in the layout-grid |
||||||
|
the font size of the root element |
||||||
|
the viewport's width |
||||||
|
the viewport's height |
||||||
|
the viewport's height or width, whichever is smaller of the two |
||||||
|
The width of the "0" (ZERO, U+0030) glyph found in the font for the font size used to render. |
||||||
Trident value and unit notes
auto— In IE5 bug emulation mode (quirks mode) does not work formargins, except table elements.transparent— In IE6, transparency is not supported on borders (shows as solid black) and is ignored on PNG images. Thus, version 7.0 is the first version that supports transparency in its entirety.
WebCore value and unit notes
<percentage>— Only uses the integer component of <number>.
Presto value and unit notes
attr()— As all URI attribute values are resolved to full URI, the value could be wrong ifattr()is used on an attribute that contains relative URI.<number>— Quantization error for values greater than 20.47 15 (not limited to em, try any non pixel units).
KHTML value and unit notes
rgba()— Becauseopacityis not supported, the opacity value ofrgba()is ignored.
General notes
Gecko general notes
-moz-— All experimental selectors, properties and values are prefixed with "-moz-", e.g.::-moz-selectioninstead of::selection16.
WebCore general notes
-webkit-— All experimental selectors, properties and values are prefixed with "-webkit-", e.g.-webkit-box-shadowinstead ofbox-shadow.
KHTML general notes
-khtml-— All experimental selectors, properties and values are prefixed with "-khtml-", e.g.-khtml-opacityinstead ofopacity.
Presto general notes
-xv-— All new selectors, properties and values introduced by CSS3 Speech Module are prefixed with "-xv-" (but not found in CSS2 aural style sheets), e.g.-xv-voice-rateinstead ofvoice-rate.
External links
- WebDevout — mostly covers Windows browsers. Extensive bug testing.
- QuirksMode — comprehensive but lacks latest versions.
- Westciv — abridged form of their retail guide.
- MacEdition — covers many Mac browsers, including rare and discontinued ones.
- Jesset — simple table without bug details, includes WebTV.
- Motohiko — covers Firefox only. [Japanese]
Other links
- CSS Filters — a fairly complete table of browser-specific hacks
- CSS specification/browser support page: General Syntax
- Assigning external CSS