language-css-0.0.3.1: CSS 2.1 syntax

Safe HaskellSafe
LanguageHaskell2010

Language.Css.Syntax

Contents

Description

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

Stylesheet

data StyleSheet Source #

Instances
Eq StyleSheet Source # 
Instance details

Defined in Language.Css.Syntax

Show StyleSheet Source # 
Instance details

Defined in Language.Css.Syntax

Pretty StyleSheet Source # 
Instance details

Defined in Language.Css.Pretty

data StyleBody Source #

Instances
Eq StyleBody Source # 
Instance details

Defined in Language.Css.Syntax

Show StyleBody Source # 
Instance details

Defined in Language.Css.Syntax

Pretty StyleBody Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: StyleBody -> Doc Source #

AtRule

data AtCharSet Source #

@charset

Constructors

AtCharSet String 
Instances
Eq AtCharSet Source # 
Instance details

Defined in Language.Css.Syntax

Show AtCharSet Source # 
Instance details

Defined in Language.Css.Syntax

Pretty AtCharSet Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: AtCharSet -> Doc Source #

data AtImport Source #

@import

Constructors

AtImport ImportHead [Ident] 
Instances
Eq AtImport Source # 
Instance details

Defined in Language.Css.Syntax

Show AtImport Source # 
Instance details

Defined in Language.Css.Syntax

Pretty AtImport Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: AtImport -> Doc Source #

data ImportHead Source #

Constructors

IStr String 
IUri Uri 
Instances
Eq ImportHead Source # 
Instance details

Defined in Language.Css.Syntax

Show ImportHead Source # 
Instance details

Defined in Language.Css.Syntax

Pretty ImportHead Source # 
Instance details

Defined in Language.Css.Pretty

data AtMedia Source #

@media

Constructors

AtMedia [Ident] [RuleSet] 
Instances
Eq AtMedia Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: AtMedia -> AtMedia -> Bool #

(/=) :: AtMedia -> AtMedia -> Bool #

Show AtMedia Source # 
Instance details

Defined in Language.Css.Syntax

Pretty AtMedia Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: AtMedia -> Doc Source #

data AtPage Source #

@page

Constructors

AtPage (Maybe Ident) (Maybe PseudoPage) [Decl] 
Instances
Eq AtPage Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: AtPage -> AtPage -> Bool #

(/=) :: AtPage -> AtPage -> Bool #

Show AtPage Source # 
Instance details

Defined in Language.Css.Syntax

Pretty AtPage Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: AtPage -> Doc Source #

data AtFontFace Source #

@font-face

Constructors

AtFontFace [Decl] 
Instances
Eq AtFontFace Source # 
Instance details

Defined in Language.Css.Syntax

Show AtFontFace Source # 
Instance details

Defined in Language.Css.Syntax

Pretty AtFontFace Source # 
Instance details

Defined in Language.Css.Pretty

RuleSet

data RuleSet Source #

Constructors

RuleSet [Sel] [Decl] 
Instances
Eq RuleSet Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: RuleSet -> RuleSet -> Bool #

(/=) :: RuleSet -> RuleSet -> Bool #

Show RuleSet Source # 
Instance details

Defined in Language.Css.Syntax

Pretty RuleSet Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: RuleSet -> Doc Source #

Idents Sel' Source # 
Instance details

Defined in Language.Css.Build

Methods

ident :: String -> Sel' Source #

data Decl Source #

Declaration

Constructors

Decl (Maybe Prio) Prop Expr 
Instances
Eq Decl Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Decl -> Decl -> Bool #

(/=) :: Decl -> Decl -> Bool #

Show Decl Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Decl -> ShowS #

show :: Decl -> String #

showList :: [Decl] -> ShowS #

Pretty Decl Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Decl -> Doc Source #

Idents Sel' Source # 
Instance details

Defined in Language.Css.Build

Methods

ident :: String -> Sel' Source #

type Prop = Ident Source #

Property

data Prio Source #

sets !important declaration

Constructors

