- All Superinterfaces:
CSSRule
- All Known Subinterfaces:
CSSConditionRule,CSSContainerRule,CSSCounterStyleRule,CSSFontFaceRule,CSSGroupingRule,CSSImportRule,CSSKeyframeRule,CSSKeyframesRule,CSSLayerBlockRule,CSSMarginRule,CSSNamespaceRule,CSSNestedDeclarations,CSSPageRule,CSSStyleRule,CSSSupportsRule
A CSS rule.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final shortRule is aCSSCounterStyleRule.static final shortstatic final shortstatic final shortRule is aCSSFontFaceRule.static final shortRule is aCSSFontFeatureValuesRule.static final shortRule is aCSSImportRule.static final shortRule is aCSSKeyframeRule.static final shortRule is aCSSKeyframesRule.static final shortRule is aCSSMarginRule.static final shortRule is aCSSMediaRule.static final shortRule is aCSSNamespaceRule.static final shortstatic final shortRule is aCSSPageRule.static final shortstatic final shortstatic final shortRule is aCSSStyleRule.static final shortRule is aCSSSupportsRule.static final shortRule is aCSSUnknownRule.static final shortRule is a@viewportrule.Fields inherited from interface org.w3c.dom.css.CSSRule
CHARSET_RULE -
Method Summary
Modifier and TypeMethodDescriptionIf this rule is contained inside another rule, return that rule.Get the style sheet that contains this rule.Methods inherited from interface org.w3c.dom.css.CSSRule
getCssText, getType, setCssText
-
Field Details
-
UNKNOWN_RULE
static final short UNKNOWN_RULERule is aCSSUnknownRule.- See Also:
-
STYLE_RULE
static final short STYLE_RULERule is aCSSStyleRule.- See Also:
-
IMPORT_RULE
static final short IMPORT_RULERule is aCSSImportRule.- See Also:
-
MEDIA_RULE
static final short MEDIA_RULERule is aCSSMediaRule.- See Also:
-
FONT_FACE_RULE
static final short FONT_FACE_RULERule is aCSSFontFaceRule.- See Also:
-
PAGE_RULE
static final short PAGE_RULERule is aCSSPageRule.- See Also:
-
KEYFRAMES_RULE
static final short KEYFRAMES_RULERule is aCSSKeyframesRule.- See Also:
-
KEYFRAME_RULE
static final short KEYFRAME_RULERule is aCSSKeyframeRule.- See Also:
-
MARGIN_RULE
static final short MARGIN_RULERule is aCSSMarginRule.- See Also:
-
NAMESPACE_RULE
static final short NAMESPACE_RULERule is aCSSNamespaceRule.- See Also:
-
COUNTER_STYLE_RULE
static final short COUNTER_STYLE_RULERule is aCSSCounterStyleRule.- See Also:
-
SUPPORTS_RULE
static final short SUPPORTS_RULERule is aCSSSupportsRule.- See Also:
-
DOCUMENT_RULE
static final short DOCUMENT_RULE- See Also:
-
FONT_FEATURE_VALUES_RULE
static final short FONT_FEATURE_VALUES_RULERule is aCSSFontFeatureValuesRule.- See Also:
-
VIEWPORT_RULE
static final short VIEWPORT_RULERule is a@viewportrule.Note:
@viewportrules were removed by W3C in February 2020.- See Also:
-
REGION_STYLE_RULE
static final short REGION_STYLE_RULE- See Also:
-
CUSTOM_MEDIA_RULE
static final short CUSTOM_MEDIA_RULE- See Also:
-
PROPERTY_RULE
static final short PROPERTY_RULE- See Also:
-
NESTED_DECLARATIONS
static final short NESTED_DECLARATIONS- See Also:
-
-
Method Details
-
getParentRule
CSSRule getParentRule()If this rule is contained inside another rule, return that rule. If it is not nested inside any other rules, returnnull.- Specified by:
getParentRulein interfaceCSSRule- Returns:
- the containing rule, if any, otherwise
null.
-
getParentStyleSheet
CSSStyleSheet getParentStyleSheet()Get the style sheet that contains this rule.- Specified by:
getParentStyleSheetin interfaceCSSRule- Returns:
- the style sheet, or null if no sheet contains this rule.
-