feat(isabelle-edits): Made grid & media queries more like bootstrap 5
This branch was made to save edits that would make my life easier but are optional. These edits stray further form the original theme than the edits in the standard styles feature branch do, so if you are not used to them you night not like them. That is why I separated the branch.
This commit is contained in:
@ -1,3 +1,21 @@
|
|||||||
$grid-columns: 12;
|
// Made this more like the breakpoints used in Bootstrap 5
|
||||||
$grid-gutter-width: rem-calc(20px);
|
$grid-breakpoints: (
|
||||||
$grid-row-columns: 6;
|
xs: 0,
|
||||||
|
sm: 576px,
|
||||||
|
md: 768px,
|
||||||
|
lg: 992px,
|
||||||
|
xl: 1200px,
|
||||||
|
xxl: 1400px,
|
||||||
|
);
|
||||||
|
|
||||||
|
$container-max-widths: (
|
||||||
|
sm: 540px,
|
||||||
|
md: 720px,
|
||||||
|
lg: 960px,
|
||||||
|
xl: 1140px,
|
||||||
|
xxl: 1320px,
|
||||||
|
);
|
||||||
|
|
||||||
|
$grid-columns: 12;
|
||||||
|
$grid-gutter-width: rem-calc(20px);
|
||||||
|
$grid-row-columns: 6;
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
// NOTE: All bootstrap overrides have been configured under themes/falcon/_dev/css/abstracts/variables/bootstrap
|
// NOTE: All bootstrap overrides have been configured under themes/falcon/_dev/css/abstracts/variables/bootstrap
|
||||||
|
|
||||||
//Abstracts: Things used throughout the site such as utility classes and generic overrides.
|
//Abstracts: Things used throughout the site such as utility classes and generic overrides.
|
||||||
|
@import "abstracts/mixins";
|
||||||
//@import "abstracts/base";
|
//@import "abstracts/base";
|
||||||
//@import "abstracts/utilities";
|
//@import "abstracts/utilities";
|
||||||
|
|
||||||
|
|||||||
44
falcon/_dev/css/theme/custom/abstracts/_mixins.scss
Normal file
44
falcon/_dev/css/theme/custom/abstracts/_mixins.scss
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
// Bootstrap 5-style responsive mixins (more intuitive than Bootstrap 4)
|
||||||
|
// Learn the difference here https://getbootstrap.com/docs/5.0/migration/#sass
|
||||||
|
|
||||||
|
@mixin bs5-media-breakpoint-up($name) {
|
||||||
|
$min: map-get($grid-breakpoints, $name);
|
||||||
|
@if $min and $min > 0 {
|
||||||
|
@media (min-width: $min) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
} @else {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin bs5-media-breakpoint-down($name) {
|
||||||
|
$max: map-get($grid-breakpoints, $name);
|
||||||
|
@if $max {
|
||||||
|
@media (max-width: calc(#{$max} - 0.02px)) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
} @else {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin bs5-media-breakpoint-between($lower, $upper) {
|
||||||
|
$min: map-get($grid-breakpoints, $lower);
|
||||||
|
$max: map-get($grid-breakpoints, $upper);
|
||||||
|
@if $min and $max {
|
||||||
|
@media (min-width: $min) and (max-width: calc(#{$max} - 0.02px)) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@mixin bs5-media-breakpoint-only($name) {
|
||||||
|
$breakpoint-names: map-keys($grid-breakpoints);
|
||||||
|
$index: index($breakpoint-names, $name);
|
||||||
|
$next-name: nth($breakpoint-names, $index + 1);
|
||||||
|
|
||||||
|
@include bs5-media-breakpoint-between($name, $next-name) {
|
||||||
|
@content;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user