From 1109132f09d75da9a28b649c7677bb6ce07c40c0 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:41:45 -0500 Subject: initial commit --- files/es/web/api/cssrule/csstext/index.html | 22 +++++ files/es/web/api/cssrule/index.html | 95 ++++++++++++++++++++++ .../es/web/api/cssrule/parentstylesheet/index.html | 27 ++++++ 3 files changed, 144 insertions(+) create mode 100644 files/es/web/api/cssrule/csstext/index.html create mode 100644 files/es/web/api/cssrule/index.html create mode 100644 files/es/web/api/cssrule/parentstylesheet/index.html (limited to 'files/es/web/api/cssrule') 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 +--- +
+ {{APIRef}}
+
+  
+

Summary

+

cssText returns the current text style rule.

+

Syntax

+
string = cssRule.cssText
+
+

Instance

+
if (myRule.cssText.indexOf ("background-color")! = -1) {
+   bgRule = MyRule;
+}
+...
+
+

Specification

+

DOM Level 2 Style - cssRule

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 +--- +

{{ ApiRef("CSSOM") }}

+ +

El objeto CSSRule representa una única regla de estilo CSS. Puede ser parte de una lista cssRules de hojas de estilo (stylesheet).

+ +

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.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Tipointerface específico de la reglaDescripción
CSSRule.STYLE_RULE{{ Anch("CSSStyleRule") }} 
CSSRule.MEDIA_RULE{{ Anch("CSSMediaRule") }} 
CSSRule.FONT_FACE_RULE{{ Anch("CSSFontFaceRule") }} 
CSSRule.PAGE_RULE{{ Anch("CSSPageRule") }} 
CSSRule.IMPORT_RULE{{ Anch("CSSImportRule") }} 
CSSRule.CHARSET_RULE{{ Anch("CSSCharsetRule") }} 
CSSRule.UNKNOWN_RULE{{ Anch("CSSUnknownRule") }} 
+ +

CSSRule

+ +
+
cssText
+
Devuelve la representación en forma de texto, de la regla. Ejem.: "h1,h2 { font-size: 16pt }".
+
parentRule
+
Devuelve la regla contenedora, si existe. Ejem.: una regla de estilo dentro de un bloque @media.
+
parentStyleSheet
+
Devuelve el objeto stylesheet del que esta regla es parte.
+
type
+
El tipo de regla. ejem.: CSSRule.CHARSET_RULE o CSSRule.IMPORT_RULE.
+
+ +

CSSStyleRule

+ +
+
selectorText
+
Recoje/Establece la representación en forma de texto, del selector de la regle. Ejem.: "h1,h2".
+
style
+
Devuelve el objeto CSSStyleDeclaration para el bloque declaration block de la regla.
+
+ +

CSSStyleRule

+ +

CSSMediaRule

+ +

CSSFontFaceRule

+ +

CSSPageRule

+ +

CSSImportRule

+ +

CSSCharsetRule

+ +

CSSUnknownRule

+ +

Specification

+ +

DOM Level 2 CSS: CSSRule

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 +--- +
+ {{APIRef}}
+
+  
+

Summary

+

parentStyleSheet returns the object type of style sheet, in which the rule is defined.

+

Syntax

+
stylesheet = cssRule.parentStyleSheet
+
+

Parameters

+ +

Instance

+
if (bgRule.parentStyleSheet! = MySheet) {
+   // Style alien rule!
+}
+
+

Letters

+

See Gecko DOM Reference: event # DOM_styleSheet_Object for more information about the interface type objects stylesheet.

+

Specification

+

DOM Level 2 Style - cssRule

-- cgit v1.2.3-54-g00ecf