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

mscc 解析 calc 函数的bug #8

Open
ystarlongzi opened this issue May 25, 2015 · 3 comments
Open

mscc 解析 calc 函数的bug #8

ystarlongzi opened this issue May 25, 2015 · 3 comments

Comments

@ystarlongzi
Copy link

mcss 代码片段:

/* xx.mcss */
div {
    width: calc(100% + 2px);
}

实际解析后结果:

/* xx.css */
div {
    width: calc(102%);
}

预期解析后结果:

/* xx.css */
div {
    width: calc(100% + 2px);
}
@techbirds
Copy link

操作符前后有空格就视为运算操作,mcss当做表达式进行计算,但其实calc其实并不需要计算。
但作为calc如果需要委托给浏览器计算,操作符必须留空格。

mcss对calc的使用有解决方案吗?

@leeluolee
Copy link
Owner

div {
    width: t('calc(100% + 2px)');
}

先这样吧

@techbirds
Copy link

感谢。

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

3 participants