Comparing version 1.0.0-alpha8 to 1.0.0-alpha9
@@ -0,1 +1,5 @@ | ||
## 1.0.0-alpha9 (December 21, 2016) | ||
- Fixed `<angle>` generic according to specs that allow a `<number>` equals to zero to be used as valid value (#30) | ||
## 1.0.0-alpha8 (November 11, 2016) | ||
@@ -2,0 +6,0 @@ |
@@ -1752,4 +1752,4 @@ 'use strict'; | ||
// fix soft deoptimizations (insufficient type feedback) | ||
parse('a.b#c:e:NOT(a)::g,* b >c+d~e/deep/f,100%{v:1 2em t a(2%, var(--a)) url(..) -foo-bar !important}'); | ||
// parse('a.b#c:e:NOT(a)::g,* b >c+d~e/deep/f,100%{v:1 2em t a(2%, var(--a)) url(..) -foo-bar !important}'); | ||
module.exports = parse; |
@@ -451,4 +451,4 @@ 'use strict'; | ||
// fix soft deoptimizations (insufficient type feedback) | ||
new Scanner('\n\r\r\n\f//""\'\'/*\r\n\f*/1a;.\\31\t\+2{url(a);+1.2e3 -.4e-5 .6e+7}'); | ||
// new Scanner('\n\r\r\n\f//""\'\'/*\r\n\f*/1a;.\\31\t\+2{url(a);+1.2e3 -.4e-5 .6e+7}'); | ||
module.exports = Scanner; |
@@ -100,6 +100,8 @@ var names = require('../utils/names.js'); | ||
function length(node) { | ||
return isCalc(node) || | ||
(node.data.type === 'Dimension' && LENGTH.hasOwnProperty(node.data.unit.toLowerCase())) || | ||
(node.data.type === 'Number' && Number(node.data.value) === 0); | ||
function zeroUnitlessDimension(type) { | ||
return function(node) { | ||
return isCalc(node) || | ||
(node.data.type === 'Dimension' && type.hasOwnProperty(node.data.unit.toLowerCase())) || | ||
(node.data.type === 'Number' && Number(node.data.value) === 0); | ||
}; | ||
} | ||
@@ -184,3 +186,3 @@ | ||
module.exports = { | ||
'angle': dimension(ANGLE), | ||
'angle': zeroUnitlessDimension(ANGLE), | ||
'attr()': attr, | ||
@@ -196,3 +198,3 @@ 'custom-ident': customIdent, | ||
'integer': integer, | ||
'length': length, | ||
'length': zeroUnitlessDimension(LENGTH), | ||
'number': number, | ||
@@ -199,0 +201,0 @@ 'number-zero-one': numberZeroOne, |
{ | ||
"name": "css-tree", | ||
"version": "1.0.0-alpha8", | ||
"version": "1.0.0-alpha9", | ||
"description": "Detailed CSS parser", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
526888
11991
0