packages feed

shakespeare-css 1.0.1.2 → 1.0.1.3

raw patch · 3 files changed

+37/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Text/Lucius.hs view
@@ -28,9 +28,10 @@ import Data.Char (isSpace, toLower, toUpper) import Numeric (readHex) import Control.Applicative ((<$>))-import Control.Monad (when)+import Control.Monad (when, unless) import Data.Either (partitionEithers) import Data.Monoid (mconcat)+import Data.List (isSuffixOf)  -- | --@@ -172,7 +173,7 @@             ignore = many (whiteSpace1 <|> string' "<!--" <|> string' "-->")                         >> return ()         ignore-        tl <- ((charset <|> media <|> impor <|> var <|> fmap TopBlock parseBlock) >>= \x -> go (front . (:) x))+        tl <- ((charset <|> media <|> impor <|> topAtBlock <|> var <|> fmap TopBlock parseBlock) >>= \x -> go (front . (:) x))             <|> (return $ map compressTopLevel $ front [])         ignore         return tl@@ -204,6 +205,17 @@         _ <- char ';'         let trimS = reverse . dropWhile isSpace . reverse . dropWhile isSpace         return $ TopVar (trimS k) (trimS v)+    topAtBlock = do+        (name, selector) <- try $ do+            _ <- char '@'+            name <- many1 $ noneOf " \t"+            _ <- many1 $ oneOf " \t"+            unless ("keyframes" `isSuffixOf` name) $ fail "only accepting keyframes"+            selector <- parseContents "{"+            _ <- char '{'+            return (name, selector)+        b <- parseBlocks id+        return $ TopAtBlock name selector b     parseBlocks front = do         whiteSpace         (char '}' >> return (map compressBlock $ front []))
shakespeare-css.cabal view
@@ -1,5 +1,5 @@ name:            shakespeare-css-version:         1.0.1.2+version:         1.0.1.3 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>
test/ShakespeareCssTest.hs view
@@ -348,6 +348,28 @@         "@charset mycharset;" [lucius|
 @charset #{charset};
 |]
+  , it "keyframes" $ celper
+        "@keyframes mymove {from{top:0px}to{top:200px}}" [lucius|
+@keyframes mymove {
+    from {
+        top: 0px;
+    }
+    to {
+        top: 200px;
+    }
+}
+|]
+  , it "prefixed keyframes" $ celper
+        "@-webkit-keyframes mymove {from{top:0px}to{top:200px}}" [lucius|
+@-webkit-keyframes mymove {
+    from {
+        top: 0px;
+    }
+    to {
+        top: 200px;
+    }
+}
+|]
   ]
 
 data Url = Home | Sub SubUrl