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

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support28 Yes

22

201

No12.1 No
ch66 No No No53 No
cm66 No No No53 No
deg66 No No No53 No
dpcm66 No No No53 No
dpi66 No No No53 No
dppx66 No No No53 No
em66 No No No53 No
escape46 ?31 No No No
ex66 No No No53 No
fr66 No No No53 No
grad66 No No No53 No
Hz66 No No No53 No
in66 No No No53 No
ic No No No No No No
kHz66 No No No53 No
lh No No No No No No
mm66 No No No53 No
ms66 No No No53 No
number66 No No No53 No
paintWorklet65 No ? No52 No
pc66 No No No53 No
percent66 No No No53 No
pt66 No No No53 No
px66 No No No53 No
Q66 No No No53 No
rad66 No No No53 No
rlh No No No No No No
rem66 No No No53 No
s66 No No No53 No
supports28 Yes

22

201

No12.1 No
turn66 No No No53 No
vb No No No No No No
vh66 No No No53 No
vi No No No No No No
vmax66 No No No53 No
vw66 No No No53 No
wmin66 No No No53 No
FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support66 Yes Yes

22

201

12.1 No ?
ch6666 No No53 No ?
cm6666 No No53 No ?
deg6666 No No53 No ?
dpcm6666 No No53 No ?
dpi6666 No No53 No ?
dppx6666 No No53 No ?
em6666 No No53 No ?
escape ? No ?31 No No ?
ex6666 No No53 No ?
fr6666 No No53 No ?
grad6666 No No53 No ?
Hz6666 No No53 No ?
in6666 No No53 No ?
ic No No No No No No No
kHz6666 No No53 No ?
lh No No No No No No No
mm6666 No No53 No ?
ms6666 No No53 No ?
number6666 No No53 No ?
paintWorklet Yes Yes No ?52 No ?
pc6666 No No53 No ?
percent6666 No No53 No ?
pt6666 No No53 No ?
px6666 No No53 No ?
Q6666 No No53 No ?
rad6666 No No53 No ?
rlh No No No No No No No
rem6666 No No53 No ?
s6666 No No53 No ?
supports Yes Yes Yes

22

201

12.1 No ?
turn6666 No No53 No ?
vb No No No No No No No
vh6666 No No53 No ?
vi No No No No No No No
vmax6666 No No53 No ?
vw6666 No No53 No ?
wmin6666 No No53 No ?

1. From version 20: this feature is behind the layout.css.supports-rule.enabled preference. To change preferences in Firefox, visit about:config.

See Also

Document Tags and Contributors

Last updated by: fscholz,