Table of Contents

Class CssRuleSet

Namespace
iText.StyledXmlParser.Css
Assembly
itext.styledxmlparser.dll

Class to store a CSS rule set.

public class CssRuleSet : CssStatement
Inheritance
CssRuleSet
Inherited Members

Constructors

CssRuleSet(ICssSelector, IList<CssDeclaration>)

Creates a new CssRuleSet from selector and raw list of declarations.

public CssRuleSet(ICssSelector selector, IList<CssDeclaration> declarations)

Parameters

selector ICssSelector

the CSS selector

declarations IList<CssDeclaration>

the CSS declarations

Remarks

Creates a new CssRuleSet from selector and raw list of declarations. The declarations are split into normal and important under the hood. To construct the CssRuleSet instance from normal and important declarations, see

CssRuleSet(ICssSelector, IList<CssDeclaration>, IList<CssDeclaration>)

public CssRuleSet(ICssSelector selector, IList<CssDeclaration> normalDeclarations, IList<CssDeclaration> importantDeclarations)

Parameters

selector ICssSelector
normalDeclarations IList<CssDeclaration>
importantDeclarations IList<CssDeclaration>

Methods

GetCssRuleSets(INode, MediaDeviceDescription)

public override IList<CssRuleSet> GetCssRuleSets(INode element, MediaDeviceDescription deviceDescription)

Parameters

element INode
deviceDescription MediaDeviceDescription

Returns

IList<CssRuleSet>

GetImportantDeclarations()

Gets the important CSS declarations.

public virtual IList<CssDeclaration> GetImportantDeclarations()

Returns

IList<CssDeclaration>

the important declarations

GetNormalDeclarations()

Gets the normal CSS declarations.

public virtual IList<CssDeclaration> GetNormalDeclarations()

Returns

IList<CssDeclaration>

the normal declarations

GetSelector()

Gets the CSS selector.

public virtual ICssSelector GetSelector()

Returns

ICssSelector

the CSS selector

ToString()

public override string ToString()

Returns

string