packages feed

css-text 0.1.2 → 0.1.2.0.1

raw patch · 3 files changed

+15/−12 lines, 3 files

Files

Text/CSS/Parse.hs view
@@ -1,15 +1,16 @@ {-# LANGUAGE OverloadedStrings #-}+-- | Parse CSS with parseNestedBlocks and render it with renderNestedBlock module Text.CSS.Parse-    ( attrParser+    ( NestedBlock(..)+    , parseNestedBlocks+    , parseBlocks+    , parseBlock+    , attrParser     , attrsParser     , blockParser     , blocksParser     , parseAttr     , parseAttrs-    , parseBlock-    , parseBlocks-    , parseNestedBlocks-    , NestedBlock(..)     ) where  import Prelude hiding (takeWhile, take)@@ -19,7 +20,7 @@ import Data.Char (isSpace)  type CssBlock = (Text, [(Text, Text)])-data NestedBlock = NestedBlock Text [NestedBlock]+data NestedBlock = NestedBlock Text [NestedBlock] -- ^ for example a media query                  | LeafBlock CssBlock                  deriving (Eq, Show) @@ -27,6 +28,7 @@ parseNestedBlocks :: Text -> Either String [NestedBlock] parseNestedBlocks = parseOnly nestedBlocksParser +-- | The original parser of basic CSS, but throws out media queries parseBlocks :: Text -> Either String [CssBlock] parseBlocks = parseOnly blocksParser 
Text/CSS/Render.hs view
@@ -1,10 +1,11 @@ {-# LANGUAGE OverloadedStrings #-}+-- | Prender CSS with renderNestedBlocks module Text.CSS.Render-    ( renderAttr-    , renderAttrs-    , renderBlock+    ( renderNestedBlocks     , renderBlocks-    , renderNestedBlocks+    , renderBlock+    , renderAttrs+    , renderAttr     ) where  import Data.Text (Text)
css-text.cabal view
@@ -1,9 +1,9 @@ name:            css-text-version:         0.1.2+version:         0.1.2.0.1 license:         BSD3 license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>-maintainer:      Michael Snoyman <michael@snoyman.com>+maintainer:      Michael Snoyman <michael@snoyman.com>, Greg Weber <greg@gregweber.info> synopsis:        CSS parser and renderer. category:        Web, Yesod stability:       Stable