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

SCSS module system @use problem #1798

Closed
mrahhal opened this issue May 16, 2020 · 3 comments
Closed

SCSS module system @use problem #1798

mrahhal opened this issue May 16, 2020 · 3 comments

Comments

@mrahhal
Copy link

mrahhal commented May 16, 2020

Description

When using the SCSS module system, you can configure namespacing using something like:

@use 'variables' as *;

Which is the equivalent of the following without the module system:

@import 'variables';

Input

The code looked like this before beautification:

@use 'variables' as *;

Expected Output

The code should have looked like this after beautification:

@use 'variables' as *;

Should stay the same.

Actual Output

The code actually looked like this after beautification:

@use 'variables'as *;

The space between the module name and "as" gets erased.

Environment

OS: Windows

Settings

{
  "end_with_newline": true,
  "max_preserve_newlines": 2,
  "preserve_newlines": true,
  "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"
  }
}
@mhnaeem
Copy link
Contributor

mhnaeem commented Apr 8, 2022

Possibly fixed by #2018

@bitwiseman
Copy link
Member

@mhnaeem
Submit a PR with tests showing it is if fixed.

mhnaeem added a commit to mhnaeem/js-beautify that referenced this issue Apr 8, 2022
@mhnaeem
Copy link
Contributor

mhnaeem commented Apr 8, 2022

@bitwiseman Done!

bitwiseman added a commit that referenced this issue Apr 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants