Files
Website/resources/css/utils.scss
2023-04-18 15:24:28 +10:00

258 lines
3.5 KiB
SCSS

/* Display */
.d-flex {
display: flex;
}
.d-block {
display: block;
}
.d-inline-block {
display: inline-block;
}
.d-none {
display: none;
}
@media (prefers-color-scheme: dark) {
.dark\:d-none {
display: none !important;
}
}
@media (prefers-color-scheme: light) {
.light\:d-none {
display: none !important;
}
}
/* Width */
.w-100 {
width: 100%;
}
.w-75 {
width: 75%;
}
.w-50 {
width: 50%;
}
.w-25 {
width: 25%;
}
.max-w-sm {
max-width: 640px;
}
.max-w-md {
max-width: 768px;
}
.max-w-lg {
max-width: 1024px;
}
.max-w-xl {
max-width: 1280px;
}
/* Float */
.float-left {
float: left;
}
.float-right {
float: right;
}
.clear {
clear: both;
}
/* Flex */
.flex-fill {
flex: 1;
}
.flex-0 {
flex: 0 !important;
}
/* Flex Align */
.align-items-start {
align-items: flex-start !important;
}
.align-items-center {
align-items: center;
}
/* Flex Justify */
.justify-content-center {
justify-content: center;
}
.justify-content-end {
justify-content: flex-end !important;
}
.justify-content-space-between {
justify-content: space-between !important;
}
/* Flex Direction */
.flex-row {
flex-direction: row;
}
.flex-row-reverse {
flex-direction: row-reverse;
}
.flex-column {
flex-direction: column;
}
.flex-column-reverse {
flex-direction: column-reverse;
}
.flex-basis-45 {
flex-basis: 45%;
}
.flex-basis-55 {
flex-basis: 55%;
}
/* Padding */
@each $index, $size in $spacer {
.p-#{$index} {
padding: #{$size} !important;
}
.pt-#{$index} {
padding-top: #{$size} !important;
}
.pb-#{$index} {
padding-bottom: #{$size} !important;
}
.pl-#{$index} {
padding-left: #{$size} !important;
}
.pr-#{$index} {
padding-right: #{$size} !important;
}
.px-#{$index} {
padding-left: #{$size} !important;
padding-right: #{$size} !important;
}
.py-#{$index} {
padding-top: #{$size} !important;
padding-bottom: #{$size} !important;
}
}
/* Margin */
@each $index, $size in $spacer {
.m-#{$index} {
margin: #{$size} !important;
}
.mt-#{$index} {
margin-top: #{$size} !important;
}
.mb-#{$index} {
margin-bottom: #{$size} !important;
}
.ml-#{$index} {
margin-left: #{$size} !important;
}
.mr-#{$index} {
margin-right: #{$size} !important;
}
.mx-#{$index} {
margin-left: #{$size} !important;
margin-right: #{$size} !important;
}
.my-#{$index} {
margin-top: #{$size} !important;
margin-bottom: #{$size} !important;
}
}
.mx-auto {
margin-left: auto !important;
margin-right: auto !important;
}
.ml-auto {
margin-left: auto !important;
}
.mr-auto {
margin-right: auto !important;
}
.my-auto {
margin-top: auto !important;
margin-bottom: auto !important;
}
.mt-auto {
margin-top: auto !important;
}
.mb-auto {
margin-bottom: auto !important;
}
/* Text Align */
.text-left {
text-align: left !important;
}
.text-center {
text-align: center !important;
}
/* Text Size */
.font-size-100 {
font-size: 100%;
}
.font-size-90 {
font-size: 90%;
}
.font-size-80 {
font-size: 80%;
}
/* Utility */
.prevent-select {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.small {
font-size: 80%;
line-height: 150%;
}