Detailed Description

Holds a set of selector styles. A selector is something like .name or #name.

Public Member Functions

 StyleSheet (Node owner)
 Creates an empty stylesheet that belongs to the given document. More...
 
void insertRule (string css, int index)
 Adds a new rule to the set. More...
 
void Add (Rule rule, Rule[] set, bool immediate)
 
void ParseCss (string css)
 Keeps reading selectors and their properties until a > or the end of the css is reached. More...
 

Public Attributes

Rule ownerRule
 The rule that imported this stylesheet. More...
 
Dom.Location Location
 The full location of this sheet. More...
 
CssNamespace Namespace
 The default namespace being used if any. More...
 
Dictionary< string, CssNamespaceNamespaces
 Css namespace prefixes, if any. More...
 
List< Css.RulecssRules =new List<Css.Rule>()
 The rules on this style sheet. Note that CSS lookups don't use this set. Instead, all CSS lookups route through a single set on the document itself. More...
 
Node ownerNode
 The owning element of this style sheet. More...
 

Package Functions

void RemoveSheet (ReflowDocument document)
 Removes this stylesheet from the given documents fast lookups. More...
 
void ReAddSheet (ReflowDocument document)
 Adds this stylesheet to the documents fast lookups. This is used by the default stylesheet. More...
 

Package Attributes

int Priority
 The priority (load order) of this stylesheet. More...
 

Properties

bool IsUserAgent [get]
 True if this is a UA sheet. More...
 
ReflowDocument document [get]
 The document this sheet belongs to, if any. More...
 
bool disabled [get, set]
 Is this stylesheet disabled? More...
 
string title [get]
 This sheets title. More...
 
List< Css.Rulerules [get]
 The rules on this style sheet. More...
 
Node owningElement [get]
 The owning element of this style sheet. More...
 
string href [get]
 The URL of this stylesheet (if it's external). More...
 
string media [get]
 The media. More...
 
string type [get]
 This style sheets type. More...
 

Private Attributes

bool IsDisabled
 True if this sheet is disabled. More...
 

Constructor & Destructor Documentation

Css.StyleSheet.StyleSheet ( Node  owner)
inline

Creates an empty stylesheet that belongs to the given document.

Parameters
documentThe html document that this sheet belongs to.

Member Function Documentation

void Css.StyleSheet.Add ( Rule  rule,
Rule[]  set,
bool  immediate 
)
inline
void Css.StyleSheet.insertRule ( string  css,
int  index 
)
inline

Adds a new rule to the set.

void Css.StyleSheet.ParseCss ( string  css)
inline

Keeps reading selectors and their properties until a > or the end of the css is reached.

Parameters
cssThe css text to parse.
void Css.StyleSheet.ReAddSheet ( ReflowDocument  document)
inlinepackage

Adds this stylesheet to the documents fast lookups. This is used by the default stylesheet.

void Css.StyleSheet.RemoveSheet ( ReflowDocument  document)
inlinepackage

Removes this stylesheet from the given documents fast lookups.

Member Data Documentation

List<Css.Rule> Css.StyleSheet.cssRules =new List<Css.Rule>()

The rules on this style sheet. Note that CSS lookups don't use this set. Instead, all CSS lookups route through a single set on the document itself.

bool Css.StyleSheet.IsDisabled
private

True if this sheet is disabled.

Dom.Location Css.StyleSheet.Location

The full location of this sheet.

CssNamespace Css.StyleSheet.Namespace

The default namespace being used if any.

Dictionary<string,CssNamespace> Css.StyleSheet.Namespaces

Css namespace prefixes, if any.

Node Css.StyleSheet.ownerNode

The owning element of this style sheet.

Rule Css.StyleSheet.ownerRule

The rule that imported this stylesheet.

int Css.StyleSheet.Priority
package

The priority (load order) of this stylesheet.

Property Documentation

bool Css.StyleSheet.disabled
getset

Is this stylesheet disabled?

ReflowDocument Css.StyleSheet.document
get

The document this sheet belongs to, if any.

string Css.StyleSheet.href
get

The URL of this stylesheet (if it's external).

bool Css.StyleSheet.IsUserAgent
get

True if this is a UA sheet.

string Css.StyleSheet.media
get

The media.

Node Css.StyleSheet.owningElement
get

The owning element of this style sheet.

List<Css.Rule> Css.StyleSheet.rules
get

The rules on this style sheet.

string Css.StyleSheet.title
get

This sheets title.

string Css.StyleSheet.type
get

This style sheets type.