Harman Patil (Editor)

Comparison of layout engines (Cascading Style Sheets)

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit
Standard
  
51.0.1 / January 26, 2017; 28 days ago (2017-01-26)

ESR
  
45.7.0 / January 24, 2017; 30 days ago (2017-01-24)

The following tables compare CSS compatibility and support for a number of layout engines. Please see the individual products' articles for further information. Unless otherwise specified in footnotes, comparisons are based on the stable versions without any add-ons, extensions or external programs.

Contents

Engine nomenclature

Rather than the names of web browsers and HTML to PDF converters, the names of the underlying engines are used. Some of the software and online converters that use the various engines are listed below.

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.

Acronyms

  • CSS1 : Cascading Style Sheets (CSS1) Level 1 Specification
  • CSS2 : Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification
  • ML1 : CSS Module Level 1 (≠ CSS1)
  • CSS3 : CSS Module Level 3
  • CSS4 : CSS Module Level 4
  • Trident grammar and rule notes

    1. !important — Prior to 7.0, !important doesn't override rules defined later in the same declaration block.
    2. @import — Prior to 8.0, media type support is broken. For @import <URL> <MEDIA>, IE requests as the URL "<URL> <MEDIA>" and will include the url() token and/or quotes in the URL, too, if present. Cannot import more than 35 stylesheets.

    Presto grammar and rule notes

    1. @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.

    General selector notes

    1. :read-only and :read-write — Both Presto and KHTML handle the case of the contenteditable attribute incorrectly.
    2. ::selection has been removed from the CSS3 specification, but is still supported by many browsers.

    Trident selector notes

    1. :active — Prior to 8.0, :active is only supported on anchor elements.
    2. :hover — Prior to 7.0, :hover is only supported on anchor elements.
    3. .one.two — Prior to 7.0, only .two class selector was taken into consideration.
    4. * — Prior to 7.0 this was treated as a single or no element.
    5. [attr] — Matches every td and th in a table when the attribute is colspan (regardless of whether any actually have a colspan attribute). This may not actually be a bug, as ambiguity exists in the specification.
    6. :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.

    Gecko selector notes

    1. (:):before, (:):after — CSS2.0 behavior : some properties are unimplemented prior to 1.9.1.

    WebKit selector notes

    1. :lang() — Only detected when explicitly present on element being tested, attribute not inherited.
    2. (:):first-linetext-transform doesn't apply with this pseudo-element.
    3. (:):before/after — some styles can't be applied to :before and :after pseudo-elements, such as animations and transitions.

    Presto selector notes

    1. :target — Prior to 2.5, styles aren't applied when navigating using back and forward buttons.

    Prince selector notes

    1. :matches(a,b) — Prince uses a fixed specificity of the most specific argument (like :not) rather than the specificity of the matching argument (as selectors4 specifies).

    Trident property notes

    1. margininherit inherits the computation and recomputes it instead of inheriting the computed value.
    2. display — Prior to 7.0, only none, block, inline, table-header-group, and table-footer-group are fully supported. Prior to 8.0, table are not supported, while inline-block is only supported on elements that are naturally inline.
    3. overflow — Prior to 7.0, overflow: visible; is incorrectly supported. In 8.0, scroll makes the element's height equal to its max-height even if the content isn't that tall. This has been fixed in IE9.
    4. visibility — Prior to 8.0, visibility: collapse; is not supported. In 8.0, inline elements with visibility: visible; inside block elements with visibility: hidden; are not visible.
    5. content — In 8.0, computed attr() values are not updated when the attribute changes.
    6. border-color — Prior to 7.0, transparent is not supported.
    7. border-style — Prior to 8.0, hidden is not supported.
    8. border-style — Prior to 7.0, dotted is rendered as dashed.
    9. 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.
    10. position — Prior to 7.0, fixed positioning was not supported. 7.0 and later support it in standards-compliant mode only.
    11. z-index — Prior to 8.0, z-index is only partially supported. In 8.0, floating point values are accepted in addition to integers.
    12. list-style-type — Prior to 8.0, armenian, decimal-leading-zero, georgian, lower-greek, lower-latin, upper-latin are not supported.
    13. opacity — Prior to 9.0, Trident supported a proprietary alternative.
    14. background-image — Prior to 8.0, background images are badly positioned in some cases.
    15. background-attachment — Prior to 7.0, fixed was allowed on the body element only.
    16. background-position — Prior to 8.0, fixed positioning is not supported.
    17. font-weight — Prior to 8.0, incorrect rendering when value is 600.
    18. text-align — In 8.0, text-align isn't inherited by :before and :after pseudo-elements.
    19. white-space — Prior to 6.0, pre is not supported. Prior to 8.0, white-space is only partially supported; pre-line and pre-wrap are not supported.
    20. cursor — Does not fail on non-prefixed vendor extensions.
    21. flex — Experimental in 10.0
    22. 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".

    Gecko property notes

    1. display — Values except inline-block and inline-table supported prior to 1.9.
    2. z-index — Negatives values are badly supported prior to 1.9.
    3. contentnone value is unsupported prior to 1.9. This property also fails on any normal (non-pseudo-) elements, which it must support according to the CSS3 "Generated and Replaced Content Module" spec.
    4. background-position — Versions prior to 1.7 implement the CSS2 syntax, not the proposed CSS2.1 expanded syntax.
    5. font-size-adjust — Prior to 1.9, supported on Windows only.
    6. 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.
    7. white-spacepre-line is not supported prior to 1.9.1. Prior to 1.9, pre-wrap was only supported experimentally as -moz-pre-wrap.
    8. visibilitycollapse is unsupported prior to 1.8.
    9. 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.
    10. page-break-before; page-break-after — Only the always and auto values are supported.

    WebKit property notes

    1. max-width; max-height; min-width; min-height — Are not supported on tables.(as commented on 2012-12-18, it is fixed)
    2. font — The system font keywords that allow designers to tailor presentation to the user's operating system environment are unsupported.
    3. font-weight — Only Regular and Bold weights get used, even if Light or Heavy/Black faces are installed.
    4. page-break-before; page-break-after — Only the always and auto values are supported.
    5. white-space — Prior to 522, pre-line and pre-wrap are unsupported.
    6. visibilitycollapse is unsupported prior to 522. Its implementation has the same effect as hidden and is therefore not compliant.
    7. content — The none, open-quote, close-quote, no-open-quote, no-close-quote and normal values are unsupported. This property also fails on any normal (non-pseudo-) elements, which it must support according to the CSS3 "Generated and Replaced Content Module" spec.
    8. font-size — The font-size property does not always accept the value 0, in "font-size: 0px" the text is still visible.

    KHTML property notes

    1. overflow — Values scroll and auto are unsupported.
    2. page-break-before; page-break-after — Before 3.5 only the always and auto values were supported.
    3. visibility — All properties are supported, but the implementation of collapse has the same effect as hidden and is therefore not compliant.

    Presto property notes

    1. counter-increment, counter-reset — Implemented the algorithm in REC CSS2.
    2. background-position — Presto versions prior to Opera 8.0 implement the CSS2 syntax, not the proposed CSS2.1 expanded syntax.
    3. font-weight — Incorrect rendering when value is 600. Renders the text in a compatibility mode for websites made for Trident.
    4. visibility — Prior to 2.5, the value collapse was unsupported in table columns. On rows, it had the same effect as hidden and was therefore not compliant.
    5. cursorcursor is ignored with dynamic pseudo-classes and custom cursors are unsupported.
    6. content — Prior to 2.7, the none value was unsupported.
    7. fontinherit should not be allowed together with a font-size value. This should not be parsed, but it's currently done in Opera.

    Prince property notes

    1. visibility — The value collapse is unsupported.
    2. box-decoration-break — Prince 9 (2013) honoured box-decoration-break for borders but not backgrounds. Nightly builds honour also for backgrounds, but where slice is only approximated: if background-repeat repeats vertically then the rendering is as for clone; otherwise the background renders only in the first fragment, being truncated rather than slicing & continuing in subsequent fragments. The initial value is clone rather than slice, in the belief that this is a better default for print use.
    3. list-style — The values armenian and georgian are unsupported.
    4. content — The values open-quote and close-quote are unsupported.
    5. text-overflow — Partial: excluding the portions of the spec currently marked as At Risk, namely <string> and 2-value syntax.
    6. Media Queries — Some device-characteristic media queries aren't very meaningful for PDF user agents.
    7. Excludes 3D transforms.

    General value and unit notes

    1. transparent

      CSS1 introduced the ‘transparent’ value for the background-color property. CSS2 allowed border-color to also accept the ‘transparent’ value. The Open eBook(tm) Publication Structure 1.0.1 [OEB101] 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 <color> value. This simplifies the definition of those properties in CSS3.

    2. <angle> — The turn unit is unsupported.

    Trident value and unit notes

    1. rect() — Prior to 8.0, rect() was not supported with the correct syntax using commas.
    2. auto — In quirks mode (IE5 emulation mode), auto does not work for margins, except table elements.
    3. transparent — In 7.0 and 8.0, using transparent in the color property will render the text as black.
    4. transparent — Prior to 7.0, transparent is not supported on borders (shows as solid black) and is ignored on PNG images.

    Gecko value and unit notes

    1. <ch> — Prior to version 1.9.1, used the width of the "M" glyph instead of the width of the "0" glyph.

    Presto value and unit notes

    1. <number> — Prior to 2.1, there existed a quantization error for values greater than 20.47 (not limited to em, try any non-pixel units).
    2. 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.

    References

    Comparison of layout engines (Cascading Style Sheets) Wikipedia