RamseyInHouse / scut

Sass utilities for the frontend laborer.
https://ramseyinhouse.github.io/scut/
MIT License
769 stars 61 forks source link

Ratio Box refactor, to accomplish `math.div` instead of slashes #212

Closed Dru-S closed 2 years ago

Dru-S commented 2 years ago

Hey @davidtheclark ,

Is it possible to change the way scut-ratio-box works, in order to avoid warnings or errors from the 1/1 division?

Maybe we can pass 2 arguments, and programmatically add the division inside the mixin, something like:

@include scut-ratio-box(2 1);

Instead of:

@include scut-ratio-box(2/1);

Thanks!

xzyfer commented 2 years ago

It's worth noting math.div is not supported in node-sass so this could be a breaking change.

Dru-S commented 2 years ago

@xzyfer Yeah, but node-sass is deprecated, and the last release of Scut it's exactly related to the math.div refactor. The only thing left out was the 1/1 division in the ratio box mixin, and it triggers warnings in the latest versions of Sass/SCSS compilers (for example Dart Sass, which I'm currently using)

Edit: I only saw right now you are a contributor to node-sass and libsass repos, so sorry for the useless explanation 🙏

xzyfer commented 2 years ago

@Dru-S for sure! Just wanted to call it out in case it wasn't a conscious decision to break BC :)

Edit: I was briefly maintaining this repo to update deprecation warning issues but haven't kept up with recent developments.

MoritzHayden commented 2 years ago

Fixed in v1.4.3