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: add whitespaces around operators in arbitrary calc #390

Merged
merged 1 commit into from
Jul 12, 2021

Conversation

schelmo
Copy link
Contributor

@schelmo schelmo commented Jul 11, 2021

twind and tailwind both add spaces around operators when using calc() in square brackets
the regex is borrowed from tw-in-js/twind#176 by @sibbng
hope this is okey for you @sibbng
this fixes #374 and #318

@codecov-commenter
Copy link

codecov-commenter commented Jul 11, 2021

Codecov Report

Merging #390 (672aa64) into main (728d187) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #390   +/-   ##
=======================================
  Coverage   88.14%   88.14%           
=======================================
  Files          56       56           
  Lines        4773     4775    +2     
  Branches     1024     1025    +1     
=======================================
+ Hits         4207     4209    +2     
  Misses        303      303           
  Partials      263      263           
Impacted Files Coverage Δ
src/lib/utilities/handler.ts 70.05% <100.00%> (+0.34%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 728d187...672aa64. Read the comment docs.

Copy link

@sibbng sibbng left a comment

Choose a reason for hiding this comment

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

Tailwind CSS 2.2 also uses that regex.

@antfu antfu merged commit 1c70709 into windicss:main Jul 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants