CSSLayerBlockRule

CSSLayerBlockRule

Overview

CSSLayerBlockRule is a class in Aspose.Html FOSS for Python. Inherits from: CSSRule.

A CSS @layer block rule assigning child rules to a named cascade layer.

This class provides 3 methods for working with CSSLayerBlockRule objects in Python programs. Available methods include: __init__, delete_rule, insert_rule. All public members are accessible to any Python application after installing the Aspose.Html FOSS for Python package. Properties: CHARSET_RULE, COUNTER_STYLE_RULE, FONT_FACE_RULE, FONT_FEATURE_VALUES_RULE, IMPORT_RULE, KEYFRAMES_RULE, and 15 more.

Properties

NameTypeAccessDescription
typeintReadReturn the CSSOM rule type constant (LAYER_BLOCK_RULE = 1000).
css_textstrReadSerialise the rule to CSS text.
LAYER_BLOCK_RULEintReadGets the layer block rule.
namestrReadGets the name.
css_rulesCSSRuleListReadGets the css rules.
UNKNOWN_RULEintReadGets the unknown rule.
STYLE_RULEintReadGets the style rule.
CHARSET_RULEintReadGets the charset rule.
IMPORT_RULEintReadGets the import rule.
MEDIA_RULEintReadGets the media rule.
FONT_FACE_RULEintReadGets the font face rule.
PAGE_RULEintReadGets the page rule.
KEYFRAMES_RULEintReadGets the keyframes rule.
KEYFRAME_RULEintReadGets the keyframe rule.
NAMESPACE_RULEintReadGets the namespace rule.
COUNTER_STYLE_RULEintReadGets the counter style rule.
SUPPORTS_RULEintReadGets the supports rule.
FONT_FEATURE_VALUES_RULEintReadGets the font feature values rule.
LAYER_STATEMENT_RULEintReadGets the layer statement rule.
parent_style_sheetCSSStyleSheet | NoneReadGets the parent style sheet.
parent_ruleCSSRule | NoneReadGets the parent rule.

Methods

SignatureDescription
__init__(name: str)Calls init(name) on this CSSLayerBlockRule instance.
insert_rule(rule_text: str, index: int)intInsert a CSS rule into the nested rule list (CSSOM §6.7).
delete_rule(index: int)Remove the rule at index from the nested rule list (CSSOM §6.7).

See Also