Title: CSS Snapshot 2015 Shortname: css-2015 Level: none Status: ED Group: CSSWG Work Status: Completed URL: https://drafts.csswg.org/css-2015/ Previous Version: https://www.w3.org/TR/2015/NOTE-css-2015-20151013/ TR: https://www.w3.org/TR/CSS/ Editor: Tab Atkins Jr., Google, http://xanthir.com/, w3cid 42199 Editor: Elika J. Etemad / fantasai, Apple, http://fantasai.inkedblade.net/contact, w3cid 35400 Editor: Florian Rivoal, Invited Expert, https://florian.rivoal.net, w3cid 43241 Abstract: This document collects together into one definition all the specs that together form the current state of Cascading Style Sheets (CSS) as of 2015. The primary audience is CSS implementers, not CSS authors, as this definition includes modules by specification stability, not Web browser adoption rate.
spec:css-sizing-3; type:value; for:width; text:min-content spec:css-sizing-3; type:value; for:width; text:max-content spec:css-sizing-3; type:value; for:width; text:fit-content
Note that the CSSWG must still be consulted to ensure coordination across vendors
and to ensure sanity review by the CSS experts from each vendor.
Note also that rough interoperability still usually means
painful lack of interop in edge (or not-so-edge) cases,
particularly because details have not been ironed out through the standards review process.
Why?
If a feature is sufficiently popular that three or more browsers have implemented it before it's finished standardization,
this clause allows releasing the pressure to ship.
Also, if a feature has already escaped into the wild and sites have started depending on it,
pretending it's still “experimental” doesn't help anyone.
Allowing others to ship unprefixed recognizes that the feature is now de facto standardized
and encourages authors to write cross-platform code.
When exposing such a standards-track unstable feature to the Web in a production release,
implementations should support both vendor-prefixed and unprefixed syntaxes
for the feature.
Once the feature has stabilized and the implementation is updated to match interoperable behavior,
support for the vendor-prefixed syntax should be removed.
Why?
This is recommended so that authors can use the unprefixed syntax to target all implementations,
but when necessary, can target specific implementations
to work around incompatibilities among implementations
as they get ironed out through the standards/bugfixing process.
The lack of a phase
where only the prefixed syntax is supported
greatly reduces the risk of stylesheets
being written with only the vendor-prefixed syntax.
This in turn allows UA vendors to retire
their prefixed syntax once the feature is stable,
with a lower risk of breaking existing content.
It also reduces the need occasionally felt by some vendors
to support a feature with the prefix of another vendor,
due to content depending on that syntax.
Pattern | Meaning | Described in section | First defined in level |
---|---|---|---|
* | any element | Universal selector | 2 |
E | an element of type E | Type selector | 1 |
E[foo] | an E element with a "foo" attribute | Attribute selectors | 2 |
E[foo="bar"] | an E element whose "foo" attribute value is exactly equal to "bar" | Attribute selectors | 2 |
E[foo~="bar"] | an E element whose "foo" attribute value is a list of whitespace-separated values, one of which is exactly equal to "bar" | Attribute selectors | 2 |
E[foo^="bar"] | an E element whose "foo" attribute value begins exactly with the string "bar" | Attribute selectors | 3 |
E[foo$="bar"] | an E element whose "foo" attribute value ends exactly with the string "bar" | Attribute selectors | 3 |
E[foo*="bar"] | an E element whose "foo" attribute value contains the substring "bar" | Attribute selectors | 3 |
E[foo|="en"] | an E element whose "foo" attribute has a hyphen-separated list of values beginning (from the left) with "en" | Attribute selectors | 2 |
E:root | an E element, root of the document | Structural pseudo-classes | 3 |
E:nth-child(n) | an E element, the n-th child of its parent | Structural pseudo-classes | 3 |
E:nth-last-child(n) | an E element, the n-th child of its parent, counting from the last one | Structural pseudo-classes | 3 |
E:nth-of-type(n) | an E element, the n-th sibling of its type | Structural pseudo-classes | 3 |
E:nth-last-of-type(n) | an E element, the n-th sibling of its type, counting from the last one | Structural pseudo-classes | 3 |
E:first-child | an E element, first child of its parent | Structural pseudo-classes | 2 |
E:last-child | an E element, last child of its parent | Structural pseudo-classes | 3 |
E:first-of-type | an E element, first sibling of its type | Structural pseudo-classes | 3 |
E:last-of-type | an E element, last sibling of its type | Structural pseudo-classes | 3 |
E:only-child | an E element, only child of its parent | Structural pseudo-classes | 3 |
E:only-of-type | an E element, only sibling of its type | Structural pseudo-classes | 3 |
E:empty | an E element that has no children (including text nodes) | Structural pseudo-classes | 3 |
E:link E:visited | an E element being the source anchor of a hyperlink of which the target is not yet visited (:link) or already visited (:visited) | The link pseudo-classes | 1 |
E:active E:hover E:focus | an E element during certain user actions | The user action pseudo-classes | 1 and 2 |
E:target | an E element being the target of the referring URI | The target pseudo-class | 3 |
E:lang(fr) | an element of type E in language "fr" (the document language specifies how language is determined) | The :lang() pseudo-class | 2 |
E:enabled E:disabled | a user interface element E which is enabled or disabled | The UI element states pseudo-classes | 3 |
E:checked | a user interface element E which is checked (for instance a radio-button or checkbox) | The UI element states pseudo-classes | 3 |
E::first-line | the first formatted line of an E element | The ::first-line pseudo-element | 1 |
E::first-letter | the first formatted letter of an E element | The ::first-letter pseudo-element | 1 |
E::before | generated content before an E element | The ::before pseudo-element | 2 |
E::after | generated content after an E element | The ::after pseudo-element | 2 |
E.warning | an E element whose class is "warning" (the document language specifies how class is determined). | Class selectors | 1 |
E#myid | an E element with ID equal to "myid". | ID selectors | 1 |
E:not(s) | an E element that does not match simple selector s | Negation pseudo-class | 3 |
E F | an F element descendant of an E element | Descendant combinator | 1 |
E > F | an F element child of an E element | Child combinator | 2 |
E + F | an F element immediately preceded by an E element | Adjacent sibling combinator | 2 |
E ~ F | an F element preceded by an E element | General sibling combinator | 3 |