Title: CSS Conditional Rules Module Level 4
Group: csswg
Shortname: css-conditional
Level: 4
Status: ED
Work Status: Exploring
ED: https://drafts.csswg.org/css-conditional-4/
TR: https://www.w3.org/TR/css-conditional-4/
Test Suite: http://test.csswg.org/suites/css-conditional-4_dev/nightly-unstable/
Editor: L. David Baron, Mozilla https://www.mozilla.org/, https://dbaron.org/, w3cid 15393
Abstract: This module contains the features of CSS for conditional processing of parts of
style sheets, conditioned on capabilities of the processor or the
document the style sheet is being applied to. It includes and extends the
functionality of CSS level 2 [[!CSS21]], which builds on CSS level 1
[[CSS1]]. The main extensions compared to level 2 are allowing nesting of
certain at-rules inside ''@media'', and the addition of the ''@supports'' rule for
conditional processing.
Default Highlight: css
Introduction
This is currently an early draft of the things that are new in level 4.
The features in level 3 are still defined in [[css3-conditional]]
and have not yet been copied here.
Issue: In the future, copy the contents of [[css3-conditional]] into this document.
Extensions to the ''@supports'' rule
This level of the specification extends the <> syntax as follows:
<supports-feature> = <> | <>
<supports-selector-fn> = selector( <> )
: <>
::
The result is true if the UA
supports the selector
provided as an argument to the function.
Extensions to the definition of support
A CSS processor is considered to
support a CSS selector
if it accepts that selector (rather than discarding it as a
parse error), and that selector doesn't contain
unknown -webkit- pseudo-elements.
Acknowledgments