Comparison of browser engines (CSS support)
This article compares Cascading Style Sheets support for several browser engines.
Other notes
Vendor-specific
The DOM properties corresponding to vendor-specific experimental CSS properties are prefixed with the vendor-prefix, without any hyphens, and with first letters capitalised, e.g.element.style.MozBorderRadius
corresponding to the -moz-border-radius
property, or element.style.OTransform
corresponding to the -o-transform
property. The exception is Trident, which used a lower-case prefix, e.g. element.style.msTransform
.- Gecko:
-moz-
— All experimental selectors, properties and values are prefixed with "-moz-", e.g.::-moz-selection
instead of::selection
. - Webkit:
-webkit-
— All experimental selectors, properties and values are prefixed with "-webkit-", e.g.-webkit-box-shadow
instead ofbox-shadow
. - Trident:
-ms-
— All experimental properties are prefixed with "-ms-", e.g.-ms-interpolation-mode
instead ofinterpolation-mode
. - KHTML:
-khtml-
— All experimental selectors, properties and values are prefixed with "-khtml-", e.g.-khtml-opacity
instead ofopacity
. - Presto:
-o-
— All experimental properties are prefixed with "-o-", e.g.-o-transition-property
instead oftransition-property
.Abbreviations
- CSS1 : Cascading Style Sheets Level 1 Specification
- CSS2 : Cascading Style Sheets Level 2 Revision 1 Specification
- CSS3 : CSS Module Level 3
- CSS4 : CSS Module Level 4
Grammar and rules
- !important — Prior to 7.0,
!important
doesn't override rules defined later in the same declaration block. - @import — Prior to 8.0, media type support is broken. For
@import <URL> <MEDIA>
, IE requests as the URL "<URL> <MEDIA>
" and will include theurl
token and/or quotes in the URL, too, if present. Cannot import more than 35 stylesheets.
- @import — Whilst Gecko, WebKit 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
- :read-only and :read-write — Both Presto and KHTML handle the case of the
contenteditable
attribute incorrectly.
- :active — Prior to 8.0,
:active
is only supported on anchor elements. - :hover — Prior to 7.0,
:hover
is only supported on anchor elements. - .one.two — Prior to 7.0, only
.two
class selector was taken into consideration. - * — Prior to 7.0 this was treated as a single or no element.
- — Matches every
td
andth
in a table when the attribute iscolspan
. This may not actually be a bug, as ambiguity exists in the specification. - :first-letter, :first-line — Prior to IE9 in 6.0, combining
:first-letter
rules with others may be problematic. In 8.0, rules with!important
are ignored inside:first-line
and:first-letter
declarations.
- :before, :after — CSS2.0 behavior : some properties are unimplemented prior to 1.9.1.
- :lang — Only detected when explicitly present on element being tested, attribute not inherited.
- :first-line —
text-transform
doesn't apply with this pseudo-element. -
:before/after
— some styles can't be applied to:before
and:after
pseudo-elements, such as animations and transitions.
- :target — Prior to 2.5, styles aren't applied when navigating using back and forward buttons.
Properties
- margin —
inherit
inherits the computation and recomputes it instead of inheriting the computed value. - display — Prior to 7.0, only
none
,block
,inline
,table-header-group
, andtable-footer-group
are fully supported. Prior to 8.0,table
are not supported, whileinline-block
is only supported on elements that are naturally inline. - overflow — Prior to 7.0,
overflow: visible;
is incorrectly supported. In 8.0,scroll
makes the element's height equal to itsmax-height
even if the content isn't that tall. This has been fixed in IE9. - visibility — Prior to 8.0,
visibility: collapse;
is not supported. In 8.0, inline elements withvisibility: visible;
inside block elements withvisibility: hidden;
are not visible. - content — In 8.0, computed
attr
values are not updated when the attribute changes. - border-color — Prior to 7.0,
transparent
is not supported. - border-style — Prior to 8.0,
hidden
is not supported. - border-style — Prior to 7.0,
dotted
is rendered asdashed
. - box-shadow — Trident 9.0 renders box-shadow blur value at about half the declared value. Prior to 9.0, trident supports similar functionality since 5.5 using the proprietary Shadow and DropShadow filters.
- position — Prior to 7.0, fixed positioning was not supported. 7.0 and later support it in standards-compliant mode only.
- z-index — Prior to 8.0,
z-index
is only partially supported. In 8.0, floating point values are accepted in addition to integers. - list-style-type — Prior to 8.0,
armenian
,decimal-leading-zero
,georgian
,lower-greek
,lower-latin
,upper-latin
are not supported. - opacity — Prior to 9.0, Trident supported a proprietary alternative.
- background-image — Prior to 8.0, background images are badly positioned in some cases.
- background-attachment — Prior to 7.0,
fixed
was allowed on thebody
element only. - background-position — Prior to 8.0, fixed positioning is not supported.
- font-weight — Prior to 8.0, incorrect rendering when value is 600.
- text-align — In 8.0,
text-align
isn't inherited by:before
and:after
pseudo-elements. - white-space — Prior to 6.0,
pre
is not supported. Prior to 8.0,white-space
is only partially supported;pre-line
andpre-wrap
are not supported. - cursor — Does not fail on non-prefixed vendor extensions.
- flex — Experimental in 10.0
- break-after; break-before; break-inside — Though 10.0 does support break-after, break-before, and break-inside for columns, they do not appear to support the properties "region" and "avoid-region".
- display — Values except inline-block and inline-table supported prior to 1.9.
- z-index — Negatives values are badly supported prior to 1.9.
- content —
none
value is unsupported prior to 1.9. This property also fails on any normal elements, which it must support according to the CSS3 "Generated and Replaced Content Module" spec. - background-position — Versions prior to 1.7 implement the CSS2 syntax, not the proposed CSS2.1 expanded syntax.
- font-size-adjust — Prior to 1.9, supported on Windows only.
- font-weight — Only Regular and Bold weights get used, even if Light or Heavy/Black faces are installed, unless using DirectWrite in Gecko 2.0 on Windows 7 or Windows Vista.
- white-space —
pre-line
is not supported prior to 1.9.1. Prior to 1.9,pre-wrap
was only supported experimentally as-moz-pre-wrap
. - visibility —
collapse
is unsupported prior to 1.8. - border-radius — Prior to 1.9.1, border curves are circular, not elliptical as specified by the current CSS3 draft. Short-cut definitions for
border-radius
read "tl tr br bl" instead of the W3C's "tr br bl tl". When the border style is dotted or dashed, curves are rendered as solid instead. - page-break-before; page-break-after — Only the
always
andauto
values are supported.
- max-width; max-height; min-width; min-height — Are not supported on tables.
- font — The system font keywords that allow designers to tailor presentation to the user's operating system environment are unsupported.
- 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 the
always
andauto
values are supported. - white-space — Prior to 522,
pre-line
andpre-wrap
are unsupported. - visibility —
collapse
is unsupported prior to 522. Its implementation has the same effect ashidden
and is therefore not compliant. - content — The
none
,open-quote
,close-quote
,no-open-quote
,no-close-quote
andnormal
values are unsupported. This property also fails on any normal elements, which it must support according to the CSS3 "Generated and Replaced Content Module" spec. - font-size — The
font-size
property does not always accept the value 0, in "font-size: 0px" the text is still visible.
- overflow — Values
scroll
andauto
are unsupported. - page-break-before; page-break-after — Before 3.5 only the
always
andauto
values were supported. - visibility — All properties are supported, but the implementation of
collapse
has the same effect ashidden
and is therefore not compliant.
- counter-increment, counter-reset — Implemented the algorithm in REC CSS2.
- background-position — Presto versions prior to Opera 8.0 implement the CSS2 syntax, not the proposed CSS2.1 expanded syntax.
- font-weight — Incorrect rendering when value is 600. Renders the text in a compatibility mode for websites made for Trident.
- visibility — Prior to 2.5, the value
collapse
was unsupported in table columns. On rows, it had the same effect ashidden
and was therefore not compliant. - cursor —
cursor
is ignored with dynamic pseudo-classes and custom cursors are unsupported. - content — Prior to 2.7, the
none
value was unsupported. - font —
inherit
should not be allowed together with a font-size value. This should not be parsed, but it's currently done in Opera.Descriptors
Values and units
;General notes- transparent —
CSS1 introduced the ‘transparent’ value for the background-color property. CSS2 allowed border-color to also accept the ‘transparent’ value. The Open eBook Publication Structure 1.0.1 extended the ‘color’ property to also accept the ‘transparent’ keyword. CSS3 extends the color value to include the ‘transparent’ keyword to allow its use with all properties that accept a
value. This simplifies the definition of those properties in CSS3. - <angle> — The
turn
unit is unsupported.
- rect — Prior to 8.0,
rect
was not supported with the correct syntax using commas. - auto — In quirks mode,
auto
does not work formargin
s, except table elements. - transparent — In 7.0 and 8.0, using
transparent
in thecolor
property will render the text as black. - transparent — Prior to 7.0,
transparent
is not supported on borders and is ignored on PNG images.
- <ch> — Prior to version 1.9.1, used the width of the "M" glyph instead of the width of the "0" glyph.
- <number> — Prior to 2.1, there existed a quantization error for values greater than 20.47.
- transparent — Keyword is ignored when used with the outline-color property. Prior to version 2.2, it was also ignored when used with the color and text-shadow properties.