Important 
Instances
Eq Prio Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Prio -> Prio -> Bool #

(/=) :: Prio -> Prio -> Bool #

Show Prio Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Prio -> ShowS #

show :: Prio -> String #

showList :: [Prio] -> ShowS #

Pretty Prio Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Prio -> Doc Source #

data Expr Source #

Constructors

EVal Value

single value

SlashSep Expr Expr

slash separated expressions

CommaSep Expr Expr

comma separated expressions

SpaceSep Expr Expr

space separated expressions

Instances
Eq Expr Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Expr -> Expr -> Bool #

(/=) :: Expr -> Expr -> Bool #

Show Expr Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Expr -> ShowS #

show :: Expr -> String #

showList :: [Expr] -> ShowS #

Pretty Expr Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Expr -> Doc Source #

ToExpr Expr Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Expr -> Expr Source #

Idents Expr Source # 
Instance details

Defined in Language.Css.Build

Methods

ident :: String -> Expr Source #

Selectors

data Sel Source #

Selector

Constructors

SSel SimpleSel

single selector

DescendSel Sel Sel

' '

ChildSel Sel Sel

'>'

AdjSel Sel Sel

'+'

Instances
Eq Sel Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Sel -> Sel -> Bool #

(/=) :: Sel -> Sel -> Bool #

Show Sel Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Sel -> ShowS #

show :: Sel -> String #

showList :: [Sel] -> ShowS #

Pretty Sel Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Sel -> Doc Source #

data SimpleSel Source #

Simple selector

Constructors

UnivSel [SubSel]

Universal selector

TypeSel Element [SubSel]

Type selector

Instances
Eq SimpleSel Source # 
Instance details

Defined in Language.Css.Syntax

Show SimpleSel Source # 
Instance details

Defined in Language.Css.Syntax

Pretty SimpleSel Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: SimpleSel -> Doc Source #

data SubSel Source #

Constructors

AttrSel Attr

attribute selector

ClassSel Class

'.'

IdSel Id

'#'

PseudoSel PseudoVal

pseudo classes/elements

Instances
Eq SubSel Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: SubSel -> SubSel -> Bool #

(/=) :: SubSel -> SubSel -> Bool #

Show SubSel Source # 
Instance details

Defined in Language.Css.Syntax

Pretty SubSel Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: SubSel -> Doc Source #

data Attr Source #

attribute selector

Instances
Eq Attr Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Attr -> Attr -> Bool #

(/=) :: Attr -> Attr -> Bool #

Show Attr Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Attr -> ShowS #

show :: Attr -> String #

showList :: [Attr] -> ShowS #

Pretty Attr Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Attr -> Doc Source #

Attrs Attr Source # 
Instance details

Defined in Language.Css.Build

Methods

attr :: String -> Attr Source #

Idents Attr Source # 
Instance details

Defined in Language.Css.Build

Methods

ident :: String -> Attr Source #

type Id = String Source #

data PseudoVal Source #

Constructors

PIdent Ident 
PFunc Func 
Instances
Eq PseudoVal Source # 
Instance details

Defined in Language.Css.Syntax

Show PseudoVal Source # 
Instance details

Defined in Language.Css.Syntax

Pretty PseudoVal Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: PseudoVal -> Doc Source #

Idents PseudoVal Source # 
Instance details

Defined in Language.Css.Build

Values

data Value Source #

Instances
Eq Value Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Value -> Value -> Bool #

(/=) :: Value -> Value -> Bool #

Show Value Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Value -> ShowS #

show :: Value -> String #

showList :: [Value] -> ShowS #

Pretty Value Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Value -> Doc Source #

ToExpr Value Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Value -> Expr Source #

Idents Value Source # 
Instance details

Defined in Language.Css.Build

Methods

ident :: String -> Value Source #

Primitives

data Ident Source #

Constructors

Ident String 
Instances
Eq Ident Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Ident -> Ident -> Bool #

(/=) :: Ident -> Ident -> Bool #

Show Ident Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Ident -> ShowS #

