Safe Haskell | None |
---|---|
Language | Haskell98 |
- newtype MediaType = MediaType Value
- data NotOrOnly
- data MediaQuery = MediaQuery (Maybe NotOrOnly) MediaType [Feature]
- data Feature = Feature Text (Maybe Value)
- newtype CommentText = CommentText {}
- data Modifier
- _Important :: Modifier -> Maybe Text
- _Comment :: Modifier -> Maybe CommentText
- data App
- data Keyframes = Keyframes Text [(Double, [Rule])]
- data Rule
- newtype StyleM a = S (Writer [Rule] a)
- runS :: Css -> [Rule]
- rule :: Rule -> Css
- 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
- keyframes :: Text -> [(Double, Css)] -> Css
- keyframesFromTo :: Text -> Css -> Css -> Css
- fontFace :: Css -> Css
- importUrl :: Text -> Css
- important :: Css -> Css
- addImportant :: Rule -> Rule
Documentation
newtype CommentText Source #
(-:) :: Key Text -> Text -> Css infix 4 Source #
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 -> Css infixr 5 Source #
Assign a stylesheet to a selector. When the selector is nested inside an
outer scope it will be composed with deep
.
(<?) :: Selector -> Css -> Css infixr 5 Source #
Assign a stylesheet to a selector. When the selector is nested inside an
outer scope it will be composed with |>
.
(&) :: Refinement -> Css -> Css infixr 5 Source #
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 -> Css Source #
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 -> Css Source #
Apply a set of style rules when the media type and feature queries apply.
queryNot :: MediaType -> [Feature] -> Css -> Css Source #
Apply a set of style rules when the media type and feature queries do not apply.
queryOnly :: MediaType -> [Feature] -> Css -> Css Source #
Apply a set of style rules only when the media type and feature queries apply.
important :: Css -> Css Source #
Indicate the supplied css should override css declarations that would otherwise take precedence.
Use sparingly.
addImportant :: Rule -> Rule Source #