Table of Contents

Class CssStyleSheet

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

Class that stores all the CSS statements, and thus acts as a CSS style sheet.

public class CssStyleSheet
Inheritance
CssStyleSheet
Inherited Members

Constructors

CssStyleSheet()

Creates a new CssStyleSheet instance.

public CssStyleSheet()

Methods

AddStatement(CssStatement)

Adds a CSS statement to the style sheet.

public virtual void AddStatement(CssStatement statement)

Parameters

statement CssStatement

the CSS statement

AppendCssStyleSheet(CssStyleSheet)

Append another CSS style sheet to this one.

public virtual void AppendCssStyleSheet(CssStyleSheet anotherCssStyleSheet)

Parameters

anotherCssStyleSheet CssStyleSheet

the other CSS style sheet

ExtractStylesFromRuleSets(IList<CssRuleSet>)

Gets the CSS declarations.

public static IDictionary<string, string> ExtractStylesFromRuleSets(IList<CssRuleSet> ruleSets)

Parameters

ruleSets IList<CssRuleSet>

list of css rule sets

Returns

IDictionary<string, string>

the CSS declarations

GetCssDeclarations(INode, MediaDeviceDescription)

Gets the CSS declarations.

public virtual IList<CssDeclaration> GetCssDeclarations(INode node, MediaDeviceDescription deviceDescription)

Parameters

node INode

the node

deviceDescription MediaDeviceDescription

the media device description

Returns

IList<CssDeclaration>

the CSS declarations

GetCssRuleSets(INode, MediaDeviceDescription)

Gets the CSS rule sets.

public virtual IList<CssRuleSet> GetCssRuleSets(INode node, MediaDeviceDescription deviceDescription)

Parameters

node INode

the node

deviceDescription MediaDeviceDescription

the device description

Returns

IList<CssRuleSet>

the css rule sets

GetStatements()

Gets the CSS statements of this style sheet.

public virtual IList<CssStatement> GetStatements()

Returns

IList<CssStatement>

the CSS statements

ToString()

public override string ToString()

Returns

string