diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:45 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:45 -0500 |
commit | 1109132f09d75da9a28b649c7677bb6ce07c40c0 (patch) | |
tree | 0dd8b084480983cf9f9680e8aedb92782a921b13 /files/es/web/api/cssrule | |
parent | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (diff) | |
download | translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.gz translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.tar.bz2 translated-content-1109132f09d75da9a28b649c7677bb6ce07c40c0.zip |
initial commit
Diffstat (limited to 'files/es/web/api/cssrule')
-rw-r--r-- | files/es/web/api/cssrule/csstext/index.html | 22 | ||||
-rw-r--r-- | files/es/web/api/cssrule/index.html | 95 | ||||
-rw-r--r-- | files/es/web/api/cssrule/parentstylesheet/index.html | 27 |
3 files changed, 144 insertions, 0 deletions
diff --git a/files/es/web/api/cssrule/csstext/index.html b/files/es/web/api/cssrule/csstext/index.html new file mode 100644 index 0000000000..4dd97fff2c --- /dev/null +++ b/files/es/web/api/cssrule/csstext/index.html @@ -0,0 +1,22 @@ +--- +title: CssRule.cssText +slug: Web/API/CSSRule/cssText +translation_of: Web/API/CSSRule/cssText +--- +<div> + {{APIRef}}</div> +<div> + </div> +<p><span style="font-size: 1.71428571428571rem; letter-spacing: -0.5px; line-height: 24px;">Summary</span></p> +<p><strong><font><font>cssText</font></font></strong><font><font> returns the current text style rule.</font></font></p> +<h3 id="Syntax" name="Syntax"><font><font>Syntax</font></font></h3> +<pre class="eval"><em><font><font>string</font></font></em> = cssRule.cssText +</pre> +<h3 id="Example" name="Example"><font><font>Instance</font></font></h3> +<pre class="eval">if (myRule.cssText.indexOf ("background-color")! = -1) { + bgRule = MyRule; +} +... +</pre> +<h3 id="Specification" name="Specification"><font><font>Specification</font></font></h3> +<p><font><font>DOM Level 2 Style - cssRule</font></font></p> diff --git a/files/es/web/api/cssrule/index.html b/files/es/web/api/cssrule/index.html new file mode 100644 index 0000000000..bd8837d217 --- /dev/null +++ b/files/es/web/api/cssrule/index.html @@ -0,0 +1,95 @@ +--- +title: CssRule +slug: Web/API/CSSRule +translation_of: Web/API/CSSRule +--- +<p>{{ ApiRef("CSSOM") }}</p> + +<p>El objeto <code>CSSRule </code>representa una única regla de estilo CSS. Puede ser parte de una lista <a href="/Es/DOM/Stylesheet.cssRules" title="es/DOM/stylesheet.cssRules">cssRules</a> de hojas de estilo (<a href="/Es/DOM/Stylesheet" title="es/DOM/stylesheet">stylesheet</a>).</p> + +<p>Existen varias clases de reglas y todas ellas comparten unas cuantas propiedades comunes en el interface {{ Anch("CSSRule") }} y la mayor parte de ellas son propiedades específicas de un tipo particular de reglas.</p> + +<table class="fullwidth-table"> + <tbody> + <tr> + <th>Tipo</th> + <th>interface específico de la regla</th> + <th>Descripción</th> + </tr> + <tr> + <td><code>CSSRule.STYLE_RULE</code></td> + <td>{{ Anch("CSSStyleRule") }}</td> + <td> </td> + </tr> + <tr> + <td><code>CSSRule.MEDIA_RULE</code></td> + <td>{{ Anch("CSSMediaRule") }}</td> + <td> </td> + </tr> + <tr> + <td><code>CSSRule.FONT_FACE_RULE</code></td> + <td>{{ Anch("CSSFontFaceRule") }}</td> + <td> </td> + </tr> + <tr> + <td><code>CSSRule.PAGE_RULE</code></td> + <td>{{ Anch("CSSPageRule") }}</td> + <td> </td> + </tr> + <tr> + <td><code>CSSRule.IMPORT_RULE</code></td> + <td>{{ Anch("CSSImportRule") }}</td> + <td> </td> + </tr> + <tr> + <td><code>CSSRule.CHARSET_RULE</code></td> + <td>{{ Anch("CSSCharsetRule") }}</td> + <td> </td> + </tr> + <tr> + <td><code>CSSRule.UNKNOWN_RULE</code></td> + <td>{{ Anch("CSSUnknownRule") }}</td> + <td> </td> + </tr> + </tbody> +</table> + +<h3 id="CSSRule" name="CSSRule">CSSRule</h3> + +<dl> + <dt><a href="/Es/DOM/CssRule.cssText" title="es/DOM/cssRule.cssText">cssText</a></dt> + <dd>Devuelve la representación en forma de texto, de la regla. Ejem.: "h1,h2 { font-size: 16pt }".</dd> + <dt><a href="/es/DOM/cssRule.parentRule" title="es/DOM/cssRule.parentRule">parentRule</a></dt> + <dd>Devuelve la regla contenedora, si existe. Ejem.: una regla de estilo dentro de un bloque @media.</dd> + <dt><a href="/Es/DOM/CssRule.parentStyleSheet" title="es/DOM/cssRule.parentStyleSheet">parentStyleSheet</a></dt> + <dd>Devuelve el objeto <a href="/Es/DOM/Stylesheet" title="es/DOM/stylesheet">stylesheet</a> del que esta regla es parte.</dd> + <dt><a href="/es/DOM/cssRule.type" title="es/DOM/cssRule.type">type</a></dt> + <dd>El tipo de regla. ejem.: <code>CSSRule.CHARSET_RULE</code> o <code>CSSRule.IMPORT_RULE</code>.</dd> +</dl> + +<h3 id="CSSStyleRule" name="CSSStyleRule">CSSStyleRule</h3> + +<dl> + <dt><a href="/Es/DOM/CssRule.selectorText" title="es/DOM/cssRule.selectorText">selectorText</a></dt> + <dd>Recoje/Establece la representación en forma de texto, del selector de la regle. Ejem.: "h1,h2".</dd> + <dt><a href="/Es/DOM/CssRule.style" title="es/DOM/cssRule.style">style</a></dt> + <dd>Devuelve el objeto <a class="external" href="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration">CSSStyleDeclaration</a> para el bloque <a class="external" href="http://www.w3.org/TR/1998/REC-CSS2-19980512/syndata.html#block">declaration block</a> de la regla.</dd> +</dl> + +<h3 id="CSSStyleRule_2" name="CSSStyleRule_2">CSSStyleRule</h3> + +<h3 id="CSSMediaRule" name="CSSMediaRule">CSSMediaRule</h3> + +<h3 id="CSSFontFaceRule" name="CSSFontFaceRule">CSSFontFaceRule</h3> + +<h3 id="CSSPageRule" name="CSSPageRule">CSSPageRule</h3> + +<h3 id="CSSImportRule" name="CSSImportRule">CSSImportRule</h3> + +<h3 id="CSSCharsetRule" name="CSSCharsetRule">CSSCharsetRule</h3> + +<h3 id="CSSUnknownRule" name="CSSUnknownRule">CSSUnknownRule</h3> + +<h3 id="Specification" name="Specification">Specification</h3> + +<p><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRule">DOM Level 2 CSS: CSSRule</a></p> diff --git a/files/es/web/api/cssrule/parentstylesheet/index.html b/files/es/web/api/cssrule/parentstylesheet/index.html new file mode 100644 index 0000000000..f66c603137 --- /dev/null +++ b/files/es/web/api/cssrule/parentstylesheet/index.html @@ -0,0 +1,27 @@ +--- +title: cssRule.parentStyleSheet +slug: Web/API/CSSRule/parentStyleSheet +translation_of: Web/API/CSSRule/parentStyleSheet +--- +<div> + {{APIRef}}</div> +<div> + </div> +<p><span style="font-size: 1.71428571428571rem; letter-spacing: -0.5px; line-height: 24px;">Summary</span></p> +<p><strong><font><font>parentStyleSheet</font></font></strong><font><font> returns the object type of style sheet, in which the rule is defined.</font></font></p> +<h3 id="Syntax" name="Syntax"><font><font>Syntax</font></font></h3> +<pre class="eval"><em><font><font>stylesheet</font></font></em> = cssRule.parentStyleSheet +</pre> +<h3 id="Parameters" name="Parameters"><font><font>Parameters</font></font></h3> +<ul> + <li><code><font><font>stylesheet</font></font></code><font><font> stylesheet is an object type.</font></font></li> +</ul> +<h3 id="Example" name="Example"><font><font>Instance</font></font></h3> +<pre class="eval">if (bgRule.parentStyleSheet! = MySheet) { + // Style alien rule! +} +</pre> +<h3 id="Notes" name="Notes"><font><font>Letters</font></font></h3> +<p><font><font>See </font></font><a href="/es/DOM/event#DOM_styleSheet_Object" title="en / DOM / event # DOM_styleSheet_Object"><font><font>Gecko DOM Reference: event # DOM_styleSheet_Object</font></font></a><font><font> for more information about the interface type objects stylesheet.</font></font></p> +<h3 id="Specification" name="Specification"><font><font>Specification</font></font></h3> +<p><font><font>DOM Level 2 Style - cssRule</font></font></p> |