show :: Ident -> String #

showList :: [Ident] -> ShowS #

Pretty Ident Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Ident -> Doc Source #

ToExpr Ident Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Ident -> Expr Source #

Idents Ident Source # 
Instance details

Defined in Language.Css.Build

Methods

ident :: String -> Ident Source #

data Func Source #

Constructors

Func Ident Expr 
Instances
Eq Func Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Func -> Func -> Bool #

(/=) :: Func -> Func -> Bool #

Show Func Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Func -> ShowS #

show :: Func -> String #

showList :: [Func] -> ShowS #

Pretty Func Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Func -> Doc Source #

ToExpr Func Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Func -> Expr Source #

data Deg Source #

<angle>

Constructors

Deg Double 
Instances
Eq Deg Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Deg -> Deg -> Bool #

(/=) :: Deg -> Deg -> Bool #

Show Deg Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Deg -> ShowS #

show :: Deg -> String #

showList :: [Deg] -> ShowS #

Pretty Deg Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Deg -> Doc Source #

ToExpr Deg Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Deg -> Expr Source #

data Rad Source #

<angle>

Constructors

Rad Double 
Instances
Eq Rad Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Rad -> Rad -> Bool #

(/=) :: Rad -> Rad -> Bool #

Show Rad Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Rad -> ShowS #

show :: Rad -> String #

showList :: [Rad] -> ShowS #

Pretty Rad Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Rad -> Doc Source #

ToExpr Rad Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Rad -> Expr Source #

data Grad Source #

<angle>

Constructors

Grad Double 
Instances
Eq Grad Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Grad -> Grad -> Bool #

(/=) :: Grad -> Grad -> Bool #

Show Grad Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Grad -> ShowS #

show :: Grad -> String #

showList :: [Grad] -> ShowS #

Pretty Grad Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Grad -> Doc Source #

ToExpr Grad Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Grad -> Expr Source #

data Color Source #

<color>

Constructors

Cword String 
Crgb Int Int Int 
Instances
Eq Color Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Color -> Color -> Bool #

(/=) :: Color -> Color -> Bool #

Show Color Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Color -> ShowS #

show :: Color -> String #

showList :: [Color] -> ShowS #

Pretty Color Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Color -> Doc Source #

ToExpr Color Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Color -> Expr Source #

data Hz Source #

<frequency>

Constructors

Hz Double 
Instances
Eq Hz Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Hz -> Hz -> Bool #

(/=) :: Hz -> Hz -> Bool #

Show Hz Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Hz -> ShowS #

show :: Hz -> String #

showList :: [Hz] -> ShowS #

Pretty Hz Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Hz -> Doc Source #

ToExpr Hz Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Hz -> Expr Source #

data KHz Source #

<frequency>

Constructors

KHz Double 
Instances
Eq KHz Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: KHz -> KHz -> Bool #

(/=) :: KHz -> KHz -> Bool #

Show KHz Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> KHz -> ShowS #

show :: KHz -> String #

showList :: [KHz] -> ShowS #

Pretty KHz Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: KHz -> Doc Source #

ToExpr KHz Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: KHz -> Expr Source #

data Em Source #

<length>

Constructors

Em Double 
Instances
Eq Em Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Em -> Em -> Bool #

(/=) :: Em -> Em -> Bool #

Show Em Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Em -> ShowS #

show :: Em -> String #

showList :: [Em] -> ShowS #

Pretty Em Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Em -> Doc Source #

ToExpr Em Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Em -> Expr Source #

data Ex Source #

<length>

Constructors

Ex Double 
Instances
Eq Ex Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Ex -> Ex -> Bool #

(/=) :: Ex -> Ex -> Bool #

Show Ex Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Ex -> ShowS #

show :: Ex -> String #

showList :: [Ex] -> ShowS #

Pretty Ex Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Ex -> Doc Source #

ToExpr Ex Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Ex -> Expr Source #

data Px Source #

<length>

Constructors

Px Int 
Instances
Eq Px Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Px -> Px -> Bool #

(/=) :: Px -> Px -> Bool #

