Skip to content

@media query with interpolant renders incorrectly #803

Closed
@xzyfer

Description

@xzyfer

A regression was introduced in #800 which causes @media #{foo} to render incorrect if $foo was a media query list.

$query-string: "(min-width: 0) and (max-width: 599px),  (min-width: 600px) and (max-width: 899px)";
@media #{$query-string} {
  .foo {
    content: bar;
  }
}

expected

@media (min-width: 0) and (max-width: 599px), (min-width: 600px) and (max-width: 899px) {
  foo {
    bar: baz; } }

actual

@media (min-width: 0) and (max-width: 599px) {
  foo {
    bar: baz; } }

Specs added sass/sass-spec#223.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions