-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sass variables removed in version 4? #19877
Comments
|
Any update on this? |
It looks like V3 at https://github.com/twbs/bootstrap/blob/v3.3.7/less/variables.less#L62-L65: //** Unit-less `line-height` for use in components like buttons.
@line-height-base: 1.428571429; // 20/14
//** Computed "line-height" (`font-size` * `line-height`) for use with `margin`, `padding`, etc.
@line-height-computed: floor((@font-size-base * @line-height-base)); // ~20px V4 at https://github.com/twbs/bootstrap/blob/v4.0.0-alpha.3/scss/_variables.scss#L174: $line-height-base: 1.5 !default; |
The most helpful thing to do would be to look thru the git history and find which commit removed the variable. |
I removed the computed line-height as I don't really need it anymore for setting vertical spacing between elements (e.g., at the bottom of an alert or between headings). Those things are mostly better left to the margin utilities, type scale, etc. All the screen sizes and what not were redone in v4, so no surprise the And I've removed, wherever possible, fixed-height values and variables. They are flimsy for creating complex components, are often the result of complex math, etc. Sorry for the super delayed response! |
Without knowing a lot about Bootstrap (I'm diving straight into version 4), I'm working with a theme that relies on Bootstrap 3 - I'm trying to put Bootstrap 4 in instead. This particular module wants to use a few variables that aren't around anymore -- $line-height-computed, $screen-sm-min, $navbar-height.
Could anyone explain why those are no longer required by Bootstrap itself and whether I should compute these variables myself or use a replacement variable from the new styles?
The text was updated successfully, but these errors were encountered: