platypush/platypush/backend/http/webapp/src/style/layout.scss

115 lines
2.4 KiB
SCSS
Raw Normal View History

2020-11-21 01:12:08 +01:00
$widths: (
2020-12-26 15:03:12 +01:00
s: (max-width: $tablet),
m: (min-width: $tablet),
l: (min-width: $desktop),
xl: (min-width: $widescreen),
xxl: (min-width: $fullhd),
2020-11-21 01:12:08 +01:00
);
@for $i from 1 through 12 {
.col-#{$i} {
float: left;
box-sizing: border-box;
@if $i < 12 {
width: (4.66666666667%*$i) + (4% * if($i > 1, $i - 1, 0));
margin-left: 4%;
} @else {
width: 100%;
margin-left: 0;
}
&:first-child {
margin-left: 0;
}
}
.col-no-margin-#{$i} {
float: left;
box-sizing: border-box;
width: ((100%/12)*$i);
margin: 0;
}
@if $i < 12 {
.col-offset-#{$i}:first-child {
margin-left: (8.66666666667%*$i) !important;
}
.col-offset-#{$i}:not(first-child) {
margin-left: 4% + (8.66666666667%*$i) !important;
}
}
}
@each $size, $width in $widths {
@media #{$width} {
@for $i from 1 through 12 {
.col-#{$size}-#{$i} {
float: left;
box-sizing: border-box;
@if $i < 12 {
width: (4.66666666667%*$i) + (4% * if($i > 1, $i - 1, 0));
margin-left: 4%;
} @else {
width: 100%;
margin-left: 0;
}
&:first-child {
margin-left: 0;
}
}
@if $i < 12 {
.col-offset-#{$size}-#{$i} {
margin-left: (8.66666666667%*$i);
}
}
.col-no-margin-#{$size}-#{$i} {
float: left;
box-sizing: border-box;
width: ((100%/12)*$i);
}
}
.#{$size}-hidden {
display: none !important;
}
.#{$size}-visible {
display: block !important;
}
}
}
.vertical-center {
display: flex;
align-items: center;
}
.horizontal-center {
display: flex;
justify-content: center;
margin-left: auto;
margin-right: auto;
}
2020-11-26 23:43:16 +01:00
.pull-right {
text-align: right;
float: right;
2021-01-22 01:00:49 +01:00
justify-content: right;
2020-11-26 23:43:16 +01:00
}
2020-11-27 23:12:10 +01:00
.hidden {
display: none !important;
}
2020-12-26 15:03:12 +01:00
.no-content {
display: flex;
font-size: 1.5em;
align-items: center;
justify-content: center;
}