bootstrap-sass icon indicating copy to clipboard operation
bootstrap-sass copied to clipboard

Division: use twbs/rfs for backward & forward compatibility

Open AprilArcus opened this issue 2 years ago • 3 comments

Follow-up to @stof's suggestion at https://github.com/twbs/bootstrap-sass/issues/1226#issuecomment-1056845983. Adopts the https://github.com/twbs/rfs library to handle division in a forward- and backward- compatible fashion in both libsass and dart-sass. Reverts devDependency pin to node-sass.

I am not convinced that merging this in favor of math.div() is the best choice, but since it is a marginally viable proposal, I felt like I should put the option up for consideration. This suggestion follows in the footsteps of Bootstrap 4 and 5, but I do want to note that more serious breaking change around @import are scheduled for October, and we will have to make a clean break with libsass by then in any case — either with a "3.5" release, or with a fork.

See also

https://github.com/twbs/bootstrap-sass/issues/1217 https://github.com/twbs/bootstrap-sass/issues/1219 https://github.com/twbs/bootstrap-sass/pull/1221

AprilArcus avatar Mar 02 '22 18:03 AprilArcus

Why importing the whole RFS library (which is about responsive font sizes) instead of only the divide function ?

stof avatar Mar 18 '22 18:03 stof

I just tried to do the Bootstrap 4-est thing. In truth I don't intend to maintain this branch or push for merging it, but I did want to evaluate the feasibility of an alternative to Math.div that you suggested. Feel free to take this and run with it; as for the rest it's up to the maintainers.

AprilArcus avatar Mar 25 '22 01:03 AprilArcus

@AprilArcus the math.div replacement in Bootstrap 4 is just the divide function, not the whole RFS library (which is about a specific feature, that happens to need doing divisions)

stof avatar Mar 25 '22 08:03 stof