Skip to content

Commit eb30fe9

Browse files
authored
Merge pull request #3272 from matthew-dean/revert-media-no-ops
Reverts operations not being performed in media queries
2 parents be048e7 + c66842f commit eb30fe9

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

lib/less/parser/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1645,7 +1645,7 @@ var Parser = function Parser(context, imports, fileInfo) {
16451645
nodes.push(e);
16461646
} else if (parserInput.$char('(')) {
16471647
p = this.property();
1648-
e = this.permissiveValue(')');
1648+
e = this.value();
16491649
if (parserInput.$char(')')) {
16501650
if (p && e) {
16511651
nodes.push(new(tree.Paren)(new(tree.Declaration)(p, e, null, null, parserInput.i, fileInfo, true)));

test/css/media.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ body {
216216
var: all-and-tv;
217217
}
218218
}
219-
@media screen and (min-width: (60px + 1)) {
219+
@media screen and (min-width: 61px) {
220220
.selector {
221221
foo: bar;
222222
}

test/less/media.less

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@ratio_large: 16;
2424
@ratio_small: 9;
2525

26-
@media all and (device-aspect-ratio: @ratio_large / @ratio_small) {
26+
@media all and (device-aspect-ratio: ~'@{ratio_large} / @{ratio_small}') {
2727
body { max-width: 800px; }
2828
}
2929

@@ -233,7 +233,6 @@ body {
233233
}
234234
}
235235

236-
// Change in behavior of media queries in 3.5+ - inline expressions not eval'd
237236
@some-var: 60px;
238237
@media screen and (min-width: (@some-var + 1)) {
239238
.selector {

0 commit comments

Comments
 (0)