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
CssStatementthe CSS statement
AppendCssStyleSheet(CssStyleSheet)
Append another CSS style sheet to this one.
public virtual void AppendCssStyleSheet(CssStyleSheet anotherCssStyleSheet)
Parameters
anotherCssStyleSheet
CssStyleSheetthe 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
INodethe node
deviceDescription
MediaDeviceDescriptionthe 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
INodethe node
deviceDescription
MediaDeviceDescriptionthe 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()