ant-design / cssinjs

https://ant-design.github.io/cssinjs
MIT License
247 stars 61 forks source link

fix: css transformer should not split calc #70

Closed MadCcc closed 1 year ago

MadCcc commented 1 year ago

split 本来是为了这种情况存在的:paddingInline: 2px 4px 会转换成 paddingLeft: 2px; paddingRight: 4px。 简单的 split(/\s+/) 会将 calc 错误地分离。

其实还有更复杂的情况,比如圆角会有用 / 的情况。antd 中没有遇到,有问题再处理。

close https://github.com/ant-design/ant-design/issues/39881 close https://github.com/ant-design/ant-design/issues/39882

github-actions[bot] commented 1 year ago

🎊 PR Preview 87fc37d3ec220bd5ffd500f1fdc18924eb6b74fb has been successfully built and deployed to https://ant-design-cssinjs-preview-pr-70.surge.sh

:clock1: Build time: 93.651s

🤖 By surge-preview

codecov-commenter commented 1 year ago

Codecov Report

Base: 91.44% // Head: 91.72% // Increases project coverage by +0.27% :tada:

Coverage data is based on head (87fc37d) compared to base (ad3f364). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #70 +/- ## ========================================== + Coverage 91.44% 91.72% +0.27% ========================================== Files 12 12 Lines 538 556 +18 Branches 181 186 +5 ========================================== + Hits 492 510 +18 Misses 46 46 ``` | [Impacted Files](https://codecov.io/gh/ant-design/cssinjs/pull/70?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design) | Coverage Δ | | |---|---|---| | [src/transformers/legacyLogicalProperties.ts](https://codecov.io/gh/ant-design/cssinjs/pull/70/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design#diff-c3JjL3RyYW5zZm9ybWVycy9sZWdhY3lMb2dpY2FsUHJvcGVydGllcy50cw==) | `96.29% <100.00%> (+1.85%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ant-design)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

yoyo837 commented 1 year ago

这个同时也能修复 https://github.com/ant-design/cssinjs/issues/69 吗?

MadCcc commented 1 year ago

这个同时也能修复 #69 吗?

看起来不相关