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

"vscode.css-language-features" indentation decreases by one level starting from the next line #238101

Closed
stimlocy opened this issue Jan 17, 2025 · 1 comment
Assignees

Comments

@stimlocy
Copy link

Type: Bug

Sass Maps
https://sass-lang.com/documentation/values/maps/

When using sass map in "vscode.css-language-features", the indentation decreases by one level starting from the next line.

Before formatting

main {
  $colors: (
    "foo": red,
    "bar": blue,
  );

      @each $key, $value in $colors {
        p.type_#{$key} { color: $value; }
      }

  .hoge {text-align: right;}
}

Expected behavior

main {
  $colors: (
    "foo": red,
    "bar": blue,
  );

  @each $key, $value in $colors {
    p.type_#{$key} {
      color: $value;
    }
  }

  .hoge {
    text-align: right;
  }
}

Actual behavior

main {
  $colors: (
    "foo": red,
    "bar": blue,
  );

@each $key, $value in $colors {
  p.type_#{$key} {
    color: $value;
  }
}

.hoge {
  text-align: right;
}
}

vscode settings

  "[scss]": {
    "editor.defaultFormatter": "vscode.css-language-features",
    "editor.formatOnSave": true
  },
  "css.format.spaceAroundSelectorSeparator": true,
  "scss.format.newlineBetweenRules": false,
  "scss.format.spaceAroundSelectorSeparator": true,

VS Code version: Code 1.96.4 (Universal) (cd4ee3b, 2025-01-16T00:16:19.038Z)
OS version: Darwin arm64 23.6.0
Modes:

System Info
Item Value
CPUs Apple M2 (8 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 3, 2
Memory (System) 16.00GB (0.09GB free)
Process Argv --crash-reporter-id ae85a57b-458a-48d6-b56b-54e9fa06c07c
Screen Reader no
VM 0%
Extensions (15)
Extension Author (truncated) Version
vscode-erb-beautify ali 0.5.0
vscode-intelephense-client bme 1.12.6
gitlens eam 16.1.1
vscode-html-css ecm 2.0.12
prettier-vscode esb 11.0.0
vscode-ansi ili 1.1.7
endwise kai 1.5.1
git-graph mhu 1.30.0
vscode-docker ms- 1.29.3
vscode-language-pack-ja MS- 1.96.2024121109
remote-containers ms- 0.394.0
indent-rainbow ode 8.3.1
vscode-xml red 0.27.2
ruby-lsp Sho 0.8.18
vscode-icons vsc 12.10.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
2e7ec940:31000449
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
cf1a2727:31215809
6074i472:31201624
dwoutputs:31217127

@aeschli
Copy link
Contributor

aeschli commented Jan 17, 2025

We use beautifyjs as the underlying CSS formatter. Would you mind filing this request directly against https://github.com/beautify-web/js-beautify ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants