Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Css2.1 syntax
haskell translation of css 2.1 grammar.
See http://www.w3.org/TR/CSS2/grammar.html and http://www.w3.org/TR/CSS2/syndata.html
Synopsis
- data StyleSheet = StyleSheet (Maybe AtCharSet) [AtImport] [StyleBody]
- data StyleBody
- data AtCharSet = AtCharSet String
- data AtImport = AtImport ImportHead [Ident]
- data ImportHead
- data AtMedia = AtMedia [Ident] [RuleSet]
- data AtPage = AtPage (Maybe Ident) (Maybe PseudoPage) [Decl]
- type PseudoPage = Ident
- data AtFontFace = AtFontFace [Decl]
- data RuleSet = RuleSet [Sel] [Decl]
- data Decl = Decl (Maybe Prio) Prop Expr
- type Prop = Ident
- data Prio = Important
- data Expr
- data Sel
- data SimpleSel
- data SubSel
- type Element = String
- data Attr
- type Class = String
- type Id = String
- type AttrIdent = String
- type AttrVal = String
- data PseudoVal
- data Value
- data Ident = Ident String
- data Func = Func Ident Expr
- data Deg = Deg Double
- data Rad = Rad Double
- data Grad = Grad Double
- data Color
- data Hz = Hz Double
- data KHz = KHz Double
- data Em = Em Double
- data Ex = Ex Double
- data Px = Px Int
- data In = In Double
- data Cm = Cm Double
- data Mm = Mm Double
- data Pc = Pc Double
- data Pt = Pt Int
- data Percentage = Percentage Double
- data Ms = Ms Double
- data S = S Double
- data Uri = Uri String
Stylesheet
data StyleSheet Source #
Instances
Eq StyleSheet Source # | |
Defined in Language.Css.Syntax (==) :: StyleSheet -> StyleSheet -> Bool # (/=) :: StyleSheet -> StyleSheet -> Bool # | |
Show StyleSheet Source # | |
Defined in Language.Css.Syntax showsPrec :: Int -> StyleSheet -> ShowS # show :: StyleSheet -> String # showList :: [StyleSheet] -> ShowS # | |
Pretty StyleSheet Source # | |
Defined in Language.Css.Pretty pretty :: StyleSheet -> Doc Source # |
AtRule
data ImportHead Source #
Instances
Eq ImportHead Source # | |
Defined in Language.Css.Syntax (==) :: ImportHead -> ImportHead -> Bool # (/=) :: ImportHead -> ImportHead -> Bool # | |
Show ImportHead Source # | |
Defined in Language.Css.Syntax showsPrec :: Int -> ImportHead -> ShowS # show :: ImportHead -> String # showList :: [ImportHead] -> ShowS # | |
Pretty ImportHead Source # | |
Defined in Language.Css.Pretty pretty :: ImportHead -> Doc Source # |
type PseudoPage = Ident Source #
data AtFontFace Source #
@font-face
Instances
Eq AtFontFace Source # | |
Defined in Language.Css.Syntax (==) :: AtFontFace -> AtFontFace -> Bool # (/=) :: AtFontFace -> AtFontFace -> Bool # | |
Show AtFontFace Source # | |
Defined in Language.Css.Syntax showsPrec :: Int -> AtFontFace -> ShowS # show :: AtFontFace -> String # showList :: [AtFontFace] -> ShowS # | |
Pretty AtFontFace Source # | |
Defined in Language.Css.Pretty pretty :: AtFontFace -> Doc Source # |
RuleSet
EVal Value | single value |
SlashSep Expr Expr | slash separated expressions |
CommaSep Expr Expr | comma separated expressions |
SpaceSep Expr Expr | space separated expressions |
Selectors
AttrSel Attr | attribute selector |
ClassSel Class | '.' |
IdSel Id | '#' |
PseudoSel PseudoVal | pseudo classes/elements |
attribute selector
Attr AttrIdent | |
AttrIs AttrIdent AttrVal | '=' |
AttrIncl AttrIdent AttrVal | '~=' |
AttrBegins AttrIdent AttrVal | '|=' |
Values
VDeg Deg | |
VRad Rad | |
VGrad Grad | |
VColor Color | |
VHz Hz | |
VKHz KHz | |
VFunc Func | |
VIdent Ident | |
VInt Int | |
VEm Em | |
VEx Ex | |
VPx Px | |
VIn In | |
VCm Cm | |
VMm Mm | |
VPc Pc | |
VPt Pt | |
VDouble Double | |
VPercentage Percentage | |
VString String | |
VMs Ms | |
VS S | |
VUri Uri |
Primitives
data Percentage Source #
<percentage>
Instances
Eq Percentage Source # | |
Defined in Language.Css.Syntax (==) :: Percentage -> Percentage -> Bool # (/=) :: Percentage -> Percentage -> Bool # | |
Show Percentage Source # | |
Defined in Language.Css.Syntax showsPrec :: Int -> Percentage -> ShowS # show :: Percentage -> String # showList :: [Percentage] -> ShowS # | |
Pretty Percentage Source # | |
Defined in Language.Css.Pretty pretty :: Percentage -> Doc Source # | |
ToExpr Percentage Source # | |
Defined in Language.Css.Build expr :: Percentage -> Expr Source # |