do not ignore strict-math:off in media-features

!breaking change, fixes #1480
This commit is contained in:
Max Mikhailov
2017-06-08 10:00:26 +03:00
parent 3f353a8bfd
commit faafd33b56
3 changed files with 4 additions and 15 deletions

View File

@@ -48,19 +48,8 @@ Media.prototype.eval = function (context) {
this.rules[0].debugInfo = this.debugInfo;
media.debugInfo = this.debugInfo;
}
var strictMathBypass = false;
if (!context.strictMath) {
strictMathBypass = true;
context.strictMath = true;
}
try {
media.features = this.features.eval(context);
}
finally {
if (strictMathBypass) {
context.strictMath = false;
}
}
media.features = this.features.eval(context);
context.mediaPath.push(media);
context.mediaBlocks.push(media);

View File

@@ -1,4 +1,4 @@
@media (-o-min-device-pixel-ratio: 2/1) {
@media (-o-min-device-pixel-ratio: 2) {
.test-math-and-units {
font: ignores 0/0 rules;
test-division: 7em;

View File

@@ -1,4 +1,4 @@
@media (-o-min-device-pixel-ratio: 2/1) {
@media (-o-min-device-pixel-ratio: 2) {
.test-math-and-units {
font: ignores 0/0 rules;
test-division: 4 / 2 + 5em;