--- title: CSS slug: Web/API/CSS tags: - API - CSSOM - Interface - NeedsTranslation - Painting - Reference - TopicStub translation_of: Web/API/CSS ---
The CSS
interface holds useful CSS-related methods. No objects with this interface are implemented: it contains only static methods and is therefore a utilitarian interface.
The CSS interface is a utility interface and no object of this type can be created: only static properties are defined on it.
The CSS interface is a utility interface and no object of this type can be created: only static methods are defined on it.
No inherited static methods.
CSSUnitValue
with a value of the parameter number of the units of the name of the factory function method used.CSS.em(3) // CSSUnitValue {value: 3, unit: "em"}
Specification | Status | Comment |
---|---|---|
{{SpecName('CSS Painting API','#dom-css-paintworklet','paintWorklet')}} | {{Spec2('CSS Painting API')}} | Adds the paintWorklet static property. |
{{SpecName('CSSOM', '#the-css.escape()-method', 'CSS')}} | {{Spec2('CSSOM')}} | Adds the escape() static method. |
{{SpecName('CSS3 Conditional', '#the-css-interface', 'CSS')}} | {{Spec2('CSS3 Conditional')}} | Initial definition |
{{Compat("api.CSS", 1)}}