aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/api/cssstylerule/index.html
blob: 626e31f9afadf761576ff5bbfbe6183380b994a9 (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
---
title: CSSStyleRule
slug: Web/API/CSSStyleRule
tags:
  - API
translation_of: Web/API/CSSStyleRule
---
<p>{{ APIRef("CSSOM") }}</p>

<p><strong><code>CSSStyleRule</code></strong> representa una sola regla de estilos CSS. Implementa la interfaz {{domxref("CSSRule")}} with a type value of <code>1</code> (<code>CSSRule.STYLE_RULE</code>).</p>

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

<p>La sintaxis es descrita usando el formato <a class="external" href="http://dev.w3.org/2006/webapi/WebIDL/">WebIDL</a>.</p>

<pre>interface CSSStyleRule : CSSRule {
    attribute DOMString selectorText;
    readonly attribute CSSStyleDeclaration style;
};</pre>

<h2 id="Propiedades">Propiedades</h2>

<dl>
 <dt id="selectorText">{{domxref("CSSStyleRule.selectorText")}}</dt>
 <dd>Obtiene la representación textual del selector para esta regla, e.g. <code>"h1,h2"</code>.</dd>
 <dt id="style">{{domxref("CSSStyleRule.style")}} {{readonlyinline}}</dt>
 <dd>Retorna el objeto {{domxref("CSSStyleDeclaration")}} para la regla. <strong>Sólo lectura.</strong></dd>
</dl>

<h2 id="Specification" name="Specification">Especificaciones</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Especificación</th>
   <th scope="col">Estatus</th>
   <th scope="col">Comentario</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{ SpecName('CSSOM', '#the-cssstylerule-interface', 'CSSStyleRule') }}</td>
   <td>{{ Spec2('CSSOM') }}</td>
   <td>Sin cambios</td>
  </tr>
  <tr>
   <td>{{ SpecName('DOM2 Style', 'css.html#CSS-CSSStyleRule', 'CSSRule') }}</td>
   <td>{{ Spec2('DOM2 Style') }}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Compatibilidad_entre_Navegadores">Compatibilidad entre Navegadores</h2>

<p>Para obtener informacion de compatibilidad en los distintos navegadores, por favor consulta la tabla de compatibilidad de la interfaz asociada.</p>

{{Compat("api.CSSStyleRule")}}