aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/css/index.html
blob: fe659bba033c9c44b4adb7146c3b180338b8254c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
title: CSS
slug: Web/API/CSS
tags:
  - API
  - CSSOM
  - Interface
  - NeedsTranslation
  - Painting
  - Reference
  - TopicStub
translation_of: Web/API/CSS
---
<div>{{APIRef("CSSOM")}}</div>

<p>The <code><strong>CSS</strong></code> interface holds useful CSS-related methods. No objects with this interface are implemented: it contains only static methods and is therefore a utilitarian interface.</p>

<h2 id="Properties">Properties</h2>

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

<h3 id="Static_properties">Static properties</h3>

<dl>
 <dt>{{DOMxRef("CSS.paintWorklet")}} {{Experimental_Inline}}{{SecureContext_Inline}}</dt>
 <dd>Provides access to the Worklet responsible for all the classes related to painting.</dd>
</dl>

<h2 id="Methods">Methods</h2>

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

<h3 id="Static_methods">Static methods</h3>

<p><em>No inherited static methods</em>.</p>

<dl>
 <dt>{{DOMxRef("CSS.registerProperty()")}}</dt>
 <dd>Registers {{cssxref('--*', 'custom properties')}}, allowing for property type checking, default values, and properties that do or do not inherit their value.</dd>
 <dt>{{DOMxRef("CSS.supports()")}}</dt>
 <dd>Returns a {{JSxRef("Boolean")}} indicating if the pair <em>property-value</em>, or the condition, given in parameter is supported.</dd>
 <dt>{{DOMxRef("CSS.escape()")}}</dt>
 <dd>Can be used to escape a string mostly for use as part of a CSS selector.</dd>
 <dt>{{DOMxRef("CSS.factory_functions", 'CSS factory functions')}}</dt>
 <dd>Can be used to return a new <code><a href="/en-US/docs/Web/API/CSSUnitValue">CSSUnitValue</a></code> with a value of the parameter number of the units of the name of the factory function method used.</dd>
 <dd>
 <pre class="notranslate">CSS.em(3) // CSSUnitValue {value: 3, unit: "em"}</pre>
 </dd>
</dl>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('CSS Painting API','#dom-css-paintworklet','paintWorklet')}}</td>
   <td>{{Spec2('CSS Painting API')}}</td>
   <td>Adds the <code>paintWorklet</code> static property.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSSOM', '#the-css.escape()-method', 'CSS')}}</td>
   <td>{{Spec2('CSSOM')}}</td>
   <td>Adds the <code>escape()</code> static method.</td>
  </tr>
  <tr>
   <td>{{SpecName('CSS3 Conditional', '#the-css-interface', 'CSS')}}</td>
   <td>{{Spec2('CSS3 Conditional')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>



<p>{{Compat("api.CSS", 1)}}</p>

<h2 id="See_Also">See Also</h2>

<ul>
 <li><a href="/en-US/docs/Components.utils.importGlobalProperties">Components.utils.importGlobalProperties</a></li>
</ul>