This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] ====== CSS Vendor Prefixes ====== In CSS we use [[http://www.w3.org/wiki/Evolution/Identifiers|vendor prefixes]] for properties, values, @-rules that are: * [[http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords|vendor specific extensions (per CSS 2.1)]], or * [[http://www.w3.org/TR/css-2010/#experimental|experimental implementations (per CSS Snapshot 2010)]] (e.g. in Working Drafts) This is a collection of the latest thoughts towards policy/guidance for when to use vendor prefixes in an implementation and when it is safe/right/required to drop vendor prefixes from implementations. ===== Sources ===== There has been much discussion of vendor prefixes in both www-style and CSS working group face-to-face meetings, but nothing conclusive has been written up. Please feel free to research those www-style archives and CSS WG minutes (telcon, f2f) and add (with citation!) any conclusions here. Past discussions (incomplete) * 2012 May: * [[http://lists.w3.org/Archives/Public/www-style/2012May/0125.html|Policy change]] (after [[http://dev.opera.com/articles/view/opera-mobile-emulator-experimental-webkit-prefix-support/|Opera’s start of defection]]) * [[http://lists.w3.org/Archives/Public/www-style/2012Apr/0797.html|replacement by ''!tag'']] * 2012 February: okay to implement competitor’s prefix? * [[http://lists.w3.org/Archives/Public/www-style/2012Feb/1169.html|common ''-css-'' prefix]] * [[http://lists.w3.org/Archives/Public/www-style/2012Feb/0998.html|proprietary vs. experimental implementations]] * [[http://lists.w3.org/Archives/Public/www-style/2012Feb/0678.html|diverge from standard process to avoid more harm]] * [[http://lists.w3.org/Archives/Public/www-style/2012Feb/0472.html|opt-out vs. opt-in]] after [[http://remysharp.com/2012/02/09/vendor-prefixes-about-to-go-south/|Remy Sharp]] * [[https://wiki.mozilla.org/Platform/Layout/CSS_Compatibility#questions_and_methodology|Tantek Çelik]] * [[http://www.glazman.org/weblog/dotclear/?post/2012/02/09/CALL-FOR-ACTION:-THE-OPEN-WEB-NEEDS-YOU-NOW|Daniel Glazman]] * [[http://lists.w3.org/Archives/Public/www-style/2012Feb/0463.html|unlock with @-switches]] after [[http://felipe.wordpress.com/2012/02/02/a-proposal-to-drop-browser-vendor-prefixes/|Felipe]] * [[http://lists.w3.org/Archives/Public/www-style/2012Feb/0313.html|F2F minutes]] * 2012 January: [[http://lists.w3.org/Archives/Public/www-style/2012Jan/1316.html|prefix features from other W3C WGs?]] * 2011 December: [[http://lists.w3.org/Archives/Public/www-style/2011Dec/0155.html|versioned common prefixes]] * 2011 November: * [[http://lists.w3.org/Archives/Public/www-style/2011Nov/0346.html|Cocascade]] * [[http://lists.w3.org/Archives/Public/www-style/2011Nov/0271.html|Pragmatic unprefixing]] * [[http://hsivonen.iki.fi/vendor-prefixes/|Henri Sivonen]] * … ===== Simple guidance ===== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] Simple straw proposal guidance. Terms per RFC2119 etc. In what follows the term “feature” refers to any of //property, value, at-rule, descriptor// and //unit//. ==== Working Draft features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] If you are implementing a feature which is only defined in a Working Draft (WD, including Last Call LCWD and Editor’s Draft ED), your implementation: * SHOULD ([[http://www.w3.org/TR/css-2010/#experimental|per CSS-snapshot-2010]]) use a vendor-specific prefix for the implementation of the feature * suggest this be changed to a MUST. - Tantek * MUST NOT support an unprefixed version of the feature * MUST NOT support a prefix specific to a third party for the feature * MAY use a prefix specific to the CSS WG for the feature, //if// one is ever introduced, e.g. ''-css-'' or ''-csswg-'' * disputed, could include level, e.g. ''-css4-'' * MAY use a prefix specific to the W3C for the feature, //if// one is ever introduced, e.g. ''-w3-'' or ''-w3c-'' * disputed * MAY use a generic draft prefix, //if// one is ever introduced, e.g. ''-draft-'', ''-wd-'', ''-lc-'' or ''-ed-'' * disputed, could be versioned ==== Candidate Recommendation features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] If you are implementing a feature which is defined in a Candidate Recommendation or later (CR, PR, REC), your implementation: * SHOULD ([[http://www.w3.org/TR/css-2010/#experimental|per CSS-snapshot-2010]]) support an unprefixed version of the feature * suggest this be changed to a MUST. - Tantek * MUST NOT use any vendor-specific prefix for the implementation of the feature * SHOULD NOT retain older, incompatible implementations with vendor-specific prefix * disputed, see also Transitions section ==== W3C, but non-CSS features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] If you are implementing a feature which is defined in a mature W3C specification (CR, PR, REC), but not in CSS, your implementation: * SHOULD support an unprefixed version of the feature * SHOULD NOT use a vendor-specific prefix for the implementation of the feature * could be ‘must not’ * MAY use a prefix specific to the issuing WG or to the specification, e.g. ''-svg-'' * disputed, may be useful in conflict situations For non-mature specifications (ED, WD) adopt the convention for WDs. W3C WGs try hard not to introduce incompatible features, but this is not guaranteed in all cases. The CSS version must take precedence in ambiguous cases. ==== Third-party features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] If you are implementing a feature which is defined in a mature non-W3C specification, but not in CSS, your implementation: * SHOULD use a prefix specific to the issuing body for the implementation of the feature, e.g. ''-epub-'' or ''-wap-'' * Third parties SHOULD define a prefix applicable for features in their specifications. * MAY use a vendor-specific prefix for the implementation of the feature * MUST NOT support an unprefixed version of the feature For non-mature specifications adopt the convention for WDs. ==== Internal features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] If you are implementing a feature which is intended for internal use only, your implementation: * MUST use a vendor-specific prefix for the implementation of the feature * You SHOULD document the feature publicly. * SHOULD limit the feature to local resources and then MAY make global support opt-in for users * You MUST document the feature publicly, if your implementation supports it for non-local resources. * SHOULD NOT support a feature named the same (ignoring prefixes) as a feature in any W3C draft in a different sense * MUST NOT support an unprefixed version of the feature You SHOULD, however, consider proposing the feature to the CSS WG and then, if it is accepted, follow the convention for WDs. ==== Transitions ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] If you implemented a feature with a vendor-specific prefix when it was only defined in a Working Draft, and the WD transitions to Candidate Recommendation, then your implementation: * SHOULD support an un-prefixed version of the feature (this will help exit CR) * SHOULD consider dropping the vendor-specific prefixed version of the feature. * [[http://www.alistapart.com/articles/prefix-or-posthack/|Eric Meyer’s article on the topic at A List Apart]] raised a [[http://lists.w3.org/Archives/Public/www-style/2010Jul/0048.html|discussion at www-style]] in 2010 ===== open questions ===== ==== When to implement un-prefixed features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] When is the best time to implement the unprefixed version of a feature? Ideally, when the feature is known to be 100% stable in a CR or better (that nearly never happens in practice). In practice, when a spec reaches CR. However, there have been some specs in the past that reached their first CR “prematurely” for which it would have been bad had implementations implemented unprefixed features (e.g. CSS3 Text). There are also cases where a spec oscillates between CR and LCWD (e.g. CSS 2.1, CSS3 Color, Selectors, CSS3 UI), so it’s not clear when during those oscillations it was “ideal” to implement unprefixed features. ==== When to drop vendor-prefixed features ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] When is the best time to drop support for the vendor-prefixed version of a feature? Ideally, when you implement the unprefixed version. In practice, some implementations have found it necessary/useful to maintain both vendor-prefixed and unprefixed versions of a feature for some amount of time. Different vendors appear to have different policies on this. For example, WebKit has unmodifiable content which uses prefixed properties in the field, such as iTunes Extras, so is unable to deprecate those properties. (Other examples/documentation/reasoning would be appreciated). ==== Is it okay to implement unprefixed features in a post-CR LCWD ==== This page is preserved out of historical interest, but the guidance and rules it suggests are NOT the policy of the CSS Working Group. After much discussion (and this page is part of that discussion), the CSSWG adopted a different set of guidelines, as recorded in [[http://www.w3.org/TR/CSS/#future-proofing|section 3.2 of the CSS 2015 Snapshot]] Is it okay to implement unprefixed features when a CR is taken back to Last Call for non-trivial changes? In theory, no, any features implemented from a WD should have a vendor-specific prefix. In practice however, LCWD2s are typically far more stable and correct than their preceding CRs (e.g. CSS 2.1, Selectors, CSS3 Color), thus it stands to reason that if it was ok to implement new features as unprefixed in that CR, then it should be **more** ok in a LCWD2. ===== specific cases ===== ==== cursor zoom-in zoom-out ==== The CSS3-UI editor’s draft defines two new (since the previous CSS3-UI CR) cursor values, ''zoom-in'' and ''zoom-out''. Mozilla has supported these two values, **with** a vendor-specific prefix, for a number of years. Opera has recently implemented (in Opera 11.10) vendor-specific versions as well. The definition and function of this feature feel fairly stable, very unlikely to functionally change between the editor’s draft and the next CR of CSS3-UI. It is desirable to consider allowing unprefixed implementations before people come to rely upon the vendor-prefixed version of the feature. Thus we should consider allowing implementations to implement unprefixed versions of ''zoom-in'' and ''zoom-out''. If so, this is an interesting test case for iterating/changing the abovementioned guidance. What is the higher level condition here that merits considering allowing implementations to ship an unprefixed version of a feature? Perhaps some combination of: * implementation experience **with** a vendor-prefixed version of the feature, combined with * expected/anticipated feature stability (on a case-by-case basis – up to the usual consensus consideration of the working group). ===== Known prefixes ===== This is a [[http://www.w3.org/TR/CSS2/syndata.html|list of known prefixes]] from vendors and third parties. Implementers MUST NOT use them unless licensed by a condition above. Vendors or organizations who want to introduce a prefix of their own should publicize it by registering the case-insensitive string with the CSS WG, i.e. sending an informal mail to www-style. The string should be two to six characters long and should be easily associated with (only) the registering party or its product. The prefixes are shown with leading and trailing hyphen, although in some cases the initial one is left out. -ah- Antenna House -apple- Webkit -atsc- Advanced Television Standards Committee -epub- ePUB (Electronic Publication format) -hp- Hewlett Packard -ibooks- Apple iBooks -khtml- KDE Konqueror -ms- Microsoft Internet Explorer -mso- Microsoft Office -moz- Mozilla (Gecko) -o- Opera -prince- Yes Logic Prince -rim- Research In Motion -ro- Real Objects -tc- Tall Components -wap- The WAP Forum -webkit- Apple Safari, Google Chrome etc. (WebKit) -weasy- Weasy Print -xv- Opera (CSS Speech module) ===== Reserved prefixes ===== The following prefixes are reserved for semantics to be defined by the CSS WG. This may or may not happen. They must not be used with different meaning. All combinations of any of the following prefixed followed by any combination of digits 0–9, the hyphen character ‘-’ and the letter ‘x’ is also reserved, e.g. ''-css3-'', ''-svg-2-'', ''-wd-2012-'' and ''-draftX-''. === W3C bodies and specifications === -w3- W3C – World Wide Web Consortium -w3c- ::: -css- CSS – Cascading Stylesheets -csswg- CSS Working Group -wg- ::: -svg- SVG – Scalable Vector Graphics -svgwg- SVG Working Group -xsl- XSL – Extensible Stylesheet Language (Family) -xslfo- XSL Formatting Objects -fo- ::: -xppl- XPPL – XML Print and Page Layout Working Group -xml- ::: === Generic statuses === -alpha- “alpha” -beta- “beta” -expires- “expires”, “expiration date” -exp- “experimental” or “expires” -x- “experimental” -test- “test”, “in testing” -draft- “draft” -pd- “proposed draft”, “proposal”, “public draft”, “private draft” -ed- Editor’s Draft -wd- Working Draft -lc- Last Call Working Draft -lcwd- ::: -cr- Candidate Recommendation -pr- Proposed Recommendation -rec- Recommendation -tr- ::: === For use in examples or discussion === -vendor- Example vendor prefix -vnd- ::: -ua- Example user agent prefix -browser- ::: -org- Example third party prefix -spec- Example third party specification prefix -example- Example prefix -xmp- ::: -pre- ::: -prefix- :::