mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
do not ignore strict-math:off in media-features
!breaking change, fixes #1480
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user