Safe Haskell | None |
---|---|
Language | Haskell98 |
- star :: Selector
- element :: Text -> Selector
- deep :: Selector -> Selector -> Selector
- (**) :: Selector -> Selector -> Selector
- child :: Selector -> Selector -> Selector
- (|>) :: Selector -> Selector -> Selector
- (|+) :: Selector -> Selector -> Selector
- with :: Selector -> Refinement -> Selector
- (#) :: Selector -> Refinement -> Selector
- byId :: Text -> Refinement
- byClass :: Text -> Refinement
- pseudo :: Text -> Refinement
- func :: Text -> [Text] -> Refinement
- attr :: Text -> Refinement
- (@=) :: Text -> Text -> Refinement
- (^=) :: Text -> Text -> Refinement
- ($=) :: Text -> Text -> Refinement
- (*=) :: Text -> Text -> Refinement
- (~=) :: Text -> Text -> Refinement
- (|=) :: Text -> Text -> Refinement
- data Predicate
- newtype Refinement = Refinement {}
- filterFromText :: Text -> Refinement
- data Path f
- newtype Fix f = In {}
- data SelectorF a = SelectorF Refinement (Path a)
- type Selector = Fix SelectorF
- text :: Text -> Selector
Documentation
element :: Text -> Selector Source
Select elements by name. The preferred syntax is to enable
OverloadedStrings
and actually just use "element-name"
or use one of
the predefined elements from Clay.Elements.
(**) :: Selector -> Selector -> Selector Source
The deep selector composer. Maps to sel1 sel2
in CSS.
(|>) :: Selector -> Selector -> Selector Source
The child selector composer. Maps to sel1 > sel2
in CSS.
(|+) :: Selector -> Selector -> Selector Source
The adjacent selector composer. Maps to sel1 + sel2
in CSS.
with :: Selector -> Refinement -> Selector Source
Named alias for `#`.
(#) :: Selector -> Refinement -> Selector Source
The filter selector composer, adds a filter to a selector. Maps to
something like sel#filter
or sel.filter
in CSS, depending on the filter.
byId :: Text -> Refinement Source
Filter elements by id. The preferred syntax is to enable
OverloadedStrings
and use "#id-name"
.
byClass :: Text -> Refinement Source
Filter elements by class. The preferred syntax is to enable
OverloadedStrings
and use ".class-name"
.
pseudo :: Text -> Refinement Source
Filter elements by pseudo selector or pseudo class. The preferred syntax
is to enable OverloadedStrings
and use ":pseudo-selector"
or use one
of the predefined ones from Clay.Pseudo.
func :: Text -> [Text] -> Refinement Source
Filter elements by pseudo selector functions. The preferred way is to use one of the predefined functions from Clay.Pseudo.
attr :: Text -> Refinement Source
Filter elements based on the presence of a certain attribute. The
preferred syntax is to enable OverloadedStrings
and use
"@attr"
or use one of the predefined ones from Clay.Attributes.
(@=) :: Text -> Text -> Refinement Source
Filter elements based on the presence of a certain attribute with the specified value.
(^=) :: Text -> Text -> Refinement Source
Filter elements based on the presence of a certain attribute that begins with the selected value.
($=) :: Text -> Text -> Refinement Source
Filter elements based on the presence of a certain attribute that ends with the specified value.
(*=) :: Text -> Text -> Refinement Source
Filter elements based on the presence of a certain attribute that contains the specified value as a substring.
(~=) :: Text -> Text -> Refinement Source
Filter elements based on the presence of a certain attribute that have the specified value contained in a space separated list.
(|=) :: Text -> Text -> Refinement Source
Filter elements based on the presence of a certain attribute that have the specified value contained in a hyphen separated list.
filterFromText :: Text -> Refinement Source
SelectorF Refinement (Path a) |