css-text-0.1.3.0: CSS parser and renderer.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.CSS.Parse

Description

Parse CSS with parseNestedBlocks and render it with renderNestedBlock

Synopsis

Documentation

data NestedBlock Source #

Constructors

NestedBlock Text [NestedBlock]

for example a media query

LeafBlock CssBlock 

Instances

Instances details
Show NestedBlock Source # 
Instance details

Defined in Text.CSS.Parse

Methods

showsPrec :: Int -> NestedBlock -> ShowS

show :: NestedBlock -> String

showList :: [NestedBlock] -> ShowS

Eq NestedBlock Source # 
Instance details

Defined in Text.CSS.Parse

Methods

(==) :: NestedBlock -> NestedBlock -> Bool

(/=) :: NestedBlock -> NestedBlock -> Bool

parseNestedBlocks :: Text -> Either String [NestedBlock] Source #

The preferred parser, will capture media queries

parseBlocks :: Text -> Either String [CssBlock] Source #

The original parser of basic CSS, but throws out media queries

parseBlock :: Text -> Either String CssBlock Source #

attrParser :: Parser (Text, Text) Source #

attrsParser :: Parser [(Text, Text)] Source #

blockParser :: Parser (Text, [(Text, Text)]) Source #

blocksParser :: Parser [(Text, [(Text, Text)])] Source #

parseAttr :: Text -> Either String (Text, Text) Source #

parseAttrs :: Text -> Either String [(Text, Text)] Source #