CssBlock
Represents a block of CSS property values. Contains collection of key-value pairs that are CSS properties for specific css class. Css class can be either custom or html tag name.
Constructors
CssBlock(string, Dictionary<string, string>, List<CssBlockSelectorItem>, bool)
Creates a new block from the block's source
- class
- the name of the css class of the block
- properties
- the CSS block properties and values
- selectors
- optional: additional selectors to used in hierarchy
- hover
- optional: is the css block has :hover pseudo-class
Properties
Properties : IDictionary<string, string>
Gets the CSS block properties and its values
Selectors : List<CssBlockSelectorItem>
additional selectors to used in hierarchy (p className1 > className2)
Methods
Equals(CssBlock) : bool
Check if the two css blocks are the same (same class, selectors and properties).
- other
- the other block to compare to
Returns: true - the two blocks are the same, false - otherwise
Equals(object) : bool
Check if the two css blocks are the same (same class, selectors and properties).
- obj
- the other block to compare to
Returns: true - the two blocks are the same, false - otherwise
EqualsSelector(CssBlock) : bool
Check if the selectors of the css blocks is the same.
- other
- the other block to compare to
Returns: true - the selectors on blocks are the same, false - otherwise
GetHashCode() : int
Serves as a hash function for a particular type.
Returns: A hash code for the current Object.
Fields
_properties : Dictionary<string, string>
the CSS block properties and values
_selectors : List<CssBlockSelectorItem>
additional selectors to used in hierarchy (p className1 > className2)