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

[add] Sassにhalf()関数などを追加 #58

Open
manabuyasuda opened this issue Jun 27, 2016 · 0 comments
Open

[add] Sassにhalf()関数などを追加 #58

manabuyasuda opened this issue Jun 27, 2016 · 0 comments

Comments

@manabuyasuda
Copy link
Owner

(val / 2)みたいな四則演算をするときにhalf(val)みたいにしたい。

  • quarter() 1/4
  • half() 1/2
  • double() * 2
  • quadruple() * 4

小数点の桁数も変更できるようにしたい。

http://terkel.jp/archives/2012/12/decimal-digits-and-rounding-sass-function/

第一引数に値、第二引数に小数点の桁数、第三引数に丸め方。小数点は6桁、丸め方は四捨五入(round)をデフォルトにする。

half($number, $digits: 6, $function: round)
@manabuyasuda manabuyasuda changed the title Sassに関数を追加 [add] Sassにhalf()関数などを追加 Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant