bulma/sass/elements/container.scss

67 lines
1.4 KiB
SCSS
Raw Normal View History

2022-11-23 17:44:02 +00:00
@import "../utilities/mixins";
2022-12-06 10:46:03 +00:00
$container-offset: calc(2 * #{getVar("gap")}) !default;
2022-11-23 17:44:02 +00:00
$container-max-width: $fullhd !default;
2022-12-06 10:46:03 +00:00
:root {
@include register-vars(
(
container-offset: #{$container-offset},
)
);
}
2022-11-23 22:53:56 +00:00
.#{$class-prefix}container {
2022-11-23 17:44:02 +00:00
flex-grow: 1;
margin: 0 auto;
position: relative;
width: auto;
&.is-fluid {
max-width: none !important;
2022-12-06 10:46:03 +00:00
padding-left: getVar("gap");
padding-right: getVar("gap");
2022-11-23 17:44:02 +00:00
width: 100%;
}
@include desktop {
2022-12-06 10:46:03 +00:00
max-width: calc(#{$desktop} - #{getVar("container-offset")});
2022-11-23 17:44:02 +00:00
}
@include until-widescreen {
&.is-widescreen:not(.is-max-desktop) {
2022-12-06 10:46:03 +00:00
max-width: calc(
#{min($widescreen, $container-max-width)} - #{getVar(
"container-offset"
)}
);
2022-11-23 17:44:02 +00:00
}
}
@include until-fullhd {
&.is-fullhd:not(.is-max-desktop):not(.is-max-widescreen) {
2022-12-06 10:46:03 +00:00
max-width: calc(
#{min($fullhd, $container-max-width)} - #{getVar("container-offset")}
);
2022-11-23 17:44:02 +00:00
}
}
@include widescreen {
&:not(.is-max-desktop) {
2022-12-06 10:46:03 +00:00
max-width: calc(
#{min($widescreen, $container-max-width)} - #{getVar(
"container-offset"
)}
);
2022-11-23 17:44:02 +00:00
}
}
@include fullhd {
&:not(.is-max-desktop):not(.is-max-widescreen) {
2022-12-06 10:46:03 +00:00
max-width: calc(
#{min($fullhd, $container-max-width)} - #{getVar("container-offset")}
);
2022-11-23 17:44:02 +00:00
}
}
}