Skip to content

Bug: Incorrect Transformation of Range Context Media Queries (Negation Error) #1105

@Lookwe69

Description

@Lookwe69

When using the Range Context media query syntax for expressing an "exclusive upper bound" combined with an "inclusive lower bound" (e.g., (width < 768px) and (width >= 600px)), Lighting CSS transforms the output into an incorrect standard logical expression.

The resulting standard media query expression is not logically equivalent to the input.

Input Media Query

@media (width < 768px) and (width >= 600px) {
  /* ... styles ... */
}

Observed Output (Incorrect)

@media not (min-width: 768px) and (min-width: 600px) {
  /* ... styles ... */
}

Expected Output (Correct)

@media (max-width: 767px) and (min-width: 600px) {
  /* ... styles ... */
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions