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): fix CSS formatter converts variable declarations and function calls to lowercase #3068 #3130

Merged
merged 2 commits into from
Jun 8, 2024

Conversation

denbezrukov
Copy link
Contributor

Summary

Fix #3068

We have several ways to prevent case changes while formatting:

  1. We use custom identifiers during parsing.
  2. We pass parameters to the identifier formatter to prevent parsing.

However, using custom identifiers in places where they aren't specified as part of the specification may not be ideal. So I avoid that places and pass a parameter for a formatter.

Test Plan

cargo test

@github-actions github-actions bot added A-Parser Area: parser A-Formatter Area: formatter L-CSS Language: CSS A-Changelog Area: changelog labels Jun 8, 2024
--preserved-casing: blue;
color: var(--Preserved-Casing);
--Preserved-Casing: blue;
color: VAR(--Preserved-Casing);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It might be a good rule to highlight incorrect cases for widely used functions.
cc @togami2864

@denbezrukov denbezrukov changed the title fix(css_formatter): CSS formatter converts variable declarations and function calls to lowercase #3068 fix(css_formatter): fix CSS formatter converts variable declarations and function calls to lowercase #3068 Jun 8, 2024
Copy link

codspeed-hq bot commented Jun 8, 2024

CodSpeed Performance Report

Merging #3130 will degrade performances by 6.71%

Comparing fit/case-sensitive (35f93bb) with main (2f4997b)

Summary

❌ 1 regressions
✅ 91 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main fit/case-sensitive Change
dojo.js[uncached] 8.9 ms 9.5 ms -6.71%

@denbezrukov denbezrukov merged commit 3e53475 into main Jun 8, 2024
15 of 16 checks passed
@denbezrukov denbezrukov deleted the fit/case-sensitive branch June 8, 2024 21:04
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 A-Parser Area: parser L-CSS Language: CSS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

📝 CSS formatter converts variable declarations and function calls to lowercase
2 participants