The CSS interface holds useful CSS-related methods. No object with this interface are implemented: it contains only static methods and therefore is a utilitarian interface.

Properties

The CSS interface is a utility interface and no object of this type can be created: only static properties are defined on it.

Static properties

CSS.paintWorklet 
Provides access to the Worklet responsible for all the classes related to painting.

Methods

The CSS interface is a utility interface and no object of this type can be created: only static methods are defined on it.

Static methods

No inherited static methods.

CSS.supports()
Returns a Boolean indicating if the pair property-value, or the condition, given in parameter is supported.
CSS.escape()
Can be used to escape a string mostly for use as part of a CSS selector.

Specifications

Specification Status Comment
CSS Painting API Level 1
The definition of 'paintWorklet' in that specification.
Working Draft Adds the paintWorklet static property.
CSS Object Model (CSSOM)
The definition of 'CSS' in that specification.
Working Draft Adds the escape() static method.
CSS Conditional Rules Module Level 3
The definition of 'CSS' in that specification.
Candidate Recommendation Initial definition

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic support
Experimental
Chrome Full support 28Edge Full support YesFirefox Full support 22
Full support 22
Full support 20
Disabled
Disabled From version 20: this feature is behind the layout.css.supports-rule.enabled preference. To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 12.1Safari No support NoWebView Android Full support 66Chrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 22
Full support 22
Full support 20
Disabled
Disabled From version 20: this feature is behind the layout.css.supports-rule.enabled preference. To change preferences in Firefox, visit about:config.
Opera Android Full support 12.1Safari iOS No support NoSamsung Internet Android ?
ch
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
cm
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
deg
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
dpcm
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
dpi
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
dppx
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
em
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
escape
Experimental
Chrome Full support 46Edge ? Firefox Full support 31IE No support NoOpera No support NoSafari No support NoWebView Android ? Chrome Android No support NoEdge Mobile ? Firefox Android Full support 31Opera Android No support NoSafari iOS No support NoSamsung Internet Android ?
ex
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
fr
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
grad
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
Hz
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
in
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
ic
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
kHz
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
lh
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mm
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
ms
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
number
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
paintWorklet
Experimental
Chrome Full support 65Edge No support NoFirefox ? IE No support NoOpera Full support 52Safari No support NoWebView Android Full support YesChrome Android Full support YesEdge Mobile No support NoFirefox Android ? Opera Android Full support 52Safari iOS No support NoSamsung Internet Android ?
pc
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
percent
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
pt
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
px
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
Q
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
rad
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
rlh
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
rem
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
s
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
supportsChrome Full support 61
Full support 61
Partial support 28
Notes
Notes Version 60 or older didn't support parentheses-less one-argument version.
Edge Partial support Partial
Notes
Partial support Partial
Notes
Notes Edge doesn't support parentheses-less one-argument version.
Firefox Full support 55
Full support 55
Partial support 22
Notes
Notes Version 54 or older didn't support parentheses-less one-argument version.
Partial support 20
Disabled
Disabled From version 20: this feature is behind the layout.css.supports-rule.enabled preference. To change preferences in Firefox, visit about:config.
IE No support NoOpera Full support 12.1Safari No support NoWebView Android Full support 61
Full support 61
Partial support 37
Notes
Notes Version 60 or older didn't support parentheses-less one-argument version.
Chrome Android Full support 61
Full support 61
Partial support 28
Notes
Notes Version 60 or older didn't support parentheses-less one-argument version.
Edge Mobile Partial support Partial
Notes
Partial support Partial
Notes
Notes Edge doesn't support parentheses-less one-argument version.
Firefox Android Full support 55
Full support 55
Partial support 22
Notes
Notes Version 54 or older didn't support parentheses-less one-argument version.
Partial support 20
Disabled
Disabled From version 20: this feature is behind the layout.css.supports-rule.enabled preference. To change preferences in Firefox, visit about:config.
Opera Android Full support 12.1Safari iOS No support NoSamsung Internet Android ?
turn
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
vb
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
vh
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
vi
Experimental
Chrome No support NoEdge No support NoFirefox No support NoIE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoEdge Mobile No support NoFirefox Android No support NoOpera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
vmax
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
vw
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?
wmin
Experimental
Chrome Full support 66Edge No support NoFirefox No support NoIE No support NoOpera Full support 53Safari No support NoWebView Android Full support 66Chrome Android Full support 66Edge Mobile No support NoFirefox Android No support NoOpera Android Full support 53Safari iOS No support NoSamsung Internet Android ?

Legend

Full support  
Full support
Partial support  
Partial support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
See implementation notes.
See implementation notes.
User must explicitly enable this feature.
User must explicitly enable this feature.

See Also

Document Tags and Contributors

Last updated by: fscholz,