Copyright | (c) 2017 Cristian Adrián Ontivero |
---|---|
License | BSD3 |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
- data Expression
- data MediaQuery
- data Rule
- = AtCharset StringType
- | AtImport (Either StringType Url) [MediaQuery]
- | AtNamespace Text (Either StringType Url)
- | AtMedia [MediaQuery] [Rule]
- | AtKeyframes VendorPrefix Text [KeyframeBlock]
- | AtSupports SupportsCondition [Rule]
- | AtBlockWithRules Text [Rule]
- | AtBlockWithDec Text [Declaration]
- | StyleRule [Selector] [Declaration]
- data KeyframeSelector
- = From
- | To
- | KFPercentage Percentage
- data KeyframeBlock = KeyframeBlock [KeyframeSelector] [Declaration]
- data SupportsCondition
- data SupportsCondInParens
- minifyRules :: [Rule] -> Reader Config [Rule]
- collapse :: [Declaration] -> [Declaration]
- mergeRules :: [Rule] -> [Rule]
Documentation
data Expression Source #
data MediaQuery Source #
Data type for media queries. For the syntax, see media query syntax.
MediaQuery1 Text Text [Expression] | First possibility in the grammar |
MediaQuery2 [Expression] | Second possibility in the grammar |
A CSS rule, either a normal style rule, or one of the many possible at-rules.
AtCharset StringType | |
AtImport (Either StringType Url) [MediaQuery] | |
AtNamespace Text (Either StringType Url) | |
AtMedia [MediaQuery] [Rule] | |
AtKeyframes VendorPrefix Text [KeyframeBlock] | |
AtSupports SupportsCondition [Rule] | |
AtBlockWithRules Text [Rule] | |
AtBlockWithDec Text [Declaration] | |
StyleRule [Selector] [Declaration] |
data KeyframeSelector Source #
data KeyframeBlock Source #
data SupportsCondition Source #
data SupportsCondInParens Source #
collapse :: [Declaration] -> [Declaration] Source #
Given a list of declarations, gathers the longhands, and if every longhand of a given shorthand is present, "collapses" them into the shorthand (i.e. replaces all the declarations for an equivalent shorthand).
mergeRules :: [Rule] -> [Rule] Source #