clay-0.13.1: CSS preprocessor as embedded Haskell.

Safe HaskellNone
LanguageHaskell98

Clay.Selector

Synopsis

Documentation

star :: Selector Source #

The star selector applies to all elements. Maps to * in CSS.

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.

deep :: Selector -> Selector -> Selector Source #

Named alias for **.

(**) :: Selector -> Selector -> Selector Source #

The deep selector composer. Maps to sel1 sel2 in CSS.

child :: Selector -> Selector -> Selector Source #

Named alias for |>.

(|>) :: 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.

data Path f Source #

Constructors

Star 
Elem Text 
Child f f 
Deep f f 
Adjacent f f 
Combined f f 

Instances

Show f => Show (Path f) Source # 

Methods

showsPrec :: Int -> Path f -> ShowS #

show :: Path f -> String #

showList :: [Path f] -> ShowS #