blob: 900a69a488b8cc876f4a56fadd3414a4400b0e09 (
plain) (
blame)
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
|
.theme__dark {
.image-upload {
background: $dark-theme-gray-darker;
border: 1px solid $dark-theme-gray-light;
color: $dark-theme-gray-lighter;
&__action {
&-background {
background: rgba($dark-theme-black, 0.7);
}
button {
color: $dark-theme-gray-lightest;
.mdi {
color: $dark-theme-gray-lightest;
}
}
}
}
.image-upload-wrapper .mdi {
color: $dark-theme-gray-light;
}
}
.image-upload {
background: $theme-gray-lightest;
border: 1px solid $theme-gray-lighter;
border-radius: $theme-border-radius-small;
height: 140px;
margin-top: 5px;
overflow: hidden;
position: relative;
width: 140px;
&__preview,
&__action {
left: 0;
position: absolute;
right: 0;
top: 0;
}
&__preview {
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
border-radius: 3px;
z-index: 1;
}
&__action {
display: flex;
justify-content: center;
opacity: 0;
position: relative;
@media (prefers-reduced-motion: no-preference) {
transition: opacity 0.5s;
}
z-index: 10;
&-background {
background: rgba($theme-gray, 0.7);
bottom: 0;
left: 0;
position: absolute;
right: 0;
top: 0;
z-index: 10;
}
button {
color: #fff;
position: relative;
z-index: 100;
.mdi {
color: #fff;
}
}
}
&__dropzone {
align-items: center;
border-radius: 5px;
display: flex;
flex-direction: column;
justify-content: center;
padding: 10px;
text-align: center;
}
&__dropzone,
button {
.mdi {
margin-bottom: 5px;
}
p {
font-size: 10px;
line-height: 10px;
}
}
&:hover .image-upload__action {
opacity: 1;
}
}
.image-upload-wrapper .mdi {
color: $theme-gray-light;
font-size: 40px;
}
.image-upload-wrapper__file-size {
display: flex;
color: $theme-gray-light;
font-size: 10px;
margin-top: 3px;
}
.image-upload-wrapper__file-size-error {
display: flex;
color: $theme-brand-danger;
font-size: 12px;
margin-top: 10px;
}
|