Safe Haskell | Safe |
---|---|
Language | Haskell98 |
Text.CSS3.Selectors.Syntax
Description
Syntax of CSS3 selectors.
- data SelectorGroup = SelectorGroup Selector [Selector]
- data Selector = Selector SimpleSelectorSequence (Maybe (Combinator, Selector))
- data SimpleSelectorSequence = SimpleSelectorSequence HeadSimpleSelector [TailSimpleSelector]
- data HeadSimpleSelector
- data TailSimpleSelector
- data Combinator
- data AttributeOperator
- data PseudoClass
- data PseudoClassParameter = PseudoClassParameter Integer Integer
- data Specificity = Specificity !Int !Int !Int
- specificity :: Selector -> Specificity
Documentation
Constructors
Selector SimpleSelectorSequence (Maybe (Combinator, Selector)) |
data SimpleSelectorSequence Source #
Constructors
SimpleSelectorSequence HeadSimpleSelector [TailSimpleSelector] |
data HeadSimpleSelector Source #
Constructors
TypeSelector String | type |
UniversalSelector | * |
data TailSimpleSelector Source #
Constructors
AttributeSelector String (Maybe (AttributeOperator, String)) |
|
ClassSelector String | .class |
IDSelector String | #id |
PseudoClass PseudoClass | :pseudo-class |
data Combinator Source #
Constructors
Descendant | E F |
Child | E > F |
AdjacentSibling | E + F |
GeneralSibling | E ~ F |
Instances
data AttributeOperator Source #
Constructors
ExactMatch | A = V |
IncludesMatch | A ~= V |
DashMatch | A |= V |
PrefixMatch | A ^= V |
SuffixMatch | A $= V |
InfixMatch | A *= V |
Instances
data PseudoClass Source #
Constructors
Root | |
NthChild PseudoClassParameter | |
NthLastChild PseudoClassParameter | |
NthOfType PseudoClassParameter | |
NthLastOfType PseudoClassParameter | |
FirstChild | |
LastChild | |
FirstOfType | |
LastOfType | |
OnlyChild | |
OnlyOfType | |
Empty | |
Not (Either HeadSimpleSelector TailSimpleSelector) | Note: According to the specs, |
Instances
data PseudoClassParameter Source #
Constructors
PseudoClassParameter Integer Integer |
data Specificity Source #
The specificity of a selector with its components decreasing in significance from left to
right. The components in Specificity a b c
denote
a
: the number of ID selectors,b
: the number of class selectors, attribute selectors and pseudo-classes (not counting the:not
pseudo-class itself), andc
: the number of type selectors and pseudo-elements
as described in http://www.w3.org/TR/selectors/#specificity.
Constructors
Specificity !Int !Int !Int |
Instances
specificity :: Selector -> Specificity Source #
Returns the specificity for a selector.