ant-design / ant-design/cssinjs
内置的transform方法在处理calc时有可能清掉空格导致出错
Open
- Dominant language
- TypeScript
- Stars
- 287
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
🐛 bug 描述
内置的transform方法在处理样式时,遇到'()'时会根据空格分组处理然后合并,合并时会丢失空格,导致calc语法出错,具体出错如下:
📷 复现步骤
将example/logicalProperties中的paddingInline值修改为calc语法即可复现
🏞 期望结果
transform方法能够正确处理calc语法
💻 修复方法
是否可以使用数组保存中间状态
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the transform implementation and the example/logicalProperties example, then reproduce the issue by changing paddingInline to a calc expression. Trace how whitespace inside parentheses is grouped and recombined; done means calc syntax remains valid and the example renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100