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

📝 Comments in grid-template moves (CSS) #4026

Open
1 task done
yoavbls opened this issue Sep 21, 2024 · 0 comments
Open
1 task done

📝 Comments in grid-template moves (CSS) #4026

yoavbls opened this issue Sep 21, 2024 · 0 comments
Labels
A-Formatter Area: formatter L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug

Comments

@yoavbls
Copy link

yoavbls commented Sep 21, 2024

The comments after the auto value in grid-template-columns moves to the start of the line:

.div {
  grid-template-columns:
    1fr /* first comment */
    auto /* second comment */
    2fr /* third comment */  
}

become:

.div {
  grid-template-columns:
     1fr /* first comment */
     /* second comment */ auto
     2fr; /* third comment */
}

It doesn't happen with Prettier and we want these comments to be on the end of the line.
Thank you!

Environment information

CLI:
  Version:                      1.9.2
  Color support:                true

Platform:
  CPU Architecture:             aarch64
  OS:                           macos

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         "xterm-256color"
  JS_RUNTIME_VERSION:           "v20.10.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "yarn/4.5.0"

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

Formatter:
  Format with errors:           false
  Indent style:                 Space
  Indent width:                 2
  Line ending:                  Lf
  Line width:                   80
  Attribute position:           Auto
  Bracket spacing:              BracketSpacing(true)
  Ignore:                       []
  Include:                      []

JavaScript Formatter:
  Enabled:                      false
  JSX quote style:              Double
  Quote properties:             AsNeeded
  Trailing commas:              Es5
  Semicolons:                   Always
  Arrow parentheses:            AsNeeded
  Bracket spacing:              BracketSpacing(true)
  Bracket same line:            false
  Quote style:                  Single
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Attribute position:           Auto

JSON Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Trailing Commas:              unset

CSS Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Quote style:                  Single

GraphQL Formatter:
  Enabled:                      true
  Indent style:                 unset
  Indent width:                 unset
  Line ending:                  unset
  Line width:                   unset
  Bracket spacing:              unset
  Quote style:                  unset

Workspace:
  Open Documents:               0

Configuration

{
  "css": {
    "linter": {
      "enabled": false
    },
    "formatter": {
      "enabled": true,
      "quoteStyle": "single"
    },
    "parser": {
      "cssModules": true,
      "allowWrongLineComments": true
    }
  }
}

Playground link

https://biomejs.dev/playground/?files.main.css=LgBkAGkAdgAgAHsACgAgACAAZwByAGkAZAAtAHQAZQBtAHAAbABhAHQAZQAtAGMAbwBsAHUAbQBuAHMAOgAKACAAIAAgACAAMQBmAHIAIAAvACoAIABmAGkAcgBzAHQAIABjAG8AbQBtAGUAbgB0ACAAKgAvAAoAIAAgACAAIABhAHUAdABvACAALwAqACAAcwBlAGMAbwBuAGQAIABjAG8AbQBtAGUAbgB0ACAAKgAvAAoAIAAgACAAIAAyAGYAcgAgAC8AKgAgAHQAaABpAHIAZAAgAGMAbwBtAG0AZQBuAHQAIAAqAC8AIAAgAAoAfQAKAAoAIAAgAA%3D%3D

Code of Conduct

  • I agree to follow Biome's Code of Conduct
@dyc3 dyc3 added A-Formatter Area: formatter L-CSS Language: CSS S-Bug-confirmed Status: report has been confirmed as a valid bug labels Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Formatter Area: formatter 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

2 participants