Skip to content

Commit ff87864

Browse files
authored
Merge pull request #350 from westonruter/fix/turns-unit
Thanks!
2 parents 0309c90 + e104c81 commit ff87864

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Value/Size.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class Size extends PrimitiveValue
2424
/**
2525
* @var array<int, string>
2626
*/
27-
const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turns', 'Hz', 'kHz'];
27+
const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz'];
2828

2929
/**
3030
* @var array<int, array<string, string>>|null

tests/ParserTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public function manipulation()
360360
self::assertSame(
361361
'#header {margin: 10px 2em 1cm 2%;font-family: Verdana,Helvetica,"Gill Sans",sans-serif;'
362362
. 'font-size: 10px;color: red !important;background-color: green;'
363-
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;}
363+
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;transform: rotate(1turn);}
364364
body {color: green;font: 75% "Lucida Grande","Trebuchet MS",Verdana,sans-serif;}',
365365
$oDoc->render()
366366
);
@@ -369,15 +369,15 @@ public function manipulation()
369369
}
370370
self::assertSame(
371371
'#header {margin: 10px 2em 1cm 2%;color: red !important;background-color: green;'
372-
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;}
372+
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;transform: rotate(1turn);}
373373
body {color: green;}',
374374
$oDoc->render()
375375
);
376376
foreach ($oDoc->getAllRuleSets() as $oRuleSet) {
377377
$oRuleSet->removeRule('background-');
378378
}
379379
self::assertSame(
380-
'#header {margin: 10px 2em 1cm 2%;color: red !important;frequency: 30Hz;}
380+
'#header {margin: 10px 2em 1cm 2%;color: red !important;frequency: 30Hz;transform: rotate(1turn);}
381381
body {color: green;}',
382382
$oDoc->render()
383383
);

tests/fixtures/values.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
background-color: green;
77
background-color: rgba(0,128,0,0.7);
88
frequency: 30Hz;
9+
transform: rotate(1turn);
910
}
1011

1112
body {

0 commit comments

Comments
 (0)