language-css (empty) → 0.0.1
raw patch · 9 files changed
+4246/−0 lines, 9 filesdep +basedep +prettysetup-changed
Dependencies added: base, pretty
Files
- LICENSE +30/−0
- Setup.hs +3/−0
- language-css.cabal +33/−0
- src/Language/Css/Build.hs +509/−0
- src/Language/Css/Build/Attributes.hs +1016/−0
- src/Language/Css/Build/Idents.hs +1481/−0
- src/Language/Css/Build/Pseudos.hs +69/−0
- src/Language/Css/Build/Tags.hs +617/−0
- src/Language/Css/Syntax.hs +488/−0
+ LICENSE view
@@ -0,0 +1,30 @@+Copyright Anton Kholomiov 2010++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions are met:++ * Redistributions of source code must retain the above copyright+ notice, this list of conditions and the following disclaimer.++ * Redistributions in binary form must reproduce the above+ copyright notice, this list of conditions and the following+ disclaimer in the documentation and/or other materials provided+ with the distribution.++ * Neither the name of Anton Kholomiov nor the names of other+ contributors may be used to endorse or promote products derived+ from this software without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,3 @@+#!/usr/bin/env runhaskell+import Distribution.Simple+main = defaultMain
+ language-css.cabal view
@@ -0,0 +1,33 @@+Name: language-css+Version: 0.0.1+Cabal-Version: >= 1.2+License: BSD3+License-file: LICENSE+Author: Anton Kholomiov+Synopsis: CSS 2.1 syntax +Description: library for building and pretty printing CSS 2.1 code+Stability: Experimental+Tested-With: GHC==6.13.1+Build-Type: Simple+Category: Language+Maintainer: <anton.kholomiov@gmail.com>++Library+ Build-Depends:+ base >= 4, base < 5, pretty + Hs-Source-Dirs: src/+ Exposed-Modules:+ Language.Css.Syntax+ Language.Css.Build+ Language.Css.Build.Idents+ Language.Css.Build.Tags+ Language.Css.Build.Attributes+ Language.Css.Build.Pseudos+++---------------------------------------------------------------------------------- + Other-Modules:++++
+ src/Language/Css/Build.hs view
@@ -0,0 +1,509 @@+{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-}+-- | Combinators to build AST+--+-- Example : +--+-- >+-- >import Language.Css.Syntax+-- >import Language.Css.Build+-- >import Language.Css.Build.Idents+-- >import Language.Css.Build.Tags hiding (center)+-- >+-- >res = ruleSets [+-- > body [+-- > margin <:> int 0,+-- > border <:> int 0 ],+-- > +-- > h1 [ textAlign <:> center],+-- >+-- > p [ +-- > backgroundColor <:> black, +-- > color <:> white,+-- > padding <:> spaces [pct 5, pct 5, pct 10, pct 10] ],+-- >+-- > (star /. "warning") [ color <:> red ] +-- > ]+-- > +-- >main = print res+-- >+--+module Language.Css.Build (+ -- * Classes+ Idents(..), ToExpr(..),++ -- * StyleSheet+ styleSheet, rules, ruleSets, + addImports, addRules, charset,++ -- * AtRules+ media, page, fontFace,++ -- * RuleSets++ -- ** Selectors+ Sel', star, sels, + (/>), (/-), (/#), (/.), (/:),+ Attrs(..), (!), (.=), (~=), (|=),+ + -- ** Declarations+ (<:>), important, + space, slash, comma,+ spaces, slashes, commas,++ -- * Primitive values+ fun, str, int, num,+ deg, rad, grad, cword, rgb, hz, khz,+ em, ex, px, in', cm, mm, pc, pt,+ pct, ms, s, url,++ -- * Colors+ aqua, black, blue, fuchsia, gray, green, + lime, maroon, navy, olive, orange, purple, + red, silver, teal, white, yellow+)+where++import Language.Css.Syntax++import Control.Applicative++class Idents a where+ ident :: String -> a++instance Idents Ident where+ ident = Ident++instance Idents String where+ ident = id++class ToExpr a where+ expr :: a -> Expr++instance ToExpr Expr where+ expr = id++-----------------------------------------------------------------+-- StyleSheet++styleSheet :: Maybe AtCharSet -> [AtImport] -> [StyleBody] -> StyleSheet+styleSheet = StyleSheet++-- | construct 'StyleSheet' from list of 'AtRule' 's or 'RuleSet' 's+rules :: [StyleBody] -> StyleSheet+rules = styleSheet Nothing []++-- | append imports+addImports :: [AtImport] -> StyleSheet -> StyleSheet+addImports is' (StyleSheet c is body) = StyleSheet c (is ++ is') body++-- | append rules+addRules :: [StyleBody] -> StyleSheet -> StyleSheet+addRules rs (StyleSheet c is body) = StyleSheet c is $ rs ++ body++-- | construct 'StyleSheet' from list of 'RuleSet' 's+ruleSets :: [RuleSet] -> StyleSheet+ruleSets = StyleSheet Nothing [] . map SRuleSet++-- | set \@charset+charset :: String -> StyleSheet -> StyleSheet+charset str (StyleSheet _ is body) = StyleSheet (Just $ AtCharSet str) is body++-----------------------------------------------------------------+-- AtRules++-- | \@media+media :: [String] -> [RuleSet] -> StyleBody+media ms rs = SAtMedia $ AtMedia (map ident ms) rs++-- | \@page+page :: Maybe String -> Maybe PseudoPage -> [Decl] -> StyleBody+page i p ds = SAtPage $ AtPage (ident <$> i) p ds++-- | import from string+importStr :: String -> [Ident] -> AtImport+importStr str = AtImport (IStr str)++-- | import from uri+importUri :: String -> [Ident] -> AtImport+importUri str = AtImport (IUri $ Uri str)++-- | \@font-face+fontFace :: [Decl] -> StyleBody+fontFace = SAtFontFace . AtFontFace++-- RuleSets++-----------------------------------------------------------------+-- Selectors++infixl 5 /-, />, /++infixl 6 /#, /., !, /:++infix 0 <:>++-- | 'RuleSet' constructor+type Sel' = [Decl] -> RuleSet+++-- | @*@ selector+star :: Sel'+star = RuleSet (return $ SSel $ UnivSel [])++instance Idents Sel' where+ ident x = RuleSet (return $ SSel $ TypeSel x [])++-- compose++-- | groups selectors+sels :: [Sel'] -> Sel'+sels xs d = joinRules [] $ map ($ d) xs+ where joinRules sels xs = + case xs of+ [] -> RuleSet sels d+ a:as -> joinRules (sels ++ getSels a) as++-- | Descendant+--+-- space in css+(/-) :: Sel' -> Sel' -> Sel'+(/-) = liftSel2 DescendSel++-- | Child+--+-- @>@ in css+(/>) :: Sel' -> Sel' -> Sel'+(/>) = liftSel2 ChildSel++-- | Sibling+--+-- @+@ in css+(/+) :: Sel' -> Sel' -> Sel'+(/+) = liftSel2 AdjSel++-- set attribs++-- | set id+(/#) :: Sel' -> String -> Sel'+(/#) s id = liftSel1 (appendSubSel $ IdSel id) s ++-- | set class+(/.) :: Sel' -> String -> Sel'+(/.) s cl = liftSel1 (appendSubSel $ ClassSel cl) s++-- | set attributes+(!) :: Sel' -> Attr -> Sel'+(!) s attr = liftSel1 (appendSubSel $ AttrSel attr) s ++-- | set pseudo classes/elements+(/:) :: Sel' -> PseudoVal -> Sel' +(/:) s p = liftSel1 (appendSubSel $ PseudoSel p) s++liftSel1 :: (Sel -> Sel) -> (Sel' -> Sel')+liftSel1 f = liftA f'+ where f' a = RuleSet (liftA f $ getSels a) $ getDecls a++liftSel2 :: (Sel -> Sel -> Sel) -> (Sel' -> Sel' -> Sel')+liftSel2 f = liftA2 f' + where f' a b = RuleSet (liftA2 f (getSels a) (getSels b)) $ getDecls a+++instance Idents Attr where+ ident = Attr++-- | attribute selector+class Attrs a where+ attr :: String -> a++instance Attrs Attr where+ attr = Attr++instance Attrs AttrIdent where+ attr = id++-- | element's attribute is+(.=) :: AttrIdent -> AttrVal -> Attr+(.=) = AttrIs ++-- | element's attribute includes+(~=) :: AttrIdent -> AttrVal -> Attr+(~=) = AttrIncl++-- | element's attribute begins with+(|=) :: AttrIdent -> AttrVal -> Attr+(|=) = AttrBegins+++appendSubSel :: SubSel -> Sel -> Sel+appendSubSel s a = + case a of+ SSel x -> case x of+ UnivSel xs -> SSel $ UnivSel $ xs ++ [s]+ TypeSel el xs -> SSel $ TypeSel el $ xs ++ [s]+ DescendSel x y -> DescendSel (appendSubSel s x) (appendSubSel s y)+ ChildSel x y -> ChildSel (appendSubSel s x) (appendSubSel s y)+ AdjSel x y -> AdjSel (appendSubSel s x) (appendSubSel s y) +++getSels :: RuleSet -> [Sel] +getSels (RuleSet xs _) = xs++getDecls :: RuleSet -> [Decl]+getDecls (RuleSet _ xs) = xs+++instance Idents PseudoVal where+ ident = PIdent . ident++-----------------------------------------------------------------+-- Declarations++-- | declaration constructor+(<:>) :: String -> Expr -> Decl+(<:>) a b = Decl Nothing (ident a) b++-- | set @!important@ +important :: Decl -> Decl +important (Decl _ a b) = Decl (Just Important) a b++-- | space separated values+space :: Expr -> Expr -> Expr+space = SpaceSep++-- | 'space' on list of values+spaces :: [Expr] -> Expr+spaces = foldl1 space++-- | slash separated values+slash :: Expr -> Expr -> Expr+slash = SlashSep++-- | 'slash' on list of values+slashes :: [Expr] -> Expr+slashes = foldl1 slash++-- | comma separated values+comma :: Expr -> Expr -> Expr+comma = CommaSep++-- | 'comma' on lists of values+commas :: [Expr] -> Expr+commas = foldl1 comma++instance ToExpr a => ToExpr [a] where+ expr x = case x of+ [] -> ident ""+ _ -> foldl1 space $ map expr x++-----------------------------------------------------------------+-- Values+--++instance Idents Expr where+ ident = EVal . ident++instance Idents Value where+ ident = VIdent . ident++instance ToExpr Value where + expr = EVal++-----------------------------------------------------------------+-- primitive values+-- constructors++-- | 'Func' constructor+fun :: ToExpr a => Ident -> a -> Func+fun str = Func str . expr++-- | \<angle\> +deg :: Double -> Expr+deg = expr . Deg++-- | \<angle\> +rad :: Double -> Expr+rad = expr . Rad++-- | \<angle\> +grad :: Double -> Expr+grad = expr . Grad++-- | \<color\> +cword :: String -> Expr+cword = expr . Cword . checkWord++-- | \<color\> +rgb :: Int -> Int -> Int -> Expr+rgb x0 x1 x2 = expr $ Crgb x0 x1 x2++-- | \<frequency\> +hz :: Double -> Expr+hz = expr . Hz++-- | \<frequency\> +khz :: Double -> Expr+khz = expr . KHz++-- | \<length\> +em :: Double -> Expr+em = expr . Em++-- | \<length\> +ex :: Double -> Expr+ex = expr . Ex++-- | \<length\> +px :: Int -> Expr+px = expr . Px++-- | \<length\> +in' :: Double -> Expr+in' = expr . In++-- | \<length\> +cm :: Double -> Expr+cm = expr . Cm++-- | \<length\> +mm :: Double -> Expr+mm = expr . Mm++-- | \<length\> +pc :: Double -> Expr+pc = expr . Pc++-- | \<length\> +pt :: Int -> Expr+pt = expr . Pt++-- | \<percentage\> +pct :: Double -> Expr+pct = expr . Percentage++-- | \<time\> +ms :: Double -> Expr+ms = expr . Ms++-- | \<time\> +s :: Double -> Expr+s = expr . S++-- | \<uri\> +url :: String -> Expr+url = expr . Uri++checkWord x + | checkLeng x && checkNums x && checkFirst x = x+ | otherwise = errorMsg + where errorMsg = error "must be number in hexadecimal notation" + checkLeng x + | length x == 4 || length x == 7 = True+ | otherwise = error "string length must be 4 or 7"+ checkNums x+ | all (`elem` (['0' .. '9'] ++ ['a' .. 'f'] ++ ['A' .. 'F']))$ tail x = True+ | otherwise = errorMsg+ checkFirst x+ | '#' == head x = True+ | otherwise = error "first character must be #" ++++str :: String -> Expr+str = expr . VString++int :: Int -> Expr+int = expr++num :: Double -> Expr +num = expr++-- instances++-- ToExpr++instance ToExpr Deg where+ expr = expr . VDeg++instance ToExpr Rad where+ expr = expr . VRad++instance ToExpr Grad where+ expr = expr . VGrad++instance ToExpr Color where+ expr = expr . VColor++instance ToExpr Hz where+ expr = expr . VHz++instance ToExpr KHz where+ expr = expr . VKHz++instance ToExpr Func where+ expr = expr . VFunc++instance ToExpr Ident where+ expr = expr . VIdent++instance ToExpr Int where+ expr = expr . VInt++instance ToExpr Em where+ expr = expr . VEm++instance ToExpr Ex where+ expr = expr . VEx++instance ToExpr Px where+ expr = expr . VPx++instance ToExpr In where+ expr = expr . VIn++instance ToExpr Cm where+ expr = expr . VCm++instance ToExpr Mm where+ expr = expr . VMm++instance ToExpr Pc where+ expr = expr . VPc++instance ToExpr Pt where+ expr = expr . VPt++instance ToExpr Double where+ expr = expr . VDouble++instance ToExpr Percentage where+ expr = expr . VPercentage++instance ToExpr Ms where+ expr = expr . VMs++instance ToExpr S where+ expr = expr . VS++instance ToExpr Uri where+ expr = expr . VUri++-- colors+--+aqua = cword "#00ffff" +black = cword "#000000"+blue = cword "#0000ff" +fuchsia = cword "#ff00ff" +gray = cword "#808080" +green = cword "#008000" +lime = cword "#00ff00" +maroon = cword "#800000" +navy = cword "#000080" +olive = cword "#808000" +orange = cword "#ffA500" +purple = cword "#800080" +red = cword "#ff0000" +silver = cword "#c0c0c0" +teal = cword "#008080" +white = cword "#ffffff" +yellow = cword "#ffff00"++
+ src/Language/Css/Build/Attributes.hs view
@@ -0,0 +1,1016 @@+-- | Html 4 ++ Html 5 attributes+module Language.Css.Build.Attributes (+ abbr,+ accept,+ acceptCharset,+ accesskey,+ action,+ align,+ alt,+ archive,+ async,+ autocomplete,+ autofocus,+ autoplay,+ axis,+ background,+ bgcolor,+ border,+ cellpadding,+ cellspacing,+ challenge,+ char,+ charoff,+ charset,+ checked,+ cite,+ class',+ classid,+ clear,+ codebase,+ codetype,+ cols,+ colspan,+ compact,+ content,+ contenteditable,+ contextmenu,+ controls,+ coords,+ data',+ datetime,+ declare,+ defer,+ dir,+ disabled,+ draggable,+ enctype,+ for,+ form,+ formaction,+ formenctype,+ formmethod,+ formnovalidate,+ formtarget,+ frame,+ frameborder,+ headers,+ height,+ hidden,+ high,+ href,+ hreflang,+ hspace,+ httpEquiv,+ icon,+ id,+ ismap,+ item,+ itemprop,+ keytype,+ label,+ lang,+ language,+ list,+ loop,+ low,+ manifest,+ max,+ maxlength,+ media,+ method,+ min,+ multiple,+ name,+ nohref,+ noshade,+ novalidate,+ nowrap,+ onabort,+ onbeforeonload,+ onbeforeprint,+ onblur,+ oncanplay,+ oncanplaythrough,+ onchange,+ onclick,+ oncontextmenu,+ ondblclick,+ ondrag,+ ondragend,+ ondragenter,+ ondragleave,+ ondragover,+ ondragstart,+ ondrop,+ ondurationchange,+ onemptied,+ onended,+ onerror,+ onfocus,+ onformchange,+ onforminput,+ onhaschange,+ oninput,+ oninvalid,+ onkeydown,+ onkeypress,+ onkeyup,+ onload,+ onloadeddata,+ onloadedmetadata,+ onloadstart,+ onmessage,+ onmousedown,+ onmousemove,+ onmouseout,+ onmouseover,+ onmouseup,+ onmousewheel,+ ononline,+ onpagehide,+ onpageshow,+ onpause,+ onplay,+ onplaying,+ onprogress,+ onpropstate,+ onratechange,+ onreadystatechange,+ onredo,+ onreset,+ onresize,+ onscroll,+ onseeked,+ onseeking,+ onselect,+ onstalled,+ onstorage,+ onsubmit,+ onsuspend,+ ontimeupdate,+ onundo,+ onunload,+ onvolumechange,+ onwaiting,+ open,+ optimum,+ pattern,+ ping,+ placeholder,+ preload,+ profile,+ pubdate,+ radiogroup,+ readonly,+ rel,+ required,+ rev,+ reversed,+ rows,+ rowspan,+ rules,+ sandbox,+ scheme,+ scope,+ scoped,+ scrolling,+ seamless,+ selected,+ shape,+ size,+ sizes,+ span,+ spellcheck,+ src,+ srcdoc,+ standby,+ start,+ step,+ style,+ subject,+ summary,+ tabindex,+ target,+ title,+ type',+ usemap,+ valign,+ value,+ valuetype,+ vspace,+ width,+ wrap,+ xmlns+) where+import Language.Css.Build(Attrs(..))+import Prelude ()+++-- | @abbr@ attribute+abbr :: Attrs a => a+abbr = attr "abbr"++-- | @accept@ attribute+accept :: Attrs a => a+accept = attr "accept"++-- | @accept-charset@ attribute+acceptCharset :: Attrs a => a+acceptCharset = attr "accept-charset"++-- | @accesskey@ attribute+accesskey :: Attrs a => a+accesskey = attr "accesskey"++-- | @action@ attribute+action :: Attrs a => a+action = attr "action"++-- | @align@ attribute+align :: Attrs a => a+align = attr "align"++-- | @alt@ attribute+alt :: Attrs a => a+alt = attr "alt"++-- | @archive@ attribute+archive :: Attrs a => a+archive = attr "archive"++-- | @async@ attribute+async :: Attrs a => a+async = attr "async"++-- | @autocomplete@ attribute+autocomplete :: Attrs a => a+autocomplete = attr "autocomplete"++-- | @autofocus@ attribute+autofocus :: Attrs a => a+autofocus = attr "autofocus"++-- | @autoplay@ attribute+autoplay :: Attrs a => a+autoplay = attr "autoplay"++-- | @axis@ attribute+axis :: Attrs a => a+axis = attr "axis"++-- | @background@ attribute+background :: Attrs a => a+background = attr "background"++-- | @bgcolor@ attribute+bgcolor :: Attrs a => a+bgcolor = attr "bgcolor"++-- | @border@ attribute+border :: Attrs a => a+border = attr "border"++-- | @cellpadding@ attribute+cellpadding :: Attrs a => a+cellpadding = attr "cellpadding"++-- | @cellspacing@ attribute+cellspacing :: Attrs a => a+cellspacing = attr "cellspacing"++-- | @challenge@ attribute+challenge :: Attrs a => a+challenge = attr "challenge"++-- | @char@ attribute+char :: Attrs a => a+char = attr "char"++-- | @charoff@ attribute+charoff :: Attrs a => a+charoff = attr "charoff"++-- | @charset@ attribute+charset :: Attrs a => a+charset = attr "charset"++-- | @checked@ attribute+checked :: Attrs a => a+checked = attr "checked"++-- | @cite@ attribute+cite :: Attrs a => a+cite = attr "cite"++-- | @class@ attribute+class' :: Attrs a => a+class' = attr "class"++-- | @classid@ attribute+classid :: Attrs a => a+classid = attr "classid"++-- | @clear@ attribute+clear :: Attrs a => a+clear = attr "clear"++-- | @codebase@ attribute+codebase :: Attrs a => a+codebase = attr "codebase"++-- | @codetype@ attribute+codetype :: Attrs a => a+codetype = attr "codetype"++-- | @cols@ attribute+cols :: Attrs a => a+cols = attr "cols"++-- | @colspan@ attribute+colspan :: Attrs a => a+colspan = attr "colspan"++-- | @compact@ attribute+compact :: Attrs a => a+compact = attr "compact"++-- | @content@ attribute+content :: Attrs a => a+content = attr "content"++-- | @contenteditable@ attribute+contenteditable :: Attrs a => a+contenteditable = attr "contenteditable"++-- | @contextmenu@ attribute+contextmenu :: Attrs a => a+contextmenu = attr "contextmenu"++-- | @controls@ attribute+controls :: Attrs a => a+controls = attr "controls"++-- | @coords@ attribute+coords :: Attrs a => a+coords = attr "coords"++-- | @data@ attribute+data' :: Attrs a => a+data' = attr "data"++-- | @datetime@ attribute+datetime :: Attrs a => a+datetime = attr "datetime"++-- | @declare@ attribute+declare :: Attrs a => a+declare = attr "declare"++-- | @defer@ attribute+defer :: Attrs a => a+defer = attr "defer"++-- | @dir@ attribute+dir :: Attrs a => a+dir = attr "dir"++-- | @disabled@ attribute+disabled :: Attrs a => a+disabled = attr "disabled"++-- | @draggable@ attribute+draggable :: Attrs a => a+draggable = attr "draggable"++-- | @enctype@ attribute+enctype :: Attrs a => a+enctype = attr "enctype"++-- | @for@ attribute+for :: Attrs a => a+for = attr "for"++-- | @form@ attribute+form :: Attrs a => a+form = attr "form"++-- | @formaction@ attribute+formaction :: Attrs a => a+formaction = attr "formaction"++-- | @formenctype@ attribute+formenctype :: Attrs a => a+formenctype = attr "formenctype"++-- | @formmethod@ attribute+formmethod :: Attrs a => a+formmethod = attr "formmethod"++-- | @formnovalidate@ attribute+formnovalidate :: Attrs a => a+formnovalidate = attr "formnovalidate"++-- | @formtarget@ attribute+formtarget :: Attrs a => a+formtarget = attr "formtarget"++-- | @frame@ attribute+frame :: Attrs a => a+frame = attr "frame"++-- | @frameborder@ attribute+frameborder :: Attrs a => a+frameborder = attr "frameborder"++-- | @headers@ attribute+headers :: Attrs a => a+headers = attr "headers"++-- | @height@ attribute+height :: Attrs a => a+height = attr "height"++-- | @hidden@ attribute+hidden :: Attrs a => a+hidden = attr "hidden"++-- | @high@ attribute+high :: Attrs a => a+high = attr "high"++-- | @href@ attribute+href :: Attrs a => a+href = attr "href"++-- | @hreflang@ attribute+hreflang :: Attrs a => a+hreflang = attr "hreflang"++-- | @hspace@ attribute+hspace :: Attrs a => a+hspace = attr "hspace"++-- | @http-equiv@ attribute+httpEquiv :: Attrs a => a+httpEquiv = attr "http-equiv"++-- | @icon@ attribute+icon :: Attrs a => a+icon = attr "icon"++-- | @id@ attribute+id :: Attrs a => a+id = attr "id"++-- | @ismap@ attribute+ismap :: Attrs a => a+ismap = attr "ismap"++-- | @item@ attribute+item :: Attrs a => a+item = attr "item"++-- | @itemprop@ attribute+itemprop :: Attrs a => a+itemprop = attr "itemprop"++-- | @keytype@ attribute+keytype :: Attrs a => a+keytype = attr "keytype"++-- | @label@ attribute+label :: Attrs a => a+label = attr "label"++-- | @lang@ attribute+lang :: Attrs a => a+lang = attr "lang"++-- | @language@ attribute+language :: Attrs a => a+language = attr "language"++-- | @list@ attribute+list :: Attrs a => a+list = attr "list"++-- | @loop@ attribute+loop :: Attrs a => a+loop = attr "loop"++-- | @low@ attribute+low :: Attrs a => a+low = attr "low"++-- | @manifest@ attribute+manifest :: Attrs a => a+manifest = attr "manifest"++-- | @max@ attribute+max :: Attrs a => a+max = attr "max"++-- | @maxlength@ attribute+maxlength :: Attrs a => a+maxlength = attr "maxlength"++-- | @media@ attribute+media :: Attrs a => a+media = attr "media"++-- | @method@ attribute+method :: Attrs a => a+method = attr "method"++-- | @min@ attribute+min :: Attrs a => a+min = attr "min"++-- | @multiple@ attribute+multiple :: Attrs a => a+multiple = attr "multiple"++-- | @name@ attribute+name :: Attrs a => a+name = attr "name"++-- | @nohref@ attribute+nohref :: Attrs a => a+nohref = attr "nohref"++-- | @noshade@ attribute+noshade :: Attrs a => a+noshade = attr "noshade"++-- | @novalidate@ attribute+novalidate :: Attrs a => a+novalidate = attr "novalidate"++-- | @nowrap@ attribute+nowrap :: Attrs a => a+nowrap = attr "nowrap"++-- | @onabort@ attribute+onabort :: Attrs a => a+onabort = attr "onabort"++-- | @onbeforeonload@ attribute+onbeforeonload :: Attrs a => a+onbeforeonload = attr "onbeforeonload"++-- | @onbeforeprint@ attribute+onbeforeprint :: Attrs a => a+onbeforeprint = attr "onbeforeprint"++-- | @onblur@ attribute+onblur :: Attrs a => a+onblur = attr "onblur"++-- | @oncanplay@ attribute+oncanplay :: Attrs a => a+oncanplay = attr "oncanplay"++-- | @oncanplaythrough@ attribute+oncanplaythrough :: Attrs a => a+oncanplaythrough = attr "oncanplaythrough"++-- | @onchange@ attribute+onchange :: Attrs a => a+onchange = attr "onchange"++-- | @onclick@ attribute+onclick :: Attrs a => a+onclick = attr "onclick"++-- | @oncontextmenu@ attribute+oncontextmenu :: Attrs a => a+oncontextmenu = attr "oncontextmenu"++-- | @ondblclick@ attribute+ondblclick :: Attrs a => a+ondblclick = attr "ondblclick"++-- | @ondrag@ attribute+ondrag :: Attrs a => a+ondrag = attr "ondrag"++-- | @ondragend@ attribute+ondragend :: Attrs a => a+ondragend = attr "ondragend"++-- | @ondragenter@ attribute+ondragenter :: Attrs a => a+ondragenter = attr "ondragenter"++-- | @ondragleave@ attribute+ondragleave :: Attrs a => a+ondragleave = attr "ondragleave"++-- | @ondragover@ attribute+ondragover :: Attrs a => a+ondragover = attr "ondragover"++-- | @ondragstart@ attribute+ondragstart :: Attrs a => a+ondragstart = attr "ondragstart"++-- | @ondrop@ attribute+ondrop :: Attrs a => a+ondrop = attr "ondrop"++-- | @ondurationchange@ attribute+ondurationchange :: Attrs a => a+ondurationchange = attr "ondurationchange"++-- | @onemptied@ attribute+onemptied :: Attrs a => a+onemptied = attr "onemptied"++-- | @onended@ attribute+onended :: Attrs a => a+onended = attr "onended"++-- | @onerror@ attribute+onerror :: Attrs a => a+onerror = attr "onerror"++-- | @onfocus@ attribute+onfocus :: Attrs a => a+onfocus = attr "onfocus"++-- | @onformchange@ attribute+onformchange :: Attrs a => a+onformchange = attr "onformchange"++-- | @onforminput@ attribute+onforminput :: Attrs a => a+onforminput = attr "onforminput"++-- | @onhaschange@ attribute+onhaschange :: Attrs a => a+onhaschange = attr "onhaschange"++-- | @oninput@ attribute+oninput :: Attrs a => a+oninput = attr "oninput"++-- | @oninvalid@ attribute+oninvalid :: Attrs a => a+oninvalid = attr "oninvalid"++-- | @onkeydown@ attribute+onkeydown :: Attrs a => a+onkeydown = attr "onkeydown"++-- | @onkeypress@ attribute+onkeypress :: Attrs a => a+onkeypress = attr "onkeypress"++-- | @onkeyup@ attribute+onkeyup :: Attrs a => a+onkeyup = attr "onkeyup"++-- | @onload@ attribute+onload :: Attrs a => a+onload = attr "onload"++-- | @onloadeddata@ attribute+onloadeddata :: Attrs a => a+onloadeddata = attr "onloadeddata"++-- | @onloadedmetadata@ attribute+onloadedmetadata :: Attrs a => a+onloadedmetadata = attr "onloadedmetadata"++-- | @onloadstart@ attribute+onloadstart :: Attrs a => a+onloadstart = attr "onloadstart"++-- | @onmessage@ attribute+onmessage :: Attrs a => a+onmessage = attr "onmessage"++-- | @onmousedown@ attribute+onmousedown :: Attrs a => a+onmousedown = attr "onmousedown"++-- | @onmousemove@ attribute+onmousemove :: Attrs a => a+onmousemove = attr "onmousemove"++-- | @onmouseout@ attribute+onmouseout :: Attrs a => a+onmouseout = attr "onmouseout"++-- | @onmouseover@ attribute+onmouseover :: Attrs a => a+onmouseover = attr "onmouseover"++-- | @onmouseup@ attribute+onmouseup :: Attrs a => a+onmouseup = attr "onmouseup"++-- | @onmousewheel@ attribute+onmousewheel :: Attrs a => a+onmousewheel = attr "onmousewheel"++-- | @ononline@ attribute+ononline :: Attrs a => a+ononline = attr "ononline"++-- | @onpagehide@ attribute+onpagehide :: Attrs a => a+onpagehide = attr "onpagehide"++-- | @onpageshow@ attribute+onpageshow :: Attrs a => a+onpageshow = attr "onpageshow"++-- | @onpause@ attribute+onpause :: Attrs a => a+onpause = attr "onpause"++-- | @onplay@ attribute+onplay :: Attrs a => a+onplay = attr "onplay"++-- | @onplaying@ attribute+onplaying :: Attrs a => a+onplaying = attr "onplaying"++-- | @onprogress@ attribute+onprogress :: Attrs a => a+onprogress = attr "onprogress"++-- | @onpropstate@ attribute+onpropstate :: Attrs a => a+onpropstate = attr "onpropstate"++-- | @onratechange@ attribute+onratechange :: Attrs a => a+onratechange = attr "onratechange"++-- | @onreadystatechange@ attribute+onreadystatechange :: Attrs a => a+onreadystatechange = attr "onreadystatechange"++-- | @onredo@ attribute+onredo :: Attrs a => a+onredo = attr "onredo"++-- | @onreset@ attribute+onreset :: Attrs a => a+onreset = attr "onreset"++-- | @onresize@ attribute+onresize :: Attrs a => a+onresize = attr "onresize"++-- | @onscroll@ attribute+onscroll :: Attrs a => a+onscroll = attr "onscroll"++-- | @onseeked@ attribute+onseeked :: Attrs a => a+onseeked = attr "onseeked"++-- | @onseeking@ attribute+onseeking :: Attrs a => a+onseeking = attr "onseeking"++-- | @onselect@ attribute+onselect :: Attrs a => a+onselect = attr "onselect"++-- | @onstalled@ attribute+onstalled :: Attrs a => a+onstalled = attr "onstalled"++-- | @onstorage@ attribute+onstorage :: Attrs a => a+onstorage = attr "onstorage"++-- | @onsubmit@ attribute+onsubmit :: Attrs a => a+onsubmit = attr "onsubmit"++-- | @onsuspend@ attribute+onsuspend :: Attrs a => a+onsuspend = attr "onsuspend"++-- | @ontimeupdate@ attribute+ontimeupdate :: Attrs a => a+ontimeupdate = attr "ontimeupdate"++-- | @onundo@ attribute+onundo :: Attrs a => a+onundo = attr "onundo"++-- | @onunload@ attribute+onunload :: Attrs a => a+onunload = attr "onunload"++-- | @onvolumechange@ attribute+onvolumechange :: Attrs a => a+onvolumechange = attr "onvolumechange"++-- | @onwaiting@ attribute+onwaiting :: Attrs a => a+onwaiting = attr "onwaiting"++-- | @open@ attribute+open :: Attrs a => a+open = attr "open"++-- | @optimum@ attribute+optimum :: Attrs a => a+optimum = attr "optimum"++-- | @pattern@ attribute+pattern :: Attrs a => a+pattern = attr "pattern"++-- | @ping@ attribute+ping :: Attrs a => a+ping = attr "ping"++-- | @placeholder@ attribute+placeholder :: Attrs a => a+placeholder = attr "placeholder"++-- | @preload@ attribute+preload :: Attrs a => a+preload = attr "preload"++-- | @profile@ attribute+profile :: Attrs a => a+profile = attr "profile"++-- | @pubdate@ attribute+pubdate :: Attrs a => a+pubdate = attr "pubdate"++-- | @radiogroup@ attribute+radiogroup :: Attrs a => a+radiogroup = attr "radiogroup"++-- | @readonly@ attribute+readonly :: Attrs a => a+readonly = attr "readonly"++-- | @rel@ attribute+rel :: Attrs a => a+rel = attr "rel"++-- | @required@ attribute+required :: Attrs a => a+required = attr "required"++-- | @rev@ attribute+rev :: Attrs a => a+rev = attr "rev"++-- | @reversed@ attribute+reversed :: Attrs a => a+reversed = attr "reversed"++-- | @rows@ attribute+rows :: Attrs a => a+rows = attr "rows"++-- | @rowspan@ attribute+rowspan :: Attrs a => a+rowspan = attr "rowspan"++-- | @rules@ attribute+rules :: Attrs a => a+rules = attr "rules"++-- | @sandbox@ attribute+sandbox :: Attrs a => a+sandbox = attr "sandbox"++-- | @scheme@ attribute+scheme :: Attrs a => a+scheme = attr "scheme"++-- | @scope@ attribute+scope :: Attrs a => a+scope = attr "scope"++-- | @scoped@ attribute+scoped :: Attrs a => a+scoped = attr "scoped"++-- | @scrolling@ attribute+scrolling :: Attrs a => a+scrolling = attr "scrolling"++-- | @seamless@ attribute+seamless :: Attrs a => a+seamless = attr "seamless"++-- | @selected@ attribute+selected :: Attrs a => a+selected = attr "selected"++-- | @shape@ attribute+shape :: Attrs a => a+shape = attr "shape"++-- | @size@ attribute+size :: Attrs a => a+size = attr "size"++-- | @sizes@ attribute+sizes :: Attrs a => a+sizes = attr "sizes"++-- | @span@ attribute+span :: Attrs a => a+span = attr "span"++-- | @spellcheck@ attribute+spellcheck :: Attrs a => a+spellcheck = attr "spellcheck"++-- | @src@ attribute+src :: Attrs a => a+src = attr "src"++-- | @srcdoc@ attribute+srcdoc :: Attrs a => a+srcdoc = attr "srcdoc"++-- | @standby@ attribute+standby :: Attrs a => a+standby = attr "standby"++-- | @start@ attribute+start :: Attrs a => a+start = attr "start"++-- | @step@ attribute+step :: Attrs a => a+step = attr "step"++-- | @style@ attribute+style :: Attrs a => a+style = attr "style"++-- | @subject@ attribute+subject :: Attrs a => a+subject = attr "subject"++-- | @summary@ attribute+summary :: Attrs a => a+summary = attr "summary"++-- | @tabindex@ attribute+tabindex :: Attrs a => a+tabindex = attr "tabindex"++-- | @target@ attribute+target :: Attrs a => a+target = attr "target"++-- | @title@ attribute+title :: Attrs a => a+title = attr "title"++-- | @type@ attribute+type' :: Attrs a => a+type' = attr "type"++-- | @usemap@ attribute+usemap :: Attrs a => a+usemap = attr "usemap"++-- | @valign@ attribute+valign :: Attrs a => a+valign = attr "valign"++-- | @value@ attribute+value :: Attrs a => a+value = attr "value"++-- | @valuetype@ attribute+valuetype :: Attrs a => a+valuetype = attr "valuetype"++-- | @vspace@ attribute+vspace :: Attrs a => a+vspace = attr "vspace"++-- | @width@ attribute+width :: Attrs a => a+width = attr "width"++-- | @wrap@ attribute+wrap :: Attrs a => a+wrap = attr "wrap"++-- | @xmlns@ attribute+xmlns :: Attrs a => a+xmlns = attr "xmlns"
+ src/Language/Css/Build/Idents.hs view
@@ -0,0 +1,1481 @@+-- | css 2.1 identifiers+module Language.Css.Build.Idents (+ above,+ absolute,+ absoluteSize,+ always,+ armenian,+ auto,+ avoid,+ azimuth,+ background,+ backgroundAttachment,+ backgroundColor,+ backgroundImage,+ backgroundPosition,+ backgroundRepeat,+ baseline,+ behind,+ below,+ bidiOverride,+ blink,+ block,+ bold,+ bolder,+ border,+ borderBottom,+ borderBottomColor,+ borderBottomStyle,+ borderBottomWidth,+ borderCollapse,+ borderColor,+ borderLeft,+ borderLeftColor,+ borderLeftStyle,+ borderLeftWidth,+ borderRight,+ borderRightColor,+ borderRightStyle,+ borderRightWidth,+ borderSpacing,+ borderStyle,+ borderTop,+ borderTopColor,+ borderTopStyle,+ borderTopWidth,+ borderWidth,+ both,+ bottom,+ capitalize,+ caption,+ captionSide,+ center,+ centerLeft,+ centerRight,+ child,+ circle,+ clear,+ clip,+ closeQuote,+ code,+ collapse,+ color,+ content,+ continuous,+ counterIncrement,+ counterReset,+ crosshair,+ cue,+ cueAfter,+ cueBefore,+ cursive,+ cursor,+ dashed,+ decimal,+ decimalLeadingZero,+ default',+ digits,+ direction,+ disc,+ display,+ dotted,+ double,+ eResize,+ elevation,+ embed,+ emptyCells,+ familyName,+ fantasy,+ farLeft,+ farRight,+ fast,+ faster,+ female,+ fixed,+ float,+ font,+ fontFamily,+ fontSize,+ fontStyle,+ fontVariant,+ fontWeight,+ genericFamily,+ genericVoice,+ georgian,+ groove,+ height,+ help,+ hidden,+ hide,+ high,+ higher,+ icon,+ inherit,+ inline,+ inlineBlock,+ inlineTable,+ inset,+ inside,+ invert,+ italic,+ justify,+ large,+ larger,+ left,+ leftSide,+ leftwards,+ letterSpacing,+ level,+ lighter,+ lineHeight,+ lineThrough,+ listItem,+ listStyle,+ listStyleImage,+ listStylePosition,+ listStyleType,+ loud,+ low,+ lower,+ lowerAlpha,+ lowerGreek,+ lowerLatin,+ lowerRoman,+ lowercase,+ ltr,+ male,+ margin,+ marginBottom,+ marginLeft,+ marginRight,+ marginTop,+ marginWidth,+ maxHeight,+ maxWidth,+ medium,+ menu,+ messageBox,+ middle,+ minHeight,+ minWidth,+ mix,+ monospace,+ move,+ nResize,+ neResize,+ noCloseQuote,+ noOpenQuote,+ noRepeat,+ none,+ normal,+ nowrap,+ nwResize,+ oblique,+ once,+ openQuote,+ orphans,+ outline,+ outlineColor,+ outlineStyle,+ outlineWidth,+ outset,+ outside,+ overflow,+ overline,+ padding,+ paddingBottom,+ paddingLeft,+ paddingRight,+ paddingTop,+ paddingWidth,+ pageBreakAfter,+ pageBreakBefore,+ pageBreakInside,+ pause,+ pauseAfter,+ pauseBefore,+ pitch,+ pitchRange,+ playDuring,+ pointer,+ position,+ pre,+ preLine,+ preWrap,+ progress,+ quotes,+ relative,+ relativeSize,+ repeat,+ repeatX,+ repeatY,+ richness,+ ridge,+ right,+ rightSide,+ rightwards,+ rtl,+ runIn,+ sResize,+ sansSerif,+ scroll,+ seResize,+ separate,+ serif,+ show,+ silent,+ slow,+ slower,+ small,+ smallCaps,+ smallCaption,+ smaller,+ soft,+ solid,+ speak,+ speakHeader,+ speakNumeral,+ speakPunctuation,+ specificVoice,+ speechRate,+ spellOut,+ square,+ static,+ statusBar,+ stress,+ sub,+ super,+ swResize,+ table,+ tableCaption,+ tableCell,+ tableColumn,+ tableColumnGroup,+ tableFooterGroup,+ tableHeaderGroup,+ tableLayout,+ tableRow,+ tableRowGroup,+ text,+ textAlign,+ textBottom,+ textDecoration,+ textIndent,+ textTop,+ textTransform,+ thick,+ thin,+ top,+ transparent,+ underline,+ unicodeBidi,+ upperAlpha,+ upperLatin,+ upperRoman,+ uppercase,+ verticalAlign,+ visibility,+ visible,+ voiceFamily,+ volume,+ wResize,+ wait,+ whiteSpace,+ widows,+ width,+ wordSpacing,+ xFast,+ xHigh,+ xLarge,+ xLoud,+ xLow,+ xSlow,+ xSmall,+ xSoft,+ xxLarge,+ xxSmall,+ zIndex+) where+import Language.Css.Syntax+import Language.Css.Build+import Prelude ()++-- | above+above :: Idents a => a+above = ident "above"++-- | absolute+absolute :: Idents a => a+absolute = ident "absolute"++-- | absolute-size+absoluteSize :: Idents a => a+absoluteSize = ident "absolute-size"++-- | always+always :: Idents a => a+always = ident "always"++-- | armenian+armenian :: Idents a => a+armenian = ident "armenian"++-- | auto+auto :: Idents a => a+auto = ident "auto"++-- | avoid+avoid :: Idents a => a+avoid = ident "avoid"++-- | azimuth+azimuth :: Idents a => a+azimuth = ident "azimuth"++-- | background+background :: Idents a => a+background = ident "background"++-- | background-attachment+backgroundAttachment :: Idents a => a+backgroundAttachment = ident "background-attachment"++-- | background-color+backgroundColor :: Idents a => a+backgroundColor = ident "background-color"++-- | background-image+backgroundImage :: Idents a => a+backgroundImage = ident "background-image"++-- | background-position+backgroundPosition :: Idents a => a+backgroundPosition = ident "background-position"++-- | background-repeat+backgroundRepeat :: Idents a => a+backgroundRepeat = ident "background-repeat"++-- | baseline+baseline :: Idents a => a+baseline = ident "baseline"++-- | behind+behind :: Idents a => a+behind = ident "behind"++-- | below+below :: Idents a => a+below = ident "below"++-- | bidi-override+bidiOverride :: Idents a => a+bidiOverride = ident "bidi-override"++-- | blink+blink :: Idents a => a+blink = ident "blink"++-- | block+block :: Idents a => a+block = ident "block"++-- | bold+bold :: Idents a => a+bold = ident "bold"++-- | bolder+bolder :: Idents a => a+bolder = ident "bolder"++-- | border+border :: Idents a => a+border = ident "border"++-- | border-bottom+borderBottom :: Idents a => a+borderBottom = ident "border-bottom"++-- | border-bottom-color+borderBottomColor :: Idents a => a+borderBottomColor = ident "border-bottom-color"++-- | border-bottom-style+borderBottomStyle :: Idents a => a+borderBottomStyle = ident "border-bottom-style"++-- | border-bottom-width+borderBottomWidth :: Idents a => a+borderBottomWidth = ident "border-bottom-width"++-- | border-collapse+borderCollapse :: Idents a => a+borderCollapse = ident "border-collapse"++-- | border-color+borderColor :: Idents a => a+borderColor = ident "border-color"++-- | border-left+borderLeft :: Idents a => a+borderLeft = ident "border-left"++-- | border-left-color+borderLeftColor :: Idents a => a+borderLeftColor = ident "border-left-color"++-- | border-left-style+borderLeftStyle :: Idents a => a+borderLeftStyle = ident "border-left-style"++-- | border-left-width+borderLeftWidth :: Idents a => a+borderLeftWidth = ident "border-left-width"++-- | border-right+borderRight :: Idents a => a+borderRight = ident "border-right"++-- | border-right-color+borderRightColor :: Idents a => a+borderRightColor = ident "border-right-color"++-- | border-right-style+borderRightStyle :: Idents a => a+borderRightStyle = ident "border-right-style"++-- | border-right-width+borderRightWidth :: Idents a => a+borderRightWidth = ident "border-right-width"++-- | border-spacing+borderSpacing :: Idents a => a+borderSpacing = ident "border-spacing"++-- | border-style+borderStyle :: Idents a => a+borderStyle = ident "border-style"++-- | border-top+borderTop :: Idents a => a+borderTop = ident "border-top"++-- | border-top-color+borderTopColor :: Idents a => a+borderTopColor = ident "border-top-color"++-- | border-top-style+borderTopStyle :: Idents a => a+borderTopStyle = ident "border-top-style"++-- | border-top-width+borderTopWidth :: Idents a => a+borderTopWidth = ident "border-top-width"++-- | border-width+borderWidth :: Idents a => a+borderWidth = ident "border-width"++-- | both+both :: Idents a => a+both = ident "both"++-- | bottom+bottom :: Idents a => a+bottom = ident "bottom"++-- | capitalize+capitalize :: Idents a => a+capitalize = ident "capitalize"++-- | caption+caption :: Idents a => a+caption = ident "caption"++-- | caption-side+captionSide :: Idents a => a+captionSide = ident "caption-side"++-- | center+center :: Idents a => a+center = ident "center"++-- | center-left+centerLeft :: Idents a => a+centerLeft = ident "center-left"++-- | center-right+centerRight :: Idents a => a+centerRight = ident "center-right"++-- | child+child :: Idents a => a+child = ident "child"++-- | circle+circle :: Idents a => a+circle = ident "circle"++-- | clear+clear :: Idents a => a+clear = ident "clear"++-- | clip+clip :: Idents a => a+clip = ident "clip"++-- | close-quote+closeQuote :: Idents a => a+closeQuote = ident "close-quote"++-- | code+code :: Idents a => a+code = ident "code"++-- | collapse+collapse :: Idents a => a+collapse = ident "collapse"++-- | color+color :: Idents a => a+color = ident "color"++-- | content+content :: Idents a => a+content = ident "content"++-- | continuous+continuous :: Idents a => a+continuous = ident "continuous"++-- | counter-increment+counterIncrement :: Idents a => a+counterIncrement = ident "counter-increment"++-- | counter-reset+counterReset :: Idents a => a+counterReset = ident "counter-reset"++-- | crosshair+crosshair :: Idents a => a+crosshair = ident "crosshair"++-- | cue+cue :: Idents a => a+cue = ident "cue"++-- | cue-after+cueAfter :: Idents a => a+cueAfter = ident "cue-after"++-- | cue-before+cueBefore :: Idents a => a+cueBefore = ident "cue-before"++-- | cursive+cursive :: Idents a => a+cursive = ident "cursive"++-- | cursor+cursor :: Idents a => a+cursor = ident "cursor"++-- | dashed+dashed :: Idents a => a+dashed = ident "dashed"++-- | decimal+decimal :: Idents a => a+decimal = ident "decimal"++-- | decimal-leading-zero+decimalLeadingZero :: Idents a => a+decimalLeadingZero = ident "decimal-leading-zero"++-- | default+default' :: Idents a => a+default' = ident "default"++-- | digits+digits :: Idents a => a+digits = ident "digits"++-- | direction+direction :: Idents a => a+direction = ident "direction"++-- | disc+disc :: Idents a => a+disc = ident "disc"++-- | display+display :: Idents a => a+display = ident "display"++-- | dotted+dotted :: Idents a => a+dotted = ident "dotted"++-- | double+double :: Idents a => a+double = ident "double"++-- | e-resize+eResize :: Idents a => a+eResize = ident "e-resize"++-- | elevation+elevation :: Idents a => a+elevation = ident "elevation"++-- | embed+embed :: Idents a => a+embed = ident "embed"++-- | empty-cells+emptyCells :: Idents a => a+emptyCells = ident "empty-cells"++-- | family-name+familyName :: Idents a => a+familyName = ident "family-name"++-- | fantasy+fantasy :: Idents a => a+fantasy = ident "fantasy"++-- | far-left+farLeft :: Idents a => a+farLeft = ident "far-left"++-- | far-right+farRight :: Idents a => a+farRight = ident "far-right"++-- | fast+fast :: Idents a => a+fast = ident "fast"++-- | faster+faster :: Idents a => a+faster = ident "faster"++-- | female+female :: Idents a => a+female = ident "female"++-- | fixed+fixed :: Idents a => a+fixed = ident "fixed"++-- | float+float :: Idents a => a+float = ident "float"++-- | font+font :: Idents a => a+font = ident "font"++-- | font-family+fontFamily :: Idents a => a+fontFamily = ident "font-family"++-- | font-size+fontSize :: Idents a => a+fontSize = ident "font-size"++-- | font-style+fontStyle :: Idents a => a+fontStyle = ident "font-style"++-- | font-variant+fontVariant :: Idents a => a+fontVariant = ident "font-variant"++-- | font-weight+fontWeight :: Idents a => a+fontWeight = ident "font-weight"++-- | generic-family+genericFamily :: Idents a => a+genericFamily = ident "generic-family"++-- | generic-voice+genericVoice :: Idents a => a+genericVoice = ident "generic-voice"++-- | georgian+georgian :: Idents a => a+georgian = ident "georgian"++-- | groove+groove :: Idents a => a+groove = ident "groove"++-- | height+height :: Idents a => a+height = ident "height"++-- | help+help :: Idents a => a+help = ident "help"++-- | hidden+hidden :: Idents a => a+hidden = ident "hidden"++-- | hide+hide :: Idents a => a+hide = ident "hide"++-- | high+high :: Idents a => a+high = ident "high"++-- | higher+higher :: Idents a => a+higher = ident "higher"++-- | icon+icon :: Idents a => a+icon = ident "icon"++-- | inherit+inherit :: Idents a => a+inherit = ident "inherit"++-- | inline+inline :: Idents a => a+inline = ident "inline"++-- | inline-block+inlineBlock :: Idents a => a+inlineBlock = ident "inline-block"++-- | inline-table+inlineTable :: Idents a => a+inlineTable = ident "inline-table"++-- | inset+inset :: Idents a => a+inset = ident "inset"++-- | inside+inside :: Idents a => a+inside = ident "inside"++-- | invert+invert :: Idents a => a+invert = ident "invert"++-- | italic+italic :: Idents a => a+italic = ident "italic"++-- | justify+justify :: Idents a => a+justify = ident "justify"++-- | large+large :: Idents a => a+large = ident "large"++-- | larger+larger :: Idents a => a+larger = ident "larger"++-- | left+left :: Idents a => a+left = ident "left"++-- | left-side+leftSide :: Idents a => a+leftSide = ident "left-side"++-- | leftwards+leftwards :: Idents a => a+leftwards = ident "leftwards"++-- | letter-spacing+letterSpacing :: Idents a => a+letterSpacing = ident "letter-spacing"++-- | level+level :: Idents a => a+level = ident "level"++-- | lighter+lighter :: Idents a => a+lighter = ident "lighter"++-- | line-height+lineHeight :: Idents a => a+lineHeight = ident "line-height"++-- | line-through+lineThrough :: Idents a => a+lineThrough = ident "line-through"++-- | list-item+listItem :: Idents a => a+listItem = ident "list-item"++-- | list-style+listStyle :: Idents a => a+listStyle = ident "list-style"++-- | list-style-image+listStyleImage :: Idents a => a+listStyleImage = ident "list-style-image"++-- | list-style-position+listStylePosition :: Idents a => a+listStylePosition = ident "list-style-position"++-- | list-style-type+listStyleType :: Idents a => a+listStyleType = ident "list-style-type"++-- | loud+loud :: Idents a => a+loud = ident "loud"++-- | low+low :: Idents a => a+low = ident "low"++-- | lower+lower :: Idents a => a+lower = ident "lower"++-- | lower-alpha+lowerAlpha :: Idents a => a+lowerAlpha = ident "lower-alpha"++-- | lower-greek+lowerGreek :: Idents a => a+lowerGreek = ident "lower-greek"++-- | lower-latin+lowerLatin :: Idents a => a+lowerLatin = ident "lower-latin"++-- | lower-roman+lowerRoman :: Idents a => a+lowerRoman = ident "lower-roman"++-- | lowercase+lowercase :: Idents a => a+lowercase = ident "lowercase"++-- | ltr+ltr :: Idents a => a+ltr = ident "ltr"++-- | male+male :: Idents a => a+male = ident "male"++-- | margin+margin :: Idents a => a+margin = ident "margin"++-- | margin-bottom+marginBottom :: Idents a => a+marginBottom = ident "margin-bottom"++-- | margin-left+marginLeft :: Idents a => a+marginLeft = ident "margin-left"++-- | margin-right+marginRight :: Idents a => a+marginRight = ident "margin-right"++-- | margin-top+marginTop :: Idents a => a+marginTop = ident "margin-top"++-- | margin-width+marginWidth :: Idents a => a+marginWidth = ident "margin-width"++-- | max-height+maxHeight :: Idents a => a+maxHeight = ident "max-height"++-- | max-width+maxWidth :: Idents a => a+maxWidth = ident "max-width"++-- | medium+medium :: Idents a => a+medium = ident "medium"++-- | menu+menu :: Idents a => a+menu = ident "menu"++-- | message-box+messageBox :: Idents a => a+messageBox = ident "message-box"++-- | middle+middle :: Idents a => a+middle = ident "middle"++-- | min-height+minHeight :: Idents a => a+minHeight = ident "min-height"++-- | min-width+minWidth :: Idents a => a+minWidth = ident "min-width"++-- | mix+mix :: Idents a => a+mix = ident "mix"++-- | monospace+monospace :: Idents a => a+monospace = ident "monospace"++-- | move+move :: Idents a => a+move = ident "move"++-- | n-resize+nResize :: Idents a => a+nResize = ident "n-resize"++-- | ne-resize+neResize :: Idents a => a+neResize = ident "ne-resize"++-- | no-close-quote+noCloseQuote :: Idents a => a+noCloseQuote = ident "no-close-quote"++-- | no-open-quote+noOpenQuote :: Idents a => a+noOpenQuote = ident "no-open-quote"++-- | no-repeat+noRepeat :: Idents a => a+noRepeat = ident "no-repeat"++-- | none+none :: Idents a => a+none = ident "none"++-- | normal+normal :: Idents a => a+normal = ident "normal"++-- | nowrap+nowrap :: Idents a => a+nowrap = ident "nowrap"++-- | nw-resize+nwResize :: Idents a => a+nwResize = ident "nw-resize"++-- | oblique+oblique :: Idents a => a+oblique = ident "oblique"++-- | once+once :: Idents a => a+once = ident "once"++-- | open-quote+openQuote :: Idents a => a+openQuote = ident "open-quote"++-- | orphans+orphans :: Idents a => a+orphans = ident "orphans"++-- | outline+outline :: Idents a => a+outline = ident "outline"++-- | outline-color+outlineColor :: Idents a => a+outlineColor = ident "outline-color"++-- | outline-style+outlineStyle :: Idents a => a+outlineStyle = ident "outline-style"++-- | outline-width+outlineWidth :: Idents a => a+outlineWidth = ident "outline-width"++-- | outset+outset :: Idents a => a+outset = ident "outset"++-- | outside+outside :: Idents a => a+outside = ident "outside"++-- | overflow+overflow :: Idents a => a+overflow = ident "overflow"++-- | overline+overline :: Idents a => a+overline = ident "overline"++-- | padding+padding :: Idents a => a+padding = ident "padding"++-- | padding-bottom+paddingBottom :: Idents a => a+paddingBottom = ident "padding-bottom"++-- | padding-left+paddingLeft :: Idents a => a+paddingLeft = ident "padding-left"++-- | padding-right+paddingRight :: Idents a => a+paddingRight = ident "padding-right"++-- | padding-top+paddingTop :: Idents a => a+paddingTop = ident "padding-top"++-- | padding-width+paddingWidth :: Idents a => a+paddingWidth = ident "padding-width"++-- | page-break-after+pageBreakAfter :: Idents a => a+pageBreakAfter = ident "page-break-after"++-- | page-break-before+pageBreakBefore :: Idents a => a+pageBreakBefore = ident "page-break-before"++-- | page-break-inside+pageBreakInside :: Idents a => a+pageBreakInside = ident "page-break-inside"++-- | pause+pause :: Idents a => a+pause = ident "pause"++-- | pause-after+pauseAfter :: Idents a => a+pauseAfter = ident "pause-after"++-- | pause-before+pauseBefore :: Idents a => a+pauseBefore = ident "pause-before"++-- | pitch+pitch :: Idents a => a+pitch = ident "pitch"++-- | pitch-range+pitchRange :: Idents a => a+pitchRange = ident "pitch-range"++-- | play-during+playDuring :: Idents a => a+playDuring = ident "play-during"++-- | pointer+pointer :: Idents a => a+pointer = ident "pointer"++-- | position+position :: Idents a => a+position = ident "position"++-- | pre+pre :: Idents a => a+pre = ident "pre"++-- | pre-line+preLine :: Idents a => a+preLine = ident "pre-line"++-- | pre-wrap+preWrap :: Idents a => a+preWrap = ident "pre-wrap"++-- | progress+progress :: Idents a => a+progress = ident "progress"++-- | quotes+quotes :: Idents a => a+quotes = ident "quotes"++-- | relative+relative :: Idents a => a+relative = ident "relative"++-- | relative-size+relativeSize :: Idents a => a+relativeSize = ident "relative-size"++-- | repeat+repeat :: Idents a => a+repeat = ident "repeat"++-- | repeat-x+repeatX :: Idents a => a+repeatX = ident "repeat-x"++-- | repeat-y+repeatY :: Idents a => a+repeatY = ident "repeat-y"++-- | richness+richness :: Idents a => a+richness = ident "richness"++-- | ridge+ridge :: Idents a => a+ridge = ident "ridge"++-- | right+right :: Idents a => a+right = ident "right"++-- | right-side+rightSide :: Idents a => a+rightSide = ident "right-side"++-- | rightwards+rightwards :: Idents a => a+rightwards = ident "rightwards"++-- | rtl+rtl :: Idents a => a+rtl = ident "rtl"++-- | run-in+runIn :: Idents a => a+runIn = ident "run-in"++-- | s-resize+sResize :: Idents a => a+sResize = ident "s-resize"++-- | sans-serif+sansSerif :: Idents a => a+sansSerif = ident "sans-serif"++-- | scroll+scroll :: Idents a => a+scroll = ident "scroll"++-- | se-resize+seResize :: Idents a => a+seResize = ident "se-resize"++-- | separate+separate :: Idents a => a+separate = ident "separate"++-- | serif+serif :: Idents a => a+serif = ident "serif"++-- | show+show :: Idents a => a+show = ident "show"++-- | silent+silent :: Idents a => a+silent = ident "silent"++-- | slow+slow :: Idents a => a+slow = ident "slow"++-- | slower+slower :: Idents a => a+slower = ident "slower"++-- | small+small :: Idents a => a+small = ident "small"++-- | small-caps+smallCaps :: Idents a => a+smallCaps = ident "small-caps"++-- | small-caption+smallCaption :: Idents a => a+smallCaption = ident "small-caption"++-- | smaller+smaller :: Idents a => a+smaller = ident "smaller"++-- | soft+soft :: Idents a => a+soft = ident "soft"++-- | solid+solid :: Idents a => a+solid = ident "solid"++-- | speak+speak :: Idents a => a+speak = ident "speak"++-- | speak-header+speakHeader :: Idents a => a+speakHeader = ident "speak-header"++-- | speak-numeral+speakNumeral :: Idents a => a+speakNumeral = ident "speak-numeral"++-- | speak-punctuation+speakPunctuation :: Idents a => a+speakPunctuation = ident "speak-punctuation"++-- | specific-voice+specificVoice :: Idents a => a+specificVoice = ident "specific-voice"++-- | speech-rate+speechRate :: Idents a => a+speechRate = ident "speech-rate"++-- | spell-out+spellOut :: Idents a => a+spellOut = ident "spell-out"++-- | square+square :: Idents a => a+square = ident "square"++-- | static+static :: Idents a => a+static = ident "static"++-- | status-bar+statusBar :: Idents a => a+statusBar = ident "status-bar"++-- | stress+stress :: Idents a => a+stress = ident "stress"++-- | sub+sub :: Idents a => a+sub = ident "sub"++-- | super+super :: Idents a => a+super = ident "super"++-- | sw-resize+swResize :: Idents a => a+swResize = ident "sw-resize"++-- | table+table :: Idents a => a+table = ident "table"++-- | table-caption+tableCaption :: Idents a => a+tableCaption = ident "table-caption"++-- | table-cell+tableCell :: Idents a => a+tableCell = ident "table-cell"++-- | table-column+tableColumn :: Idents a => a+tableColumn = ident "table-column"++-- | table-column-group+tableColumnGroup :: Idents a => a+tableColumnGroup = ident "table-column-group"++-- | table-footer-group+tableFooterGroup :: Idents a => a+tableFooterGroup = ident "table-footer-group"++-- | table-header-group+tableHeaderGroup :: Idents a => a+tableHeaderGroup = ident "table-header-group"++-- | table-layout+tableLayout :: Idents a => a+tableLayout = ident "table-layout"++-- | table-row+tableRow :: Idents a => a+tableRow = ident "table-row"++-- | table-row-group+tableRowGroup :: Idents a => a+tableRowGroup = ident "table-row-group"++-- | text+text :: Idents a => a+text = ident "text"++-- | text-align+textAlign :: Idents a => a+textAlign = ident "text-align"++-- | text-bottom+textBottom :: Idents a => a+textBottom = ident "text-bottom"++-- | text-decoration+textDecoration :: Idents a => a+textDecoration = ident "text-decoration"++-- | text-indent+textIndent :: Idents a => a+textIndent = ident "text-indent"++-- | text-top+textTop :: Idents a => a+textTop = ident "text-top"++-- | text-transform+textTransform :: Idents a => a+textTransform = ident "text-transform"++-- | thick+thick :: Idents a => a+thick = ident "thick"++-- | thin+thin :: Idents a => a+thin = ident "thin"++-- | top+top :: Idents a => a+top = ident "top"++-- | transparent+transparent :: Idents a => a+transparent = ident "transparent"++-- | underline+underline :: Idents a => a+underline = ident "underline"++-- | unicode-bidi+unicodeBidi :: Idents a => a+unicodeBidi = ident "unicode-bidi"++-- | upper-alpha+upperAlpha :: Idents a => a+upperAlpha = ident "upper-alpha"++-- | upper-latin+upperLatin :: Idents a => a+upperLatin = ident "upper-latin"++-- | upper-roman+upperRoman :: Idents a => a+upperRoman = ident "upper-roman"++-- | uppercase+uppercase :: Idents a => a+uppercase = ident "uppercase"++-- | vertical-align+verticalAlign :: Idents a => a+verticalAlign = ident "vertical-align"++-- | visibility+visibility :: Idents a => a+visibility = ident "visibility"++-- | visible+visible :: Idents a => a+visible = ident "visible"++-- | voice-family+voiceFamily :: Idents a => a+voiceFamily = ident "voice-family"++-- | volume+volume :: Idents a => a+volume = ident "volume"++-- | w-resize+wResize :: Idents a => a+wResize = ident "w-resize"++-- | wait+wait :: Idents a => a+wait = ident "wait"++-- | white-space+whiteSpace :: Idents a => a+whiteSpace = ident "white-space"++-- | widows+widows :: Idents a => a+widows = ident "widows"++-- | width+width :: Idents a => a+width = ident "width"++-- | word-spacing+wordSpacing :: Idents a => a+wordSpacing = ident "word-spacing"++-- | x-fast+xFast :: Idents a => a+xFast = ident "x-fast"++-- | x-high+xHigh :: Idents a => a+xHigh = ident "x-high"++-- | x-large+xLarge :: Idents a => a+xLarge = ident "x-large"++-- | x-loud+xLoud :: Idents a => a+xLoud = ident "x-loud"++-- | x-low+xLow :: Idents a => a+xLow = ident "x-low"++-- | x-slow+xSlow :: Idents a => a+xSlow = ident "x-slow"++-- | x-small+xSmall :: Idents a => a+xSmall = ident "x-small"++-- | x-soft+xSoft :: Idents a => a+xSoft = ident "x-soft"++-- | xx-large+xxLarge :: Idents a => a+xxLarge = ident "xx-large"++-- | xx-small+xxSmall :: Idents a => a+xxSmall = ident "xx-small"++-- | z-index+zIndex :: Idents a => a+zIndex = ident "z-index"
+ src/Language/Css/Build/Pseudos.hs view
@@ -0,0 +1,69 @@+module Language.Css.Build.Pseudos (+ -- * pseudo-classes+ firstChild,+ link,+ visited,+ hover,+ active,+ focus,+ lang,++ -- * pseudo-elements+ firstLine,+ firstLetter,+ before,+ after+) +where++import Language.Css.Syntax+import Language.Css.Build ++-- pseudo-classes++-- | :first-child+firstChild :: PseudoVal+firstChild = ident "first-child"++-- | :link +link :: PseudoVal+link = ident "link"++-- | :visited+visited :: PseudoVal+visited = ident "visited"++-- | :hover+hover :: PseudoVal+hover = ident "hover"++-- | :active+active :: PseudoVal+active = ident "active"++-- | :focus+focus :: PseudoVal+focus = ident "focus"++-- | :lang +lang :: Expr -> PseudoVal+lang = PFunc . fun (ident "lang")++-- pseudo-elements++-- | :first-line+firstLine :: PseudoVal+firstLine = ident "first-line"++-- | :first-letter +firstLetter :: PseudoVal+firstLetter = ident "first-letter"++-- | :before +before :: PseudoVal+before = ident "before"++-- | :after +after :: PseudoVal+after = ident "after"+
+ src/Language/Css/Build/Tags.hs view
@@ -0,0 +1,617 @@+-- | Html 4 ++ Html 5 tags+module Language.Css.Build.Tags (+ a,+ abbr,+ address,+ area,+ article,+ aside,+ audio,+ b,+ base,+ bb,+ bdo,+ blockquote,+ body,+ br,+ button,+ canvas,+ caption,+ cite,+ code,+ col,+ colgroup,+ command,+ datagrid,+ datalist,+ dd,+ del,+ details,+ dfn,+ div,+ dl,+ dt,+ em,+ embed,+ eventsource,+ fieldset,+ figcaption,+ figure,+ footer,+ form,+ h1,+ h2,+ h3,+ h4,+ h5,+ h6,+ head,+ header,+ hgroup,+ hr,+ html,+ i,+ iframe,+ img,+ input,+ ins,+ kbd,+ keygen,+ label,+ legend,+ li,+ link,+ mark,+ map,+ menu,+ meta,+ meter,+ nav,+ noscript,+ object,+ ol,+ optgroup,+ option,+ output,+ p,+ param,+ pre,+ progress,+ q,+ ruby,+ rp,+ rt,+ samp,+ script,+ section,+ select,+ small,+ source,+ span,+ strong,+ style,+ sub,+ summary,+ sup,+ table,+ tbody,+ td,+ textarea,+ tfoot,+ th,+ thead,+ time,+ title,+ tr,+ ul,+ var,+ video,+ wbr,+ acronym,+ applet,+ basefont,+ big,+ center,+ dir,+ font,+ frame,+ frameset,+ isindex,+ noframes,+ s,+ strike,+ tt,+ u+) where++import Language.Css.Build(ident, Sel')+import Prelude hiding (div, span, map, head)+++-- | @a@ tag+a :: Sel'+a = ident "a"++-- | @abbr@ tag+abbr :: Sel'+abbr = ident "abbr"++-- | @address@ tag+address :: Sel'+address = ident "address"++-- | @area@ tag+area :: Sel'+area = ident "area"++-- | @article@ tag+article :: Sel'+article = ident "article"++-- | @aside@ tag+aside :: Sel'+aside = ident "aside"++-- | @audio@ tag+audio :: Sel'+audio = ident "audio"++-- | @b@ tag+b :: Sel'+b = ident "b"++-- | @base@ tag+base :: Sel'+base = ident "base"++-- | @bb@ tag+bb :: Sel'+bb = ident "bb"++-- | @bdo@ tag+bdo :: Sel'+bdo = ident "bdo"++-- | @blockquote@ tag+blockquote :: Sel'+blockquote = ident "blockquote"++-- | @body@ tag+body :: Sel'+body = ident "body"++-- | @br@ tag+br :: Sel'+br = ident "br"++-- | @button@ tag+button :: Sel'+button = ident "button"++-- | @canvas@ tag+canvas :: Sel'+canvas = ident "canvas"++-- | @caption@ tag+caption :: Sel'+caption = ident "caption"++-- | @cite@ tag+cite :: Sel'+cite = ident "cite"++-- | @code@ tag+code :: Sel'+code = ident "code"++-- | @col@ tag+col :: Sel'+col = ident "col"++-- | @colgroup@ tag+colgroup :: Sel'+colgroup = ident "colgroup"++-- | @command@ tag+command :: Sel'+command = ident "command"++-- | @datagrid@ tag+datagrid :: Sel'+datagrid = ident "datagrid"++-- | @datalist@ tag+datalist :: Sel'+datalist = ident "datalist"++-- | @dd@ tag+dd :: Sel'+dd = ident "dd"++-- | @del@ tag+del :: Sel'+del = ident "del"++-- | @details@ tag+details :: Sel'+details = ident "details"++-- | @dfn@ tag+dfn :: Sel'+dfn = ident "dfn"++-- | @div@ tag+div :: Sel'+div = ident "div"++-- | @dl@ tag+dl :: Sel'+dl = ident "dl"++-- | @dt@ tag+dt :: Sel'+dt = ident "dt"++-- | @em@ tag+em :: Sel'+em = ident "em"++-- | @embed@ tag+embed :: Sel'+embed = ident "embed"++-- | @eventsource@ tag+eventsource :: Sel'+eventsource = ident "eventsource"++-- | @fieldset@ tag+fieldset :: Sel'+fieldset = ident "fieldset"++-- | @figcaption@ tag+figcaption :: Sel'+figcaption = ident "figcaption"++-- | @figure@ tag+figure :: Sel'+figure = ident "figure"++-- | @footer@ tag+footer :: Sel'+footer = ident "footer"++-- | @form@ tag+form :: Sel'+form = ident "form"++-- | @h1@ tag+h1 :: Sel'+h1 = ident "h1"++-- | @h2@ tag+h2 :: Sel'+h2 = ident "h2"++-- | @h3@ tag+h3 :: Sel'+h3 = ident "h3"++-- | @h4@ tag+h4 :: Sel'+h4 = ident "h4"++-- | @h5@ tag+h5 :: Sel'+h5 = ident "h5"++-- | @h6@ tag+h6 :: Sel'+h6 = ident "h6"++-- | @head@ tag+head :: Sel'+head = ident "head"++-- | @header@ tag+header :: Sel'+header = ident "header"++-- | @hgroup@ tag+hgroup :: Sel'+hgroup = ident "hgroup"++-- | @hr@ tag+hr :: Sel'+hr = ident "hr"++-- | @html@ tag+html :: Sel'+html = ident "html"++-- | @i@ tag+i :: Sel'+i = ident "i"++-- | @iframe@ tag+iframe :: Sel'+iframe = ident "iframe"++-- | @img@ tag+img :: Sel'+img = ident "img"++-- | @input@ tag+input :: Sel'+input = ident "input"++-- | @ins@ tag+ins :: Sel'+ins = ident "ins"++-- | @kbd@ tag+kbd :: Sel'+kbd = ident "kbd"++-- | @keygen@ tag+keygen :: Sel'+keygen = ident "keygen"++-- | @label@ tag+label :: Sel'+label = ident "label"++-- | @legend@ tag+legend :: Sel'+legend = ident "legend"++-- | @li@ tag+li :: Sel'+li = ident "li"++-- | @link@ tag+link :: Sel'+link = ident "link"++-- | @mark@ tag+mark :: Sel'+mark = ident "mark"++-- | @map@ tag+map :: Sel'+map = ident "map"++-- | @menu@ tag+menu :: Sel'+menu = ident "menu"++-- | @meta@ tag+meta :: Sel'+meta = ident "meta"++-- | @meter@ tag+meter :: Sel'+meter = ident "meter"++-- | @nav@ tag+nav :: Sel'+nav = ident "nav"++-- | @noscript@ tag+noscript :: Sel'+noscript = ident "noscript"++-- | @object@ tag+object :: Sel'+object = ident "object"++-- | @ol@ tag+ol :: Sel'+ol = ident "ol"++-- | @optgroup@ tag+optgroup :: Sel'+optgroup = ident "optgroup"++-- | @option@ tag+option :: Sel'+option = ident "option"++-- | @output@ tag+output :: Sel'+output = ident "output"++-- | @p@ tag+p :: Sel'+p = ident "p"++-- | @param@ tag+param :: Sel'+param = ident "param"++-- | @pre@ tag+pre :: Sel'+pre = ident "pre"++-- | @progress@ tag+progress :: Sel'+progress = ident "progress"++-- | @q@ tag+q :: Sel'+q = ident "q"++-- | @ruby@ tag+ruby :: Sel'+ruby = ident "ruby"++-- | @rp@ tag+rp :: Sel'+rp = ident "rp"++-- | @rt@ tag+rt :: Sel'+rt = ident "rt"++-- | @samp@ tag+samp :: Sel'+samp = ident "samp"++-- | @script@ tag+script :: Sel'+script = ident "script"++-- | @section@ tag+section :: Sel'+section = ident "section"++-- | @select@ tag+select :: Sel'+select = ident "select"++-- | @small@ tag+small :: Sel'+small = ident "small"++-- | @source@ tag+source :: Sel'+source = ident "source"++-- | @span@ tag+span :: Sel'+span = ident "span"++-- | @strong@ tag+strong :: Sel'+strong = ident "strong"++-- | @style@ tag+style :: Sel'+style = ident "style"++-- | @sub@ tag+sub :: Sel'+sub = ident "sub"++-- | @summary@ tag+summary :: Sel'+summary = ident "summary"++-- | @sup@ tag+sup :: Sel'+sup = ident "sup"++-- | @table@ tag+table :: Sel'+table = ident "table"++-- | @tbody@ tag+tbody :: Sel'+tbody = ident "tbody"++-- | @td@ tag+td :: Sel'+td = ident "td"++-- | @textarea@ tag+textarea :: Sel'+textarea = ident "textarea"++-- | @tfoot@ tag+tfoot :: Sel'+tfoot = ident "tfoot"++-- | @th@ tag+th :: Sel'+th = ident "th"++-- | @thead@ tag+thead :: Sel'+thead = ident "thead"++-- | @time@ tag+time :: Sel'+time = ident "time"++-- | @title@ tag+title :: Sel'+title = ident "title"++-- | @tr@ tag+tr :: Sel'+tr = ident "tr"++-- | @ul@ tag+ul :: Sel'+ul = ident "ul"++-- | @var@ tag+var :: Sel'+var = ident "var"++-- | @video@ tag+video :: Sel'+video = ident "video"++-- | @wbr@ tag+wbr :: Sel'+wbr = ident "wbr"++-- | @acronym@ tag+acronym :: Sel'+acronym = ident "acronym"++-- | @applet@ tag+applet :: Sel'+applet = ident "applet"++-- | @basefont@ tag+basefont :: Sel'+basefont = ident "basefont"++-- | @big@ tag+big :: Sel'+big = ident "big"++-- | @center@ tag+center :: Sel'+center = ident "center"++-- | @dir@ tag+dir :: Sel'+dir = ident "dir"++-- | @font@ tag+font :: Sel'+font = ident "font"++-- | @frame@ tag+frame :: Sel'+frame = ident "frame"++-- | @frameset@ tag+frameset :: Sel'+frameset = ident "frameset"++-- | @isindex@ tag+isindex :: Sel'+isindex = ident "isindex"++-- | @noframes@ tag+noframes :: Sel'+noframes = ident "noframes"++-- | @s@ tag+s :: Sel'+s = ident "s"++-- | @strike@ tag+strike :: Sel'+strike = ident "strike"++-- | @tt@ tag+tt :: Sel'+tt = ident "tt"++-- | @u@ tag+u :: Sel'+u = ident "u"
+ src/Language/Css/Syntax.hs view
@@ -0,0 +1,488 @@++-- | 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>+module Language.Css.Syntax (+ -- * Stylesheet+ StyleSheet(..), StyleBody(..),++ -- * AtRule+ AtCharSet(..), + AtImport(..), ImportHead(..),+ AtMedia(..), + AtPage(..), PseudoPage,+ AtFontFace(..),+ + -- * RuleSet+ RuleSet(..), Decl(..), Prop, Prio(..), Expr(..),+ + -- * Selectors+ Sel(..), SimpleSel(..), SubSel(..),+ Element, Attr(..), Class, Id, AttrIdent, AttrVal, PseudoVal(..),++ -- * Values+ Value(..), + + -- * Primitives+ Ident(..), Func(..), + + Deg(..), + Rad(..),+ Grad(..),+ Color(..),+ Hz(..),+ KHz(..),+ Em(..),+ Ex(..),+ Px(..),+ In(..),+ Cm(..),+ Mm(..),+ Pc(..),+ Pt(..),+ Percentage(..),+ Ms(..),+ S(..),+ Uri(..)++ ) where+++import Text.PrettyPrint++data Ident = Ident String+ deriving (Eq)++--------------------------------------------------------+-- Stylesheet++data StyleSheet = StyleSheet (Maybe AtCharSet) [AtImport] [StyleBody]+ deriving (Eq)++data StyleBody = SRuleSet RuleSet + | SAtMedia AtMedia + | SAtPage AtPage+ | SAtFontFace AtFontFace+ deriving (Eq)++---------------------------------------------------------+-- AtRules++-- | \@charset+data AtCharSet = AtCharSet String+ deriving (Eq)++-- | \@import+data AtImport = AtImport ImportHead [Ident]+ deriving (Eq)++data ImportHead = IStr String | IUri Uri+ deriving (Eq)++-- | \@media+data AtMedia = AtMedia [Ident] [RuleSet]+ deriving (Eq)++-- | \@page+data AtPage = AtPage (Maybe Ident) (Maybe PseudoPage) [Decl]+ deriving (Eq)++type PseudoPage = Ident++-- | \@font-face+data AtFontFace = AtFontFace [Decl]+ deriving (Eq)++---------------------------------------------------------+-- Rules++data RuleSet = RuleSet [Sel] [Decl]+ deriving (Eq)++-- | Declaration+data Decl = Decl (Maybe Prio) Prop Expr+ deriving (Eq)+-- | Property+type Prop = Ident++-- | sets @!important@ declaration+data Prio = Important+ deriving (Eq)++---------------------------------------------------------+-- Selectors++-- | Selector+data Sel = SSel SimpleSel -- ^ single selector + | DescendSel Sel Sel -- ^ ' '+ | ChildSel Sel Sel -- ^ \'>\'+ | AdjSel Sel Sel -- ^ \'+\'+ deriving (Eq)++-- | Simple selector+data SimpleSel = UnivSel [SubSel] -- ^ Universal selector+ | TypeSel Element [SubSel] -- ^ Type selector+ deriving (Eq)+++data SubSel = AttrSel Attr -- ^ attribute selector+ | ClassSel Class -- ^ \'.\'+ | IdSel Id -- ^ \'#\'+ | PseudoSel PseudoVal -- ^ pseudo classes/elements+ deriving (Eq)++-- | attribute selector+data Attr = Attr AttrIdent + | AttrIs AttrIdent AttrVal -- ^ \'=\'+ | AttrIncl AttrIdent AttrVal -- ^ \'~=\'+ | AttrBegins AttrIdent AttrVal -- ^ \'|=\'+ deriving (Eq)++type Element = String+type Class = String+type Id = String+ +type AttrIdent = String+type AttrVal = String++data PseudoVal = PIdent Ident+ | PFunc Func+ deriving (Eq)++-------------------------------------------------------------------+-- Values++data Expr = EVal Value -- ^ single value+ | SlashSep Expr Expr -- ^ slash separated expressions+ | CommaSep Expr Expr -- ^ comma separated expressions+ | SpaceSep Expr Expr -- ^ space separated expressions+ deriving (Eq)++data Value = 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+ deriving (Eq)++data Func = Func Ident Expr+ deriving (Eq)++-- | \<angle\>+data Deg = Deg Double+ deriving (Eq)++-- | \<angle\>+data Rad = Rad Double+ deriving (Eq)++-- | \<angle\>+data Grad = Grad Double+ deriving (Eq)++-- | \<color\>+data Color = Cword String | + Crgb Int Int Int+ deriving (Eq)++-- | \<frequency\>+data Hz = Hz Double+ deriving (Eq)++-- | \<frequency\>+data KHz = KHz Double+ deriving (Eq)++-- | \<length\>+data Em = Em Double+ deriving (Eq)++-- | \<length\>+data Ex = Ex Double+ deriving (Eq)++-- | \<length\>+data Px = Px Int+ deriving (Eq)++-- | \<length\>+data In = In Double+ deriving (Eq)++-- | \<length\>+data Cm = Cm Double+ deriving (Eq)++-- | \<length\>+data Mm = Mm Double+ deriving (Eq)++-- | \<length\>+data Pc = Pc Double+ deriving (Eq)++-- | \<length\>+data Pt = Pt Int+ deriving (Eq)++-- | \<percentage\>+data Percentage = Percentage Double+ deriving (Eq)++-- | \<time\>+data Ms = Ms Double+ deriving (Eq)++-- | \<time\>+data S = S Double+ deriving (Eq)++-- | \<uri\>+data Uri = Uri String+ deriving (Eq)++-------------------------------------------------+-- Show instances++ppMaybe :: Show a => Maybe a -> Doc+ppMaybe = maybe empty (text . show)++punctuateShows :: Show a => Doc -> [a] -> Doc+punctuateShows sep = hcat . punctuate sep . map (text . show)++vsep = vcat . punctuate (text "\n")++-- StyleSheet++instance Show StyleSheet where+ show (StyleSheet ch imp body) = show $ + ppMaybe ch + $$ (vsep $ map (text . show) imp)+ $$ (vsep $ map (text . show) body)++instance Show StyleBody where+ show x = case x of+ SRuleSet x -> show x+ SAtMedia x -> show x+ SAtPage x -> show x+ SAtFontFace x -> show x+ +-- AtRules++-- @charset+instance Show AtCharSet where+ show (AtCharSet str) = "@charset " ++ str ++ " ;"++-- @import+instance Show AtImport where+ show (AtImport head ms) =+ show $ text "@import" <+> (text $ show head) <+>+ punctuateShows comma ms <+> semi++instance Show ImportHead where+ show x = case x of+ IStr x -> x+ IUri x -> show x+-- @page+instance Show AtPage where+ show (AtPage id pp ds) = show $ text "@page" + <+> ppMaybe id <+> ppMaybe pp + <+> (braces $ punctuateShows semi ds)+++-- @media+instance Show AtMedia where+ show (AtMedia ms rs) = show $ text "@media" + <+> punctuateShows comma ms+ <+> punctuateShows comma rs+ ++-- @font-face+instance Show AtFontFace where+ show (AtFontFace ds) = show $ text "@font-face" + <+> (braces $ punctuateShows semi ds)++-- RuleSets++instance Show RuleSet where+ show (RuleSet sels decls) = show $ (vcat $ punctuate comma $ map (text . show) sels)+ <+> lbrace + $$ (nest 4 $ vcat $ punctuate semi $ map (text . show)decls) + <+> rbrace++-- Declarations++instance Show Decl where+ show (Decl prio p v) = + case prio of+ Just x -> decl ++ " " ++ show x+ Nothing -> decl + where decl = show p ++ " : " ++ show v++instance Show Prio where+ show = const "!important"++-- Selectors++instance Show Sel where+ show x = case x of+ SSel x -> show x+ DescendSel x xs -> show x ++ " " ++ show xs+ ChildSel x xs -> show x ++ " > " ++ show xs+ AdjSel x xs -> show x ++ " + " ++ show xs++instance Show SimpleSel where+ show x = case x of + UnivSel xs -> "*" ++ showSubs xs+ TypeSel el xs -> el ++ showSubs xs++showSubs :: [SubSel] -> String+showSubs = show . hcat . map (text . show)+++instance Show PseudoVal where+ show x = case x of + PIdent a -> show a+ PFunc a -> show a++instance Show SubSel where+ show x = case x of+ AttrSel a -> show $ brackets $ text $ show a+ ClassSel v -> "." ++ v+ IdSel v -> "#" ++ v+ PseudoSel v -> ":" ++ show v++instance Show Attr where+ show x = case x of+ Attr a -> show $ text a+ AttrIs a v -> show $ text a <> equals <> (doubleQuotes $ text v)+ AttrIncl a v -> show $ text a <> text "~=" <> (doubleQuotes $ text v)+ AttrBegins a v -> show $ text a <> text "|=" <> (doubleQuotes $ text v)+ +++-- Values++instance Show Expr where+ show x = case x of+ EVal x -> show x+ SlashSep x e -> show x ++ " / " ++ show e+ CommaSep x e -> show x ++ " , " ++ show e+ SpaceSep x e -> show x ++ " " ++ show e++instance Show Func where+ show (Func name arg) = show $ text (show name) <+> parens (text $ show arg)+++instance Show Ident where+ show (Ident a) = a++-- Measure Units+++-- Value++instance Show Value where+ show x = case x of+ VDeg a -> show a+ VRad a -> show a+ VGrad a -> show a+ VColor a -> show a+ VHz a -> show a+ VKHz a -> show a+ VFunc a -> show a+ VIdent a -> show a+ VInt a -> show a+ VEm a -> show a+ VEx a -> show a+ VPx a -> show a+ VIn a -> show a+ VCm a -> show a+ VMm a -> show a+ VPc a -> show a+ VPt a -> show a+ VDouble a -> show a+ VPercentage a -> show a+ VString a -> show a+ VMs a -> show a+ VS a -> show a+ VUri a -> show a++-- Value elems++instance Show Deg where+ show (Deg x) = show x ++ "deg"++instance Show Rad where+ show (Rad x) = show x ++ "rad"++instance Show Grad where+ show (Grad x) = show x ++ "grad"++instance Show Color where+ show x = case x of { Cword a -> a ; + Crgb r g b -> show $ (text "rgb" <> ) $ parens $ hsep $ punctuate comma $ map (text. show) [r, g, b]}++instance Show Hz where+ show (Hz x) = show x ++ "Hz"++instance Show KHz where+ show (KHz x) = show x ++ "kHz"++instance Show Em where+ show (Em x) = show x ++ "em"++instance Show Ex where+ show (Ex x) = show x ++ "ex"++instance Show Px where+ show (Px x) = show x ++ "px"++instance Show In where+ show (In x) = show x ++ "in"++instance Show Cm where+ show (Cm x) = show x ++ "cm"++instance Show Mm where+ show (Mm x) = show x ++ "mm"++instance Show Pc where+ show (Pc x) = show x ++ "pc"++instance Show Pt where+ show (Pt x) = show x ++ "pt"++instance Show Percentage where+ show (Percentage x) = show x ++ "%"++instance Show Ms where+ show (Ms x) = show x ++ "ms"++instance Show S where+ show (S x) = show x ++ "s"++instance Show Uri where+ show (Uri x) = "url(" ++ show x ++ ")"++