Safe Haskell | None |
---|---|
Language | Haskell2010 |
Clay.Stylesheet
Synopsis
- 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 [(Number, [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 -> [(Number, Css)] -> Css
- keyframesFromTo :: Text -> Css -> Css -> Css
- fontFace :: Css -> Css
- importUrl :: Text -> Css
- important :: Css -> Css
- addImportant :: Rule -> Rule
Documentation
Instances
Show MediaType # | |
All MediaType # | |
Defined in Clay.Stylesheet | |
Other MediaType # | |
Defined in Clay.Stylesheet | |
Val MediaType # | |
Defined in Clay.Stylesheet |
data MediaQuery #
Constructors
MediaQuery (Maybe NotOrOnly) MediaType [Feature] |
Instances
Show MediaQuery # | |
Defined in Clay.Stylesheet Methods showsPrec :: Int -> MediaQuery -> ShowS # show :: MediaQuery -> String # showList :: [MediaQuery] -> ShowS # |
newtype CommentText #
Constructors
CommentText | |
Fields |
Instances
IsString CommentText # | |
Defined in Clay.Stylesheet Methods fromString :: String -> CommentText # | |
Monoid CommentText # | |
Defined in Clay.Stylesheet Methods mempty :: CommentText # mappend :: CommentText -> CommentText -> CommentText # mconcat :: [CommentText] -> CommentText # | |
Semigroup CommentText # | |
Defined in Clay.Stylesheet Methods (<>) :: CommentText -> CommentText -> CommentText # sconcat :: NonEmpty CommentText -> CommentText # stimes :: Integral b => b -> CommentText -> CommentText # | |
Show CommentText # | |
Defined in Clay.Stylesheet Methods showsPrec :: Int -> CommentText -> ShowS # show :: CommentText -> String # showList :: [CommentText] -> ShowS # |
Constructors
Important | |
Comment CommentText |
_Important :: Modifier -> Maybe Text #
_Comment :: Modifier -> Maybe CommentText #
(-:) :: Key Text -> Text -> Css infix 4 #
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 #
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 #
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 #
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 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 #
Apply a set of style rules when the media type and feature queries apply.
queryNot :: MediaType -> [Feature] -> Css -> Css #
Apply a set of style rules when the media type and feature queries do not apply.
queryOnly :: MediaType -> [Feature] -> Css -> Css #
Apply a set of style rules only when the media type and feature queries apply.
Indicate the supplied css should override css declarations that would otherwise take precedence.
Use sparingly.
addImportant :: Rule -> Rule #