Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit 812877b

Browse files
committed
beta2 FTW! ✌️
1 parent 133759d commit 812877b

File tree

21 files changed

+816
-416
lines changed

21 files changed

+816
-416
lines changed

assets/css/imageset.css

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
z-index: 2;
5656
}
5757

58-
.imageset-js .imageset--ratio.imageset--lazyload .imageset__element {
58+
.js .imageset--ratio.imageset--lazyload .imageset__element {
5959
/* The actual image is kept behind the placeholder.
6060
Rather than fading in the image, the placeholder is
6161
faded out instead. This prevents the image layer to
@@ -67,16 +67,21 @@
6767
z-index: 1;
6868
}
6969

70-
.imageset-js .imageset--alpha.imageset--lazyload .imageset__element {
70+
.js .imageset--alpha.imageset--lazyload .imageset__element {
7171
/* Images with transparency require a different fading
7272
technique, as the placeholder would shine through,
7373
after the final image was loaded. */
7474
opacity: 0;
7575
will-change: opacity;
76-
transition: opacity 0.5s;
7776
}
7877

79-
.imageset-js .imageset--alpha.imageset--lazyload.imageset--loaded .imageset__element {
78+
@media screen {
79+
.js .imageset--alpha.imageset--lazyload .imageset__element {
80+
transition: opacity 0.5s;
81+
}
82+
}
83+
84+
.js .imageset--alpha.imageset--lazyload.imageset--loaded .imageset__element {
8085
opacity: 1;
8186
will-change: auto;
8287
}
@@ -95,13 +100,12 @@
95100
contain: strict;
96101
}
97102

98-
.imageset-js .imageset--lazyload .imageset__placeholder {
103+
.js .imageset--lazyload .imageset__placeholder {
99104
/* Placeholder will be placed on top of the actual
100105
image element. This will only be applied, when
101106
JavaScript is enabled. */
102107
/* Visibility of placeholder is changed to hidden after
103108
the transition. */
104-
transition: opacity 0.5s 0.05s, visibility 0s 0.8s;
105109
/* The actual placeholder is in front of the actual
106110
image, so we don’t have to fade in the image, which
107111
would lead to artifacts in WebKit- and Blink-based
@@ -117,16 +121,27 @@
117121
background-color: #efefef;
118122
}
119123

124+
@media screen {
125+
.js .imageset--lazyload .imageset__placeholder {
126+
transition: opacity 0.5s 0.05s, visibility 0s 0.8s;
127+
}
128+
}
129+
120130
.imageset--alpha .imageset__placeholder {
121131
visibility: hidden;
122132
}
123133

124-
.imageset-js .imageset--alpha .imageset__placeholder {
134+
.js .imageset--alpha .imageset__placeholder {
125135
visibility: visible;
126-
transition: opacity 0.5s 0.05s, visibility 0s 0.8s;
127136
}
128137

129-
.imageset-js .imageset--alpha:not(.imageset--placeholder--color) .imageset__placeholder {
138+
@media screen {
139+
.js .imageset--alpha .imageset__placeholder {
140+
transition: opacity 0.5s 0.05s, visibility 0s 0.8s;
141+
}
142+
}
143+
144+
.js .imageset--alpha:not(.imageset--placeholder--color) .imageset__placeholder {
130145
background-color: transparent;
131146
}
132147

@@ -147,7 +162,7 @@
147162
/* Opera 26+, Chrome */
148163
}
149164

150-
.imageset-js .imageset--loaded .imageset__placeholder {
165+
.js .imageset--loaded .imageset__placeholder {
151166
/* After image is loaded, the placeholder will fade out
152167
and then change visibility to allow mouse interation
153168
with the loaded image in browsers, where the

assets/css/imageset.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)