Detailed Description

A selector is made up of a series of one or more 'roots'. This is a (global) instance of one of those roots. There's three types of root: tag, id, class.

Inheritance diagram for Css.RootMatcher:
Css.SelectorMatcher Css.RootClassMatcher Css.RootIDMatcher Css.RootTagMatcher Css.RootUniversalMatcher

Public Member Functions

void SetLocals (List< LocalMatcher > locals)
 Sets the local matchers. More...
 
bool Equals (RootMatcher rm)
 True if the given root matchers are equal. More...
 
override string ToString ()
 Gets a string of all the local matchers. More...
 
- Public Member Functions inherited from Css.SelectorMatcher
virtual bool TryMatch (Dom.Node context)
 Checks if the given node matches this root/local. More...
 

Public Attributes

string Text
 The ID/Class/Tag. More...
 
bool IsTarget
 True if this root is the target. More...
 
LocalMatcher[] LocalMatchers
 Each root can have an optional collection of 'local' matchers. These will typically originate from pseudo-classes as well as the attribute selector. Things like :hover or :checked; they're local matchers. More...
 
StructureMatcher NextMatcher
 The structure matcher between this and the following root, if any. More...
 
StructureMatcher PreviousMatcher
 The structure matcher between this and the previous root, if any. More...
 
- Public Attributes inherited from Css.SelectorMatcher
Selector Selector
 The host selector. More...
 

Properties

virtual string StyleText [get]
 The text as it's seen in a stylesheet. E.g. ID. More...
 
int Specifity [get]
 The specifity. Add it to other roots to get the selectors specifity. More...
 
virtual int RootSpecifity [get]
 This matchers specifity. More...
 

Member Function Documentation

bool Css.RootMatcher.Equals ( RootMatcher  rm)
inline

True if the given root matchers are equal.

void Css.RootMatcher.SetLocals ( List< LocalMatcher locals)
inline

Sets the local matchers.

override string Css.RootMatcher.ToString ( )
inline

Gets a string of all the local matchers.

Member Data Documentation

bool Css.RootMatcher.IsTarget

True if this root is the target.

LocalMatcher [] Css.RootMatcher.LocalMatchers

Each root can have an optional collection of 'local' matchers. These will typically originate from pseudo-classes as well as the attribute selector. Things like :hover or :checked; they're local matchers.

StructureMatcher Css.RootMatcher.NextMatcher

The structure matcher between this and the following root, if any.

StructureMatcher Css.RootMatcher.PreviousMatcher

The structure matcher between this and the previous root, if any.

string Css.RootMatcher.Text

The ID/Class/Tag.

Property Documentation

virtual int Css.RootMatcher.RootSpecifity
getprotected

This matchers specifity.

int Css.RootMatcher.Specifity
get

The specifity. Add it to other roots to get the selectors specifity.

virtual string Css.RootMatcher.StyleText
get

The text as it's seen in a stylesheet. E.g. ID.