demarches-normaliennes/app/assets/stylesheets/utils.scss

133 lines
1.9 KiB
SCSS
Raw Normal View History

@import "colors";
2019-10-17 15:13:50 +02:00
@import "constants";
// floats
.pull-left {
float: left;
}
.pull-right {
float: right;
}
.clearfix {
clear: both;
}
2017-05-05 14:59:00 +02:00
.inline {
display: inline;
}
// text
.text-center,
2017-05-05 14:59:00 +02:00
.center {
text-align: center;
}
2017-06-13 17:46:08 +02:00
.text-right {
text-align: right;
}
.text-sm {
font-size: 14px !important;
}
2017-07-24 10:01:53 +02:00
.text-lg {
font-size: 18px;
}
.bold-weight-bold {
font-weight: bold !important;
}
.font-weight-normal {
font-weight: normal !important;
}
.numbers-delimiter {
display: inline-block;
width: 5px;
2017-07-24 10:01:53 +02:00
}
.empty-text {
font-size: 20px;
font-weight: bold;
text-align: center;
margin: 60px 0;
}
.empty-text-details {
margin-bottom: 60px;
text-align: center;
.empty-text + & {
margin-top: -50px;
}
}
// display
.hidden {
display: none;
}
// sizing
.width-100 {
width: 100%;
@media (max-width: $two-columns-breakpoint) {
&-mobile {
width: 100%;
}
}
}
.width-33 {
width: 33.33%;
@media (min-width: $two-columns-breakpoint) {
&-desktop {
width: 33.33%;
}
}
}
.width-66 {
width: 66.67%;
@media (min-width: $two-columns-breakpoint) {
&-desktop {
width: 66.67%;
}
}
}
// who known
.highlighted {
background: $orange-bg;
color: $black;
}
// generate spacer utility like bootstrap my-2 -> margin-left/right: 2 * $default-spacer
// using $direction.key as css modifier, $direction.values to set css properties
// scale it using $steps
$directions: (
"t": ("margin-top"),
"r": ("margin-right"),
"b": ("margin-bottom"),
"l": ("margin-left"),
"x": ("margin-left", "margin-right"),
"y": ("margin-top", "margin-bottom"),
"": ("margin")
);
$steps: (0, 1, 2, 3, 4, 5, 6, 7, 8);
@each $modifier, $properties in $directions {
@each $step in $steps {
@each $property in $properties {
.m#{$modifier}-#{$step} {
#{$property}: $step * $default-spacer;
}
}
}
2021-06-18 11:15:10 +02:00
}