-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhoverSlider.css
More file actions
executable file
·122 lines (116 loc) · 2.5 KB
/
Copy pathhoverSlider.css
File metadata and controls
executable file
·122 lines (116 loc) · 2.5 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
.hover_slider {
position: relative;
font-size: 0;
width: auto;
height: auto;
user-select: none;
-webkit-tap-highlight-color: transparent;
counter-reset: slides;
}
.hover_slider-window {
position: absolute;
inset: 0;
&:focus-visible {
outline-style: auto !important;
outline-width: unset !important;
outline-color: unset !important;
}
}
.hover_slider img {
position: absolute;
width: 100%;
height: 100%;
inset: 0;
object-fit: contain;
opacity: 0;
}
.hover_slider:not(:has(img.active)) img:first-child {
position: relative;
opacity: 1;
z-index: 0;
}
.hover_slider img.active {
position: relative;
opacity: 1;
z-index: 1;
}
.hover_slider-indicator {
position: absolute;
width: 100%;
bottom: -1px;
display: flex;
justify-content: center;
}
.hover_slider[data-wait="true"]:not(.hover_slider-ready) .hover_slider-indicator {
visibility: hidden;
}
.hover_slider .indmark {
position: relative;
height: 1px;
width: 100%;
counter-increment: slides;
}
.hover_slider .indmark.active {
background: rgba(0,0,0,.35);
}
.hover_slider[data-fit="cover"] img {
object-fit: cover;
}
.hover_slider:not([data-border="none"]) .hover_slider-window {
outline: 1px solid rgba(0,0,0,.075);
}
.hover_slider[data-ind="none"] .hover_slider-indicator {
display: none;
}
.hover_slider[data-ind="dots"] {
margin-bottom: 20px;
.hover_slider-indicator {
bottom: -16px;
}
.indmark {
width: 5px;
height: 5px;
border-radius: 50%;
margin: 4px;
background: rgba(0,0,0,.1);
flex-shrink: 0;
}
.indmark.active {
background: rgba(0,0,0,.5);
}
}
.hover_slider[data-ind="nums"] {
margin-bottom: 20px;
.hover_slider-indicator {
bottom: -16px;
font-size: 12px;
height: 1em;
}
.indmark {
width: min-content;
background: none;
white-space: nowrap;
height: 1em;
line-height: 1;
}
.indmark.active::before {
content: counter(slides);
}
.indmark:last-child::after {
content: "\2009/\2009" counter(slides);
}
}
/* uncomment to highlight the outline when activated by touch */
/* .hover_slider.hover_slider-touch_active .hover_slider-window {
outline-color: #43a7ff;
} */
/* uncomment to fade the cover image in when ready */
/* .hover_slider:not(.hover_slider-cover_ready, :has(img.active)) img:first-child {
transform: translateY(4px);
opacity: 0 !important;
}
.hover_slider.hover_slider-cover_ready:not(:has(img.active)) img:first-child {
transform: translateY(0);
opacity: 1;
transition: all .5s;
} */