init
This commit is contained in:
6
user/plugins/problems/scss/mixins/_avatar.scss
Executable file
6
user/plugins/problems/scss/mixins/_avatar.scss
Executable file
@@ -0,0 +1,6 @@
|
||||
// Avatar mixin
|
||||
@mixin avatar-base($size: $unit-8) {
|
||||
font-size: $size / 2;
|
||||
height: $size;
|
||||
width: $size;
|
||||
}
|
||||
54
user/plugins/problems/scss/mixins/_button.scss
Executable file
54
user/plugins/problems/scss/mixins/_button.scss
Executable file
@@ -0,0 +1,54 @@
|
||||
// Button variant mixin
|
||||
@mixin button-variant($color: $primary-color) {
|
||||
background: $color;
|
||||
border-color: darken($color, 3%);
|
||||
color: $light-color;
|
||||
&:focus {
|
||||
@include control-shadow($color);
|
||||
}
|
||||
&:focus,
|
||||
&:hover {
|
||||
background: darken($color, 2%);
|
||||
border-color: darken($color, 5%);
|
||||
color: $light-color;
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background: darken($color, 7%);
|
||||
border-color: darken($color, 10%);
|
||||
color: $light-color;
|
||||
}
|
||||
&.loading {
|
||||
&::after {
|
||||
border-bottom-color: $light-color;
|
||||
border-left-color: $light-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@mixin button-outline-variant($color: $primary-color) {
|
||||
background: $light-color;
|
||||
border-color: $color;
|
||||
color: $color;
|
||||
&:focus {
|
||||
@include control-shadow($color);
|
||||
}
|
||||
&:focus,
|
||||
&:hover {
|
||||
background: lighten($color, 50%);
|
||||
border-color: darken($color, 2%);
|
||||
color: $color;
|
||||
}
|
||||
&:active,
|
||||
&.active {
|
||||
background: $color;
|
||||
border-color: darken($color, 5%);
|
||||
color: $light-color;
|
||||
}
|
||||
&.loading {
|
||||
&::after {
|
||||
border-bottom-color: $color;
|
||||
border-left-color: $color;
|
||||
}
|
||||
}
|
||||
}
|
||||
8
user/plugins/problems/scss/mixins/_clearfix.scss
Executable file
8
user/plugins/problems/scss/mixins/_clearfix.scss
Executable file
@@ -0,0 +1,8 @@
|
||||
// Clearfix mixin
|
||||
@mixin clearfix() {
|
||||
&::after {
|
||||
clear: both;
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
}
|
||||
27
user/plugins/problems/scss/mixins/_color.scss
Executable file
27
user/plugins/problems/scss/mixins/_color.scss
Executable file
@@ -0,0 +1,27 @@
|
||||
// Background color utility mixin
|
||||
@mixin bg-color-variant($name: ".bg-primary", $color: $primary-color) {
|
||||
#{$name} {
|
||||
background: $color;
|
||||
|
||||
@if (lightness($color) < 60) {
|
||||
color: $light-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Text color utility mixin
|
||||
@mixin text-color-variant($name: ".text-primary", $color: $primary-color) {
|
||||
#{$name} {
|
||||
color: $color;
|
||||
}
|
||||
|
||||
a#{$name} {
|
||||
&:focus,
|
||||
&:hover {
|
||||
color: darken($color, 5%);
|
||||
}
|
||||
&:visited {
|
||||
color: lighten($color, 5%);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
user/plugins/problems/scss/mixins/_label.scss
Executable file
11
user/plugins/problems/scss/mixins/_label.scss
Executable file
@@ -0,0 +1,11 @@
|
||||
// Label base style
|
||||
@mixin label-base() {
|
||||
border-radius: $border-radius;
|
||||
line-height: 1.2;
|
||||
padding: .1rem .2rem;
|
||||
}
|
||||
|
||||
@mixin label-variant($color: $light-color, $bg-color: $primary-color) {
|
||||
background: $bg-color;
|
||||
color: $color;
|
||||
}
|
||||
65
user/plugins/problems/scss/mixins/_position.scss
Executable file
65
user/plugins/problems/scss/mixins/_position.scss
Executable file
@@ -0,0 +1,65 @@
|
||||
// Margin utility mixin
|
||||
@mixin margin-variant($id: 1, $size: $unit-1) {
|
||||
.m-#{$id} {
|
||||
margin: $size !important;
|
||||
}
|
||||
|
||||
.mb-#{$id} {
|
||||
margin-bottom: $size !important;
|
||||
}
|
||||
|
||||
.ml-#{$id} {
|
||||
margin-left: $size !important;
|
||||
}
|
||||
|
||||
.mr-#{$id} {
|
||||
margin-right: $size !important;
|
||||
}
|
||||
|
||||
.mt-#{$id} {
|
||||
margin-top: $size !important;
|
||||
}
|
||||
|
||||
.mx-#{$id} {
|
||||
margin-left: $size !important;
|
||||
margin-right: $size !important;
|
||||
}
|
||||
|
||||
.my-#{$id} {
|
||||
margin-bottom: $size !important;
|
||||
margin-top: $size !important;
|
||||
}
|
||||
}
|
||||
|
||||
// Padding utility mixin
|
||||
@mixin padding-variant($id: 1, $size: $unit-1) {
|
||||
.p-#{$id} {
|
||||
padding: $size !important;
|
||||
}
|
||||
|
||||
.pb-#{$id} {
|
||||
padding-bottom: $size !important;
|
||||
}
|
||||
|
||||
.pl-#{$id} {
|
||||
padding-left: $size !important;
|
||||
}
|
||||
|
||||
.pr-#{$id} {
|
||||
padding-right: $size !important;
|
||||
}
|
||||
|
||||
.pt-#{$id} {
|
||||
padding-top: $size !important;
|
||||
}
|
||||
|
||||
.px-#{$id} {
|
||||
padding-left: $size !important;
|
||||
padding-right: $size !important;
|
||||
}
|
||||
|
||||
.py-#{$id} {
|
||||
padding-bottom: $size !important;
|
||||
padding-top: $size !important;
|
||||
}
|
||||
}
|
||||
9
user/plugins/problems/scss/mixins/_shadow.scss
Executable file
9
user/plugins/problems/scss/mixins/_shadow.scss
Executable file
@@ -0,0 +1,9 @@
|
||||
// Component focus shadow
|
||||
@mixin control-shadow($color: $primary-color) {
|
||||
box-shadow: 0 0 0 .1rem rgba($color, .2);
|
||||
}
|
||||
|
||||
// Shadow mixin
|
||||
@mixin shadow-variant($offset) {
|
||||
box-shadow: 0 $offset ($offset + .05rem) * 2 rgba($dark-color, .3);
|
||||
}
|
||||
6
user/plugins/problems/scss/mixins/_text.scss
Executable file
6
user/plugins/problems/scss/mixins/_text.scss
Executable file
@@ -0,0 +1,6 @@
|
||||
// Text Ellipsis
|
||||
@mixin text-ellipsis() {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
5
user/plugins/problems/scss/mixins/_toast.scss
Executable file
5
user/plugins/problems/scss/mixins/_toast.scss
Executable file
@@ -0,0 +1,5 @@
|
||||
// Toast variant mixin
|
||||
@mixin toast-variant($color: $dark-color) {
|
||||
background: rgba($color, .9);
|
||||
border-color: $color;
|
||||
}
|
||||
4
user/plugins/problems/scss/mixins/_transition.scss
Executable file
4
user/plugins/problems/scss/mixins/_transition.scss
Executable file
@@ -0,0 +1,4 @@
|
||||
// Component transition
|
||||
@mixin control-transition() {
|
||||
transition: all .2s ease;
|
||||
}
|
||||
Reference in New Issue
Block a user