Skip to content

Commit 607e65b

Browse files
committed
Fix bug preventing non 'size' numeric values from being parsed correctly
e.g. 10ms was being parsed as Size:10 String:ms, not Size:10ms
1 parent fbf0724 commit 607e65b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sabberworm/CSS/Parser.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,9 @@ private function parseNumericValue($bForColor = false) {
389389
$sUnit = null;
390390
$units = array(
391391
'%', 'em', 'ex', 'px', 'deg', 's', 'cm', 'pt', 'in', 'pc', 'cm',
392-
'mm'
392+
'mm',
393+
// These are non "size" values, but they are still numeric
394+
'deg', 'grad', 'rad', 'turns', 's', 'ms', 'Hz', 'kHz'
393395
);
394396

395397
foreach ($units as $val) {

0 commit comments

Comments
 (0)