twbs / bootstrap-sass

Official Sass port of Bootstrap 2 and 3.
http://getbootstrap.com/css/#sass
MIT License
12.59k stars 3.53k forks source link

Division: use twbs/rfs for backward & forward compatibility #1229

Open AprilArcus opened 2 years ago

AprilArcus commented 2 years ago

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

stof commented 2 years ago

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

AprilArcus commented 2 years ago

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.

stof commented 2 years ago

@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)