_buttons.scss
2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
//
// Component: Button
//
.btn {
&.disabled,
&:disabled {
cursor: not-allowed;
}
// Flat buttons
&.btn-flat {
@include border-radius(0);
border-width: 1px;
box-shadow: none;
}
// input file btn
&.btn-file {
overflow: hidden;
position: relative;
> input[type="file"] {
background-color: $white;
cursor: inherit;
display: block;
font-size: 100px;
min-height: 100%;
min-width: 100%;
opacity: 0;
outline: none;
position: absolute;
right: 0;
text-align: right;
top: 0;
}
}
.text-sm & {
font-size: $font-size-sm !important;
}
}
// Button color variations
.btn-default {
background-color: $button-default-background-color;
border-color: $button-default-border-color;
color: $button-default-color;
&:hover,
&:active,
&.hover {
background-color: darken($button-default-background-color, 5%);
color: darken($button-default-color, 10%);
}
}
// Application buttons
.btn-app {
@include border-radius(3px);
background-color: $button-default-background-color;
border: 1px solid $button-default-border-color;
color: $gray-600;
font-size: 12px;
height: 60px;
margin: 0 0 10px 10px;
min-width: 80px;
padding: 15px 5px;
position: relative;
text-align: center;
// Icons within the btn
> .fa,
> .fas,
> .far,
> .fab,
> .fal,
> .fad,
> .svg-inline--fa,
> .ion {
display: block;
font-size: 20px;
}
> .svg-inline--fa {
margin: 0 auto;
}
&:hover {
background-color: $button-default-background-color;
border-color: darken($button-default-border-color, 20%);
color: $button-default-color;
}
&:active,
&:focus {
@include box-shadow(inset 0 3px 5px rgba($black, .125));
}
// The badge
> .badge {
font-size: 10px;
font-weight: 400;
position: absolute;
right: -10px;
top: -3px;
}
}
// Extra Button Size
.btn-xs {
@include button-size($button-padding-y-xs, $button-padding-x-xs, $button-font-size-xs, $button-line-height-xs, $button-border-radius-xs);
}
.dark-mode {
.btn-default,
.btn-app {
background-color: lighten($dark, 2.5%);
color: $white;
border-color: $gray-600;
&:hover,
&:focus {
background-color: lighten($dark, 5%);
color: $gray-300;
border-color: lighten($gray-600, 2.5%);
}
}
.btn-light {
background-color: lighten($dark, 7.5%);
color: $white;
border-color: $gray-600;
&:hover,
&:focus {
background-color: lighten($dark, 10%);
color: $gray-300;
border-color: lighten($gray-600, 5%);
}
}
@each $color, $value in $theme-colors-alt {
.btn-#{$color} {
@include button-variant($value, $value);
}
}
@each $color, $value in $theme-colors-alt {
.btn-outline-#{$color} {
@include button-outline-variant($value);
}
}
}