Skip to content

Preserve empty lines in CSS/SCSS paren groups#12210

Merged
duailibe merged 3 commits intoprettier:mainfrom
duailibe:css-empty-line
Feb 2, 2022
Merged

Preserve empty lines in CSS/SCSS paren groups#12210
duailibe merged 3 commits intoprettier:mainfrom
duailibe:css-empty-line

Conversation

@duailibe
Copy link
Copy Markdown
Collaborator

@duailibe duailibe commented Feb 1, 2022

Description

Related to #12053, will improve the comment placement from the example in another PR

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

Copy link
Copy Markdown
Contributor

@sosukesuzuki sosukesuzuki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add tests for multi empty lines?

Prettier pr-12210
Playground link

--parser scss

Input:

$colours: (
    "text": $light-100,
    "background-primary": $dark-300,






    "background-secondary": $dark-200,
    "background-tertiary": $dark-100
);

Output:

$colours: (
  "text": $light-100,
  "background-primary": $dark-300,

  "background-secondary": $dark-200,
  "background-tertiary": $dark-100,
);

Comment thread changelog_unreleased/css/12210.md Outdated
Comment thread changelog_unreleased/css/12210.md Outdated
Comment thread changelog_unreleased/css/12210.md Outdated
@duailibe duailibe requested a review from sosukesuzuki February 2, 2022 02:39
@duailibe duailibe merged commit e22c491 into prettier:main Feb 2, 2022
@fisker fisker mentioned this pull request Mar 25, 2022
4 tasks
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants