torchbox / tbxforms

A Torchbox-flavoured template pack for django-crispy-forms, adapted from crispy-forms-gds.
https://pypi.org/project/tbxforms/
BSD 2-Clause "Simplified" License
6 stars 5 forks source link

Use `math.div` over literal `/` #60

Closed RealOrangeOne closed 8 months ago

RealOrangeOne commented 9 months ago

Using a literal / as a division operator is deprecated, and raises warnings on versions of Sass over 1.33.0: https://sass-lang.com/documentation/breaking-changes/slash-div/

This adds a dependency on sass over 1.33.0 (released May 2021), as the sass:math module didn't exist before then.

kbayliss commented 9 months ago

Hmm, I remember swapping to math.div for the first release of tbxforms as I encountered warnings for this, but then changed it back to / because of something @thibaudcolas said.

Can you remember why this might have been, @thibaudcolas ? Was it that wagtail-kit was still using sass<1.33.0 at the time?

RealOrangeOne commented 9 months ago

Wagtail-kit is indeed still using sass<1.33.0, but we can upgrade that fairly easily.

thibaudcolas commented 9 months ago

@kbayliss yes, I believe we discussed the fact our kit template was still on an older Sass version. We’ve made a lot of other upgrades to our stylesheets since then, so there’s no blocker to this as far as I’m aware. Might just need a quick check that Sass linting and sass-loader are compatible with the newer release of sass, but I think we should be good.