aboutsummaryrefslogtreecommitdiff
path: root/files/de/web/api/css
diff options
context:
space:
mode:
Diffstat (limited to 'files/de/web/api/css')
-rw-r--r--files/de/web/api/css/escape/index.html79
-rw-r--r--files/de/web/api/css/index.html90
2 files changed, 169 insertions, 0 deletions
diff --git a/files/de/web/api/css/escape/index.html b/files/de/web/api/css/escape/index.html
new file mode 100644
index 0000000000..904da32560
--- /dev/null
+++ b/files/de/web/api/css/escape/index.html
@@ -0,0 +1,79 @@
+---
+title: CSS.escape()
+slug: Web/API/CSS/escape
+tags:
+ - API
+ - CSS
+ - CSSOM
+ - Méthode
+ - Referenz
+ - Statisch
+ - escape()
+ - maskieren
+translation_of: Web/API/CSS/escape
+---
+<p>{{APIRef("CSSOM")}}{{SeeCompatTable}}</p>
+
+<p>Die statische Methode <code><strong>CSS.escape()</strong></code><strong> </strong>gibt ein {{DOMxRef("CSSOMString")}} zurück, das die maskierte Zeichenfolge des übergebenen String Parameters enthält, hauptsächlich zur Verwendung als Teil eines CSS Selektors.</p>
+
+<h2 id="Syntax">Syntax</h2>
+
+<pre class="syntaxbox notranslate"><var>escapedStr</var> = CSS.escape(<var>str</var>);
+</pre>
+
+<h3 id="Parameter">Parameter</h3>
+
+<dl>
+ <dt><em>str</em></dt>
+ <dd>Die zu maskierende Zeichenfolge {{DOMxRef("CSSOMString")}}.</dd>
+</dl>
+
+<h2 id="Beispiele">Beispiele</h2>
+
+<h3 id="Grundlegende_Ergebnisse"><span class="tlid-translation translation" lang="de"><span title="">Grundlegende Ergebnisse</span></span></h3>
+
+<pre class="brush: js notranslate">CSS.escape(".foo#bar") // "\.foo\#bar"
+CSS.escape("()[]{}") // "\(\)\[\]\\{\\}"
+CSS.escape('--a') // "--a"
+CSS.escape(0) // "\30 ", the Unicode code point of '0' is 30
+CSS.escape('\0') // "\ufffd", the Unicode REPLACEMENT CHARACTER</pre>
+
+<h3 id="Verwendung_im_Kontext">Verwendung im Kontext</h3>
+
+<p>Um einen String als Teil eines Selektors zu maskieren kann die <code>escape()</code> Methode verwendet werden:</p>
+
+<pre class="brush: js; notranslate">var element = document.querySelector('#' + CSS.escape(id) + ' &gt; img');</pre>
+
+<p>Die <code>escape()</code> Methode kann auch verwendet werden um Strings zu maskieren. Die Maskierung wird dabei auf Zeichen angewendet, die streng genommen nicht maskiert werden müssen.</p>
+
+<pre class="brush: js; notranslate">var element = document.querySelector('a[href="#' + CSS.escape(fragment) + '"]');</pre>
+
+<h2 id="Spezifikation">Spezifikation</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">Spezifikation</th>
+ <th scope="col">Status</th>
+ <th scope="col">Kommentar</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('CSSOM', '#the-css.escape()-method', 'CSS.escape()')}}</td>
+ <td>{{Spec2('CSSOM')}}</td>
+ <td>Initial definition</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browserkompatibilität">Browserkompatibilität</h2>
+
+
+
+<p>{{Compat("api.CSS.escape")}}</p>
+
+<h2 id="Siehe_auch">Siehe auch</h2>
+
+<ul>
+ <li>Das {{DOMxRef("CSS")}} Interface das die statischen Methoden beinhaltet.</li>
+ <li><a href="https://github.com/mathiasbynens/CSS.escape/blob/master/css.escape.js">Ein Polyfill für CSS.escape</a></li>
+</ul>
diff --git a/files/de/web/api/css/index.html b/files/de/web/api/css/index.html
new file mode 100644
index 0000000000..fe659bba03
--- /dev/null
+++ b/files/de/web/api/css/index.html
@@ -0,0 +1,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>