/
_common.scss
175 lines (142 loc) · 3.06 KB
/
_common.scss
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/**
* General Uppy styles that apply to everything inside the .uppy-Root container
*/
.uppy-Root {
position: relative;
box-sizing: border-box;
color: $gray-800;
font-family: $font-family-base;
line-height: 1;
text-align: left;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
// One selector uses the dir attribute declared by the page. If that does not exist, Uppy adds a
// fallback dir attribute on the root element itself, and we need a second selector to match that.
[dir="rtl"] .uppy-Root,
.uppy-Root[dir="rtl"] {
text-align: right;
}
.uppy-Root *,
.uppy-Root *::before,
.uppy-Root *::after {
box-sizing: inherit;
}
.uppy-Root [hidden] {
display: none;
}
// Utilities
.uppy-u-reset {
all: initial;
box-sizing: border-box;
appearance: none;
}
[dir="rtl"] .uppy-u-reset {
text-align: right;
}
// Inputs
.uppy-c-textInput {
padding: 6px 8px;
font-size: 14px;
line-height: 1.5;
background-color: $white;
border: 1px solid #ddd;
border-radius: 4px;
.uppy-size--md & {
padding: 8px 10px;
}
&:focus {
border-color: rgba($blue, 0.6);
outline: none;
box-shadow: 0 0 0 3px rgba($blue, 0.15);
}
[data-uppy-theme="dark"] & {
color: $gray-200;
background-color: $gray-800;
border-color: $gray-800;
}
[data-uppy-theme="dark"] &:focus {
border-color: $gray-700;
box-shadow: none;
}
}
// Icon
// https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
.uppy-c-icon {
display: inline-block;
max-width: 100%;
max-height: 100%;
overflow: hidden;
fill: currentColor;
}
// Buttons
.uppy-c-btn {
display: inline-flex;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: inherit;
font-family: inherit;
color: inherit;
line-height: 1;
white-space: nowrap;
text-align: center;
// vertical-align: middle;
transition-duration: 0.3s;
transition-property: background-color, color;
user-select: none;
// Override right-to-left variant of the uppy-u-reset class
[dir="rtl"] & { text-align: center; }
}
.uppy-c-btn:not(:disabled):not(.disabled) {
cursor: pointer;
}
.uppy-c-btn::-moz-focus-inner {
border: 0;
}
.uppy-c-btn-primary {
padding: 10px 18px;
color: $white;
font-size: 14px;
background-color: $blue;
border-radius: 4px;
&:hover {
background-color: darken($blue, 10%);
}
&:focus {
outline: none;
box-shadow: 0 0 0 3px rgba($blue, 0.4);
}
.uppy-size--md & {
padding: 13px 22px;
}
[data-uppy-theme="dark"] & {
color: $gray-200;
@include blue-border-focus--dark;
}
}
.uppy-c-btn-link {
padding: 10px 15px;
color: $gray-700;
font-size: 14px;
line-height: 1;
background-color: transparent;
border-radius: 4px;
&:hover {
color: $gray-800;
}
&:focus {
outline: none;
box-shadow: 0 0 0 3px rgba($blue, 0.25);
}
.uppy-size--md & {
padding: 13px 18px;
}
[data-uppy-theme="dark"] & {
color: $gray-200;
@include blue-border-focus--dark;
}
[data-uppy-theme="dark"] &:hover {
color: $gray-500;
}
}