Skip to content

Commit

Permalink
Merge pull request #350 from westonruter/fix/turns-unit
Browse files Browse the repository at this point in the history
Thanks!
  • Loading branch information
sabberworm authored Dec 28, 2021
2 parents 0309c90 + e104c81 commit ff87864
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Value/Size.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Size extends PrimitiveValue
/**
* @var array<int, string>
*/
const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turns', 'Hz', 'kHz'];
const NON_SIZE_UNITS = ['deg', 'grad', 'rad', 's', 'ms', 'turn', 'Hz', 'kHz'];

/**
* @var array<int, array<string, string>>|null
Expand Down
6 changes: 3 additions & 3 deletions tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ public function manipulation()
self::assertSame(
'#header {margin: 10px 2em 1cm 2%;font-family: Verdana,Helvetica,"Gill Sans",sans-serif;'
. 'font-size: 10px;color: red !important;background-color: green;'
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;}
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;transform: rotate(1turn);}
body {color: green;font: 75% "Lucida Grande","Trebuchet MS",Verdana,sans-serif;}',
$oDoc->render()
);
Expand All @@ -369,15 +369,15 @@ public function manipulation()
}
self::assertSame(
'#header {margin: 10px 2em 1cm 2%;color: red !important;background-color: green;'
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;}
. 'background-color: rgba(0,128,0,.7);frequency: 30Hz;transform: rotate(1turn);}
body {color: green;}',
$oDoc->render()
);
foreach ($oDoc->getAllRuleSets() as $oRuleSet) {
$oRuleSet->removeRule('background-');
}
self::assertSame(
'#header {margin: 10px 2em 1cm 2%;color: red !important;frequency: 30Hz;}
'#header {margin: 10px 2em 1cm 2%;color: red !important;frequency: 30Hz;transform: rotate(1turn);}
body {color: green;}',
$oDoc->render()
);
Expand Down
1 change: 1 addition & 0 deletions tests/fixtures/values.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
background-color: green;
background-color: rgba(0,128,0,0.7);
frequency: 30Hz;
transform: rotate(1turn);
}

body {
Expand Down

0 comments on commit ff87864

Please sign in to comment.