Safe Haskell | None |
---|
- newtype MediaType = MediaType Value
- data NotOrOnly
- data MediaQuery = MediaQuery (Maybe NotOrOnly) MediaType [Feature]
- data Feature = Feature Text (Maybe Value)
- data App
- data Rule
- newtype StyleM a = S (Writer [Rule] a)
- type Css = StyleM ()
- key :: Val a => Key a -> a -> Css
- prefixed :: Val a => Prefixed -> a -> Css
- (-:) :: Key Text -> Text -> Css
- (?) :: Selector -> Css -> Css
- (<?) :: Selector -> Css -> Css
- (&) :: Refinement -> Css -> Css
- root :: Selector -> Css -> Css
- pop :: Int -> Css -> Css
- query :: MediaType -> [Feature] -> Css -> Css
- queryNot :: MediaType -> [Feature] -> Css -> Css
- queryOnly :: MediaType -> [Feature] -> Css -> Css
- fontFace :: Css -> Css
Documentation
(-:) :: Key Text -> Text -> CssSource
The colon operator can be used to add style rules to the current context for which there is no embedded version available. Both the key and the value are plain text values and rendered as is to the output CSS.
(?) :: Selector -> Css -> CssSource
Assign a stylesheet to a selector. When the selector is nested inside an
outer scope it will be composed with deep
.
(<?) :: Selector -> Css -> CssSource
Assign a stylesheet to a selector. When the selector is nested inside an
outer scope it will be composed with |>
.
(&) :: Refinement -> Css -> CssSource
Assign a stylesheet to a filter selector. When the selector is nested
inside an outer scope it will be composed with the with
selector.
pop :: Int -> Css -> CssSource
Pop is used to add style rules to selectors defined in an outer scope. The counter specifies how far up the scope stack we want to add the rules.
query :: MediaType -> [Feature] -> Css -> CssSource
Apply a set of style rules when the media type and feature queries apply.
queryNot :: MediaType -> [Feature] -> Css -> CssSource
Apply a set of style rules when the media type and feature queries do not apply.