Show Px Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Px -> ShowS #

show :: Px -> String #

showList :: [Px] -> ShowS #

Pretty Px Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Px -> Doc Source #

ToExpr Px Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Px -> Expr Source #

data In Source #

<length>

Constructors

In Double 
Instances
Eq In Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: In -> In -> Bool #

(/=) :: In -> In -> Bool #

Show In Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> In -> ShowS #

show :: In -> String #

showList :: [In] -> ShowS #

Pretty In Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: In -> Doc Source #

ToExpr In Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: In -> Expr Source #

data Cm Source #

<length>

Constructors

Cm Double 
Instances
Eq Cm Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Cm -> Cm -> Bool #

(/=) :: Cm -> Cm -> Bool #

Show Cm Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Cm -> ShowS #

show :: Cm -> String #

showList :: [Cm] -> ShowS #

Pretty Cm Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Cm -> Doc Source #

ToExpr Cm Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Cm -> Expr Source #

data Mm Source #

<length>

Constructors

Mm Double 
Instances
Eq Mm Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Mm -> Mm -> Bool #

(/=) :: Mm -> Mm -> Bool #

Show Mm Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Mm -> ShowS #

show :: Mm -> String #

showList :: [Mm] -> ShowS #

Pretty Mm Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Mm -> Doc Source #

ToExpr Mm Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Mm -> Expr Source #

data Pc Source #

<length>

Constructors

Pc Double 
Instances
Eq Pc Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Pc -> Pc -> Bool #

(/=) :: Pc -> Pc -> Bool #

Show Pc Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Pc -> ShowS #

show :: Pc -> String #

showList :: [Pc] -> ShowS #

Pretty Pc Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Pc -> Doc Source #

ToExpr Pc Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Pc -> Expr Source #

data Pt Source #

<length>

Constructors

Pt Int 
Instances
Eq Pt Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Pt -> Pt -> Bool #

(/=) :: Pt -> Pt -> Bool #

Show Pt Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Pt -> ShowS #

show :: Pt -> String #

showList :: [Pt] -> ShowS #

Pretty Pt Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Pt -> Doc Source #

ToExpr Pt Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Pt -> Expr Source #

data Percentage Source #

<percentage>

Constructors

Percentage Double 
Instances
Eq Percentage Source # 
Instance details

Defined in Language.Css.Syntax

Show Percentage Source # 
Instance details

Defined in Language.Css.Syntax

Pretty Percentage Source # 
Instance details

Defined in Language.Css.Pretty

ToExpr Percentage Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Percentage -> Expr Source #

data Ms Source #

<time>

Constructors

Ms Double 
Instances
Eq Ms Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Ms -> Ms -> Bool #

(/=) :: Ms -> Ms -> Bool #

Show Ms Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Ms -> ShowS #

show :: Ms -> String #

showList :: [Ms] -> ShowS #

Pretty Ms Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Ms -> Doc Source #

ToExpr Ms Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Ms -> Expr Source #

data S Source #

<time>

Constructors

S Double 
Instances
Eq S Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: S -> S -> Bool #

(/=) :: S -> S -> Bool #

Show S Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> S -> ShowS #

show :: S -> String #

showList :: [S] -> ShowS #

Pretty S Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: S -> Doc Source #

ToExpr S Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: S -> Expr Source #

data Uri Source #

<uri>

Constructors

Uri String 
Instances
Eq Uri Source # 
Instance details

Defined in Language.Css.Syntax

Methods

(==) :: Uri -> Uri -> Bool #

(/=) :: Uri -> Uri -> Bool #

Show Uri Source # 
Instance details

Defined in Language.Css.Syntax

Methods

showsPrec :: Int -> Uri -> ShowS #

show :: Uri -> String #

showList :: [Uri] -> ShowS #

Pretty Uri Source # 
Instance details

Defined in Language.Css.Pretty

Methods

pretty :: Uri -> Doc Source #

ToExpr Uri Source # 
Instance details

Defined in Language.Css.Build

Methods

expr :: Uri -> Expr Source #