Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiline selectors in media queries are indented incorrectly #1406

Closed
Kingju777 opened this issue Jul 20, 2021 · 2 comments · Fixed by #1814
Closed

Multiline selectors in media queries are indented incorrectly #1406

Kingju777 opened this issue Jul 20, 2021 · 2 comments · Fixed by #1814
Assignees
Labels
bug cosmetic Doesn't affects CSS semantics

Comments

@Kingju777
Copy link

If you put a Selector with more than one line in a ‘@media’ Query the space that is needed to mark the indentation is not put there.

CSS Result (formatting in front of the body element wrong)

@media screen {
  html,
body {
    height: 100%;
    width: 100%;
  }

Corrected Result (corrected by me)

@media screen {
  html,
  body {
    height: 100%;
    width: 100%;
  }

Problem in Javascript API

Original Ticket:
glenn2223/vscode-live-sass-compiler#106

@connorskees
Copy link
Contributor

can reproduce this on most recent version. likely due to indentation only being applied to the first line of a selector. this shouldn't affect the semantics of expanded output.

A bit smaller Sass input and CSS output comparison

@media screen {
  a,
  b {
    color: red;
  }
}
@media screen {
  a,
b {
    color: red;
  }
}

@nex3 nex3 added bug cosmetic Doesn't affects CSS semantics and removed enhancement labels Aug 4, 2021
@nex3
Copy link
Contributor

nex3 commented Jun 15, 2022

I've just confirmed that this is not unique to the JS API.

@nex3 nex3 changed the title Javascript API: Formatting Problem with multiline Selectors in media Querys Multiline selectors in media queries are indented incorrectly Jun 15, 2022
@Goodwine Goodwine self-assigned this Oct 24, 2022
Goodwine added a commit to sass/sass-spec that referenced this issue Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cosmetic Doesn't affects CSS semantics
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants