Copyright | (c) 2017 Cristian Adrián Ontivero |
---|---|
License | BSD3 |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- 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 #
Instances
Eq Expression Source # | |
Defined in Hasmin.Types.Stylesheet (==) :: Expression -> Expression -> Bool # (/=) :: Expression -> Expression -> Bool # | |
Show Expression Source # | |
Defined in Hasmin.Types.Stylesheet showsPrec :: Int -> Expression -> ShowS # show :: Expression -> String # showList :: [Expression] -> ShowS # | |
ToText Expression Source # | |
Defined in Hasmin.Types.Stylesheet toText :: Expression -> Text Source # toBuilder :: Expression -> Builder Source # | |
Minifiable Expression Source # | |
Defined in Hasmin.Types.Stylesheet minify :: Expression -> Reader Config 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 |
Instances
Eq MediaQuery Source # | |
Defined in Hasmin.Types.Stylesheet (==) :: MediaQuery -> MediaQuery -> Bool # (/=) :: MediaQuery -> MediaQuery -> Bool # | |
Show MediaQuery Source # | |
Defined in Hasmin.Types.Stylesheet showsPrec :: Int -> MediaQuery -> ShowS # show :: MediaQuery -> String # showList :: [MediaQuery] -> ShowS # | |
ToText MediaQuery Source # | |
Defined in Hasmin.Types.Stylesheet toText :: MediaQuery -> Text Source # toBuilder :: MediaQuery -> Builder Source # | |
Minifiable MediaQuery Source # | |
Defined in Hasmin.Types.Stylesheet minify :: MediaQuery -> Reader Config MediaQuery Source # | |
Minifiable [MediaQuery] Source # | |
Defined in Hasmin.Types.Stylesheet minify :: [MediaQuery] -> Reader Config [MediaQuery] Source # |
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 #
Instances
Eq KeyframeSelector Source # | |
Defined in Hasmin.Types.Stylesheet (==) :: KeyframeSelector -> KeyframeSelector -> Bool # (/=) :: KeyframeSelector -> KeyframeSelector -> Bool # | |
Show KeyframeSelector Source # | |
Defined in Hasmin.Types.Stylesheet showsPrec :: Int -> KeyframeSelector -> ShowS # show :: KeyframeSelector -> String # showList :: [KeyframeSelector] -> ShowS # | |
ToText KeyframeSelector Source # | |
Defined in Hasmin.Types.Stylesheet toText :: KeyframeSelector -> Text Source # toBuilder :: KeyframeSelector -> Builder Source # | |
Minifiable KeyframeSelector Source # | |
Defined in Hasmin.Types.Stylesheet |
data KeyframeBlock Source #
Instances
Eq KeyframeBlock Source # | |
Defined in Hasmin.Types.Stylesheet (==) :: KeyframeBlock -> KeyframeBlock -> Bool # (/=) :: KeyframeBlock -> KeyframeBlock -> Bool # | |
Show KeyframeBlock Source # | |
Defined in Hasmin.Types.Stylesheet showsPrec :: Int -> KeyframeBlock -> ShowS # show :: KeyframeBlock -> String # showList :: [KeyframeBlock] -> ShowS # | |
ToText KeyframeBlock Source # | |
Defined in Hasmin.Types.Stylesheet toText :: KeyframeBlock -> Text Source # toBuilder :: KeyframeBlock -> Builder Source # | |
Minifiable KeyframeBlock Source # | |
Defined in Hasmin.Types.Stylesheet |
data SupportsCondition Source #
Not SupportsCondInParens | |
And SupportsCondInParens (NonEmpty SupportsCondInParens) | |
Or SupportsCondInParens (NonEmpty SupportsCondInParens) | |
Parens SupportsCondInParens |
Instances
Eq SupportsCondition Source # | |
Defined in Hasmin.Types.Stylesheet (==) :: SupportsCondition -> SupportsCondition -> Bool # (/=) :: SupportsCondition -> SupportsCondition -> Bool # | |
Show SupportsCondition Source # | |
Defined in Hasmin.Types.Stylesheet showsPrec :: Int -> SupportsCondition -> ShowS # show :: SupportsCondition -> String # showList :: [SupportsCondition] -> ShowS # | |
ToText SupportsCondition Source # | |
Defined in Hasmin.Types.Stylesheet toText :: SupportsCondition -> Text Source # toBuilder :: SupportsCondition -> Builder Source # | |
Minifiable SupportsCondition Source # | |
Defined in Hasmin.Types.Stylesheet |
data SupportsCondInParens Source #
Instances
Eq SupportsCondInParens Source # | |
Defined in Hasmin.Types.Stylesheet (==) :: SupportsCondInParens -> SupportsCondInParens -> Bool # (/=) :: SupportsCondInParens -> SupportsCondInParens -> Bool # | |
Show SupportsCondInParens Source # | |
Defined in Hasmin.Types.Stylesheet showsPrec :: Int -> SupportsCondInParens -> ShowS # show :: SupportsCondInParens -> String # showList :: [SupportsCondInParens] -> ShowS # | |
ToText SupportsCondInParens Source # | |
Defined in Hasmin.Types.Stylesheet toText :: SupportsCondInParens -> Text Source # | |
Minifiable SupportsCondInParens Source # | |
Defined in Hasmin.Types.Stylesheet |
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 #