-
Notifications
You must be signed in to change notification settings - Fork 138
/
index.less
80 lines (67 loc) 路 1.53 KB
/
index.less
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
@import '../../style/variable/index.less';
@import '../../style/mixins/reset.less';
@import './viewer.less';
.@{image-prefix} {
.reset-component();
position: relative;
display: inline-flex;
min-width: var(--ix-image-min-width);
min-height: var(--ix-image-min-height);
&-layer {
position: absolute;
width: 100%;
height: 100%;
z-index: 2;
display: flex;
justify-content: center;
align-items: center;
.@{image-prefix}-placeholder,
.@{image-prefix}-fallback {
font-size: 32px;
}
}
&-failed {
.@{image-prefix}-layer {
background-color: var(--ix-color-container-bg-disabled);
}
}
&-preview:not(.@{image-prefix}-failed) {
.@{image-prefix}-preview-wrapper {
cursor: pointer;
display: none;
.@{image-prefix}-preview-icon {
color: var(--ix-image-preview-icon-color);
font-size: var(--ix-image-preview-icon-size);
}
}
&::after {
transition: all var(--ix-motion-duration-medium);
content: '';
display: inline-block;
height: 100%;
width: 100%;
position: absolute;
z-index: 1;
background-color: var(--ix-image-preview-bg-color);
left: 0;
top: 0;
opacity: 0;
}
&:hover {
.@{image-prefix}-preview-wrapper {
display: inline-block;
}
&::after {
opacity: 1;
}
}
}
&-inner {
min-height: 100%;
min-width: 100%;
object-fit: var(--ix-image-object-fit);
&-hidden {
visibility: hidden;
}
}
}