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

CSS的calc函数里的空格被去除,导致失效 #2

Open
weibin992 opened this issue Mar 2, 2020 · 0 comments
Open

CSS的calc函数里的空格被去除,导致失效 #2

weibin992 opened this issue Mar 2, 2020 · 0 comments

Comments

@weibin992
Copy link

weibin992 commented Mar 2, 2020

CSS样式压缩前:

.my-style {
    width: calc(45% + 305px);
}

CSS样式压缩后:

.my-style{width:calc(45%+305px);}

空格被去除导致此样式失效。
经测试发送calc使用+运算空格会被去除.
临时解决办法: 使用-运算减去负数

.my-style {width:calc(45% -  -305px);}
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

No branches or pull requests

1 participant