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

fix(css_formatter): don't wrap selector identation after css comments #4614

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

fireairforce
Copy link
Contributor

@fireairforce fireairforce commented Nov 22, 2024

Summary

closes: #4575

I add special judge for the case like:

/* 1some medium long comment */
.line1 selector,
/* 2some medium long comment */
.line1 selector,
/* 3some medium long comment */
div selector {
  background: green;
}

if there was a selector, it contains comments before, it will don't be wrapped by the ident(So i add judge in this case to remove the ident for the selector).

Test Plan

I add test case.

@github-actions github-actions bot added A-Formatter Area: formatter L-CSS Language: CSS labels Nov 22, 2024
Copy link

codspeed-hq bot commented Nov 22, 2024

CodSpeed Performance Report

Merging #4614 will not alter performance

Comparing fireairforce:fix-4575 (aae5943) with main (4848994)

Summary

✅ 97 untouched benchmarks

@github-actions github-actions bot added the A-Changelog Area: changelog label Nov 24, 2024
@fireairforce fireairforce marked this pull request as ready for review November 24, 2024 16:12
@@ -1,7 +1,6 @@
---
source: crates/biome_formatter_test/src/snapshot_builder.rs
info: css/issue_3229.css
snapshot_kind: text
Copy link
Member

Choose a reason for hiding this comment

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

It seems your local version of cargo-insta is outdated. You can update it using just update-tools, or just cargo install cargo-insta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the reminder, I have updated it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Changelog Area: changelog A-Formatter Area: formatter L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Selector indentation after CSS comment wrap
2 participants