Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

在 scss 类型的 style 里面需要使用 token 的变量值,如果是使用颜色值或者其他字符串类型的都是OK的,但是在使用数值类型的变量的时候,要如何给这个数值带上单位px呢?

You must be logged in to vote

Replies: 1 comment · 2 replies

Comment options

font-size: v-bind(titleSize + 'px');

You must be logged in to vote
2 replies
@nd-lqj
Comment options

这么处理的话,就需要对用到的token值单独设置变量存储,就感觉很不优雅。

@hzlzsm
Comment options

这么处理的话,就需要对用到的token值单独设置变量存储,就感觉很不优雅。

margin:calc(1px * v-bind('token.margin'))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.