8000 fix(postcss-convert-values): preserve percent sign in percentage values in at-rules with double quotes by aramikuto · Pull Request #1695 · cssnano/cssnano · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(postcss-convert-values): preserve percent sign in percentage values in at-rules with double quotes #1695

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

Merged
merged 1 commit into from
May 6, 2025

Conversation

aramikuto
Copy link
Contributor

Fixes #1694

The shouldKeepZeroUnit check previously expected the syntax value <percentage> to be enclosed only in single quotes. However, in CSS, string values can also be surrounded by double quotes. I've added an additional check to handle both quote styles and updated the test cases to include the double-quoted variant.

NOTE: I didn't change any logic in packages/postcss-minify-selectors/test/index.js, but the file was automatically updated after running the pnpm fixlint command.

@alexander-akait
Copy link
Member

/cc @ludofischer can you help me with the release after merge this?

Copy link
codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.54%. Comparing base (9e9e111) to head (fde4c5d).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1695   +/-   ##
=======================================
  Coverage   98.54%   98.54%           
=======================================
  Files         122      122           
  Lines       10388    10388           
  Branches       18       18           
=======================================
  Hits        10237    10237           
  Misses        151      151           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ludofischer
Copy link
Collaborator 8000

@alexander-akait Yes I can release after merging this if you want

@ludofischer ludofischer merged commit e3211fa into cssnano:master May 6, 2025
12 checks passed
@alexander-akait
Copy link
Member

@ludofischer Thank you

@Multiply
Copy link
Contributor
Multiply commented May 12, 2025

Related to this, but shouldn't it also keep the % for <length 8F03 -percentage>? (MDN reference)

While investigating tailwindlabs/tailwindcss#17977 I found this PR in the hopes it would solve my issue too, but I just noticed this is just about different ways of quoting percentage, and it doesn't account for my syntax.

Edit: I've added a PR to solve it here: #1702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Invalid initial-value for custom CSS percentage property
4 participants
0