mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-12 00:24:03 +02:00
Unitless breakpoints
If I want to customise the breakpoints using `em`, I get compatibility errors. It is good practice to set breakpoints in `em` instead of `px` when users use browser scaling. See https://zellwk.com/blog/media-query-units/#concluding-the-experiments for more information why someone would like to do this. Only Safari users can get annoyed: https://adamwathan.me/dont-use-em-for-media-queries/ In any case, using a unitless number at line 42 would be very convenient.
This commit is contained in:
@@ -39,7 +39,7 @@
|
|||||||
// 767.98px
|
// 767.98px
|
||||||
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {
|
||||||
$next: breakpoint-next($name, $breakpoints);
|
$next: breakpoint-next($name, $breakpoints);
|
||||||
@return if($next, breakpoint-min($next, $breakpoints) - .02px, null);
|
@return if($next, breakpoint-min($next, $breakpoints) - .02, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
|
||||||
|
Reference in New Issue
Block a user