Sass and rounding down numbers. Can this be configured?

后端 未结 3 1484
野性不改
野性不改 2020-12-03 18:15

Is there any way for me to modify the way that Sass will handle decimal places? I saw a few people saying that Sass will dynamically do the (target/parent)*100 calculation n

3条回答
  •  佛祖请我去吃肉
    2020-12-03 19:07

    If you are using Compass, you can easily specify the precision in your project file (config.rb) without hacking the core:

    Sass::Script::Number.precision = 8
    

    For more information see Sass documentation

提交回复
热议问题