question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Input

The code looked like this before beautification:

$theme-colors: (
  primary: $blue,
  secondary: $gray-600,
  success: $green,
  info: $cyan,
  warning: $yellow,
  danger: $red,
  light: $gray-100,
  dark: $gray-800
) !default;

Expected Output

The above code is correctly indented. So it should stay the same.

Actual Output

The code actually looked like this after beautification:

$theme-colors: ( primary: $blue,
secondary: $gray-600,
success: $green,
info: $cyan,
warning: $yellow,
danger: $red,
light: $gray-100,
dark: $gray-800) !default;

Environment

OS: Windows

Settings

{
  "end_with_newline": true,
  "max_preserve_newlines": 2,
  "preserve_newlines": true,
  "js": {
    "indent_with_tabs": true,
    "indent_size": 4
  },
  "css": {
    "indent_size": 2,
    "newline_between_rules": true,
    "selector_separator_newline": true,
    "space_around_combinator": true
  },
  "html": {
    "indent_size": 2,
    "unformatted": [],
    "wrap_attributes": "force-aligned"
  }
}

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:5
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
intermediatechcommented, Apr 1, 2022

This issue was created on “25 Aug 2017” and is still not fixed yet. Why ??

2reactions
asphubcommented, Mar 31, 2022

This issue needs to addressed and fixed. VS Code leads me here to report the bug https://github.com/microsoft/vscode/issues/146351

This is the main reason for me to discontinue usage of beautifyjs for SCSS formatting and I am using SCSS formatter by Sibiraj. which is the best formatter for SCSS.

Name: SCSS Formatter Id: sibiraj-s.vscode-scss-formatter Description: A Visual Studio Code Extension to format SCSS Version: 2.4.1 Publisher: Sibiraj VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=sibiraj-s.vscode-scss-formatter

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maps - Sass
Maps in Sass are immutable, which means that the contents of a map value never changes. Sass's map functions all return new maps...
Read more >
Add a map data type to Sass · Issue #642 - GitHub
We're planning on adding support for maps of some sort, and they will interact with variable-length argument lists. However, I don't think we'll...
Read more >
Sass error with sass map Error: expected ";" - Stack Overflow
Using sass maps, I have the following code which I think is correct. However I get the error Deleted css/main.css. Error: expected ";"....
Read more >
sass-loader - webpack - JS.ORG
ℹ In some rare cases node-sass can output invalid source maps (it is a node-sass bug). In order to avoid this, you can...
Read more >
How to use maps in Sass, syntax, examples, and other good ...
Defining a map · Maps must always be surrounded by parenthesis. · They have to be comma separated. · Both, key and value,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found