Skip to content

Commit 8b12ce2

Browse files
committed
Correctly parse from(#rrggbb)
Previously, this would yield from(rr,gg,bb). Now it gives from(rgb(rr,gg,bb))
1 parent ce4c6d0 commit 8b12ce2

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/Sabberworm/CSS/ParserTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,12 @@ function testNamespaces() {
260260
|test {gaga: 2;}' . "\n";
261261
$this->assertSame($sExpected, $oDoc->__toString());
262262
}
263+
264+
function testInnerColors() {
265+
$oDoc = $this->parsedStructureForFile('inner-color');
266+
$sExpected = 'test {background: -webkit-gradient(linear,0 0,0 bottom,from(rgb(0,108,173)),to(rgb(0,159,249)));}' . "\n";
267+
$this->assertSame($sExpected, $oDoc->__toString());
268+
}
263269

264270
function testPrefixedGradient() {
265271
$oDoc = $this->parsedStructureForFile('webkit');

tests/files/inner-color.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
test {
2+
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#006cad), to(#009ff9));
3+
}

0 commit comments

Comments
 (0)