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

🐛 CSS: media query range formatting #4076

Closed
1 task done
nstepien opened this issue Sep 25, 2024 · 2 comments
Closed
1 task done

🐛 CSS: media query range formatting #4076

nstepien opened this issue Sep 25, 2024 · 2 comments
Assignees
Labels
A-Formatter Area: formatter good first issue Good for newcomers L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@nstepien
Copy link
Contributor

Environment information

CLI:
  Version:                      1.9.2
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v22.9.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "npm/10.8.3"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    true
  VCS disabled:                 true

Workspace:
  Open Documents:               0

What happened?

https://biomejs.dev/playground/?lintRules=all&files.main.css=LgBjAGwAYQBzAHMAIAB7AAoACQBAAG0AZQBkAGkAYQAgACgAMQAwADIANABwAHgAIAA8AD0AIAB3AGkAZAB0AGgAIAA8AD0AIAAxADIAOAAwAHAAeAApACAAewAKAAkACQBjAG8AbABvAHIAOgAgAHIAZQBkADsACgAJAH0ACgB9AA%3D%3D

Expected result

Formatting should match prettier... is what I'd like to say, but prettier doesn't seem to format this well: if I remove any spaces in the range, prettier will not add spaces.
Biome instead adds spaces except after the last <=.
I'd expect 1024px <= width <= 1280px to not change formatting.
I'd expect 1024px<=width<=1280px to be formatted as 1024px <= width <= 1280px.

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@ematipico ematipico added good first issue Good for newcomers A-Formatter Area: formatter S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 25, 2024
@dyc3 dyc3 added the L-CSS Language: CSS label Sep 25, 2024
@blaze-d83
Copy link
Contributor

Hi @nstepien

I would like to resolve this issue. Could please assign it to me?

Thanks

@ematipico
Copy link
Member

Closed by #4083

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter good first issue Good for newcomers L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

4 participants