Permalink
Browse files

Correctly parse from(#rrggbb)

Previously, this would yield from(rr,gg,bb).
Now it gives from(rgb(rr,gg,bb))
  • Loading branch information...
1 parent ce4c6d0 commit 8b12ce258d8e5b238688e13524217638aaa9c2b0 @sabberworm committed Nov 13, 2012
Showing with 9 additions and 0 deletions.
  1. +6 −0 tests/Sabberworm/CSS/ParserTest.php
  2. +3 −0 tests/files/inner-color.css
@@ -260,6 +260,12 @@ function testNamespaces() {
|test {gaga: 2;}' . "\n";
$this->assertSame($sExpected, $oDoc->__toString());
}
+
+ function testInnerColors() {
+ $oDoc = $this->parsedStructureForFile('inner-color');
+ $sExpected = 'test {background: -webkit-gradient(linear,0 0,0 bottom,from(rgb(0,108,173)),to(rgb(0,159,249)));}' . "\n";
+ $this->assertSame($sExpected, $oDoc->__toString());
+ }
function testPrefixedGradient() {
$oDoc = $this->parsedStructureForFile('webkit');
@@ -0,0 +1,3 @@
+test {
+ background: -webkit-gradient(linear, 0 0, 0 bottom, from(#006cad), to(#009ff9));
+}

0 comments on commit 8b12ce2

Please sign in to comment.