0
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-26 23:54:23 +01:00
Julien Déramond 035f143a48
All checks were successful
BrowserStack / browserstack (push) Has been skipped
More modifications
2024-07-31 08:34:35 +02:00

56 lines
2.0 KiB
SCSS

@use "sass:map";
@use "sass:meta";
@use "../mixins/breakpoints";
@use "../mixins/utilities" as mixins-utilities;
@use "../utilities";
@use "../setup/variables" as *;
@use "../vendor/rfs" as *;
// Loop over each breakpoint
@each $breakpoint in map.keys($grid-breakpoints) {
// Generate media query if needed
@include breakpoints.media-breakpoint-up($breakpoint) {
$infix: breakpoints.breakpoint-infix($breakpoint, $grid-breakpoints);
// Loop over each utility property
@each $key, $utility in utilities.$utilities {
// The utility can be disabled with `false`, thus check if the utility is a map first
// Only proceed if responsive media queries are enabled or if it's the base media query
@if meta.type-of($utility) == "map" and (map.get($utility, responsive) or $infix == "") {
@include mixins-utilities.generate-utility($utility, $infix);
}
}
}
}
// RFS rescaling
@media (min-width: $rfs-mq-value) {
@each $breakpoint in map.keys($grid-breakpoints) {
$infix: breakpoints.breakpoint-infix($breakpoint, $grid-breakpoints);
@if (map.get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {
// Loop over each utility property
@each $key, $utility in utilities.$utilities {
// The utility can be disabled with `false`, thus check if the utility is a map first
// Only proceed if responsive media queries are enabled or if it's the base media query
@if meta.type-of($utility) == "map" and map.get($utility, rfs) and (map.get($utility, responsive) or $infix == "") {
@include mixins-utilities.generate-utility($utility, $infix, true);
}
}
}
}
}
// Print utilities
@media print {
@each $key, $utility in utilities.$utilities {
// The utility can be disabled with `false`, thus check if the utility is a map first
// Then check if the utility needs print styles
@if meta.type-of($utility) == "map" and map.get($utility, print) == true {
@include mixins-utilities.generate-utility($utility, "-print");
}
}
}