ICSSRuleList

ICSSRuleList interface

A CSSRuleList represents an ordered collection of read-only CSSRule objects.

While the CSSRuleList object is read-only, and cannot be directly modified, it is considered a live object, as the content can change over time.

To edit the underlying rules returned by CSSRule objects, use CSSStyleSheet.insertRule() and CSSStyleSheet.deleteRule(), which are methods of CSSStyleSheet.

public interface ICSSRuleList : IEnumerable<ICSSRule>

Properties

Name Description
Item { get; } Used to retrieve a CSS rule by method item() (http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSRuleList). The order in this collection represents the order of the rules in the CSS style sheet. If index is greater than or equal to the number of rules in the list, this returns null.
Length { get; } The length property of the CSSRuleList interface returns the number of CSSRule objects in the list.

See Also