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

[POST] Use a Stylus variable inside calc() #25

Open
Rplus opened this issue Mar 19, 2016 · 0 comments
Open

[POST] Use a Stylus variable inside calc() #25

Rplus opened this issue Mar 19, 2016 · 0 comments
Labels

Comments

@Rplus
Copy link
Owner

Rplus commented Mar 19, 2016

Use a Stylus variable inside calc()
a pen by Ana Tudor
http://codepen.io/thebabydino/pen/OPNZjO

div {
  v = 4em

  height: "calc(%s + 7px)" % v
  background: #e53b2c;
}

stylus 文件很難找 ( 特殊字型又很難閱讀 = =
感謝這網友的告知~
https://github.com/stylus/stylus/blob/master/docs/operators.md#sprintf

Sprintf

Multiple values should be parenthesized:

  '-webkit-gradient(%s, %s, %s)' % (linear (0 0) (0 100%))
  // => -webkit-gradient(linear, 0 0, 0 100%)
@Rplus Rplus added the 筆記 label Mar 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant