barua-ui 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/components/marketing.css +32 -6
- package/package.json +1 -1
|
@@ -197,28 +197,54 @@
|
|
|
197
197
|
|
|
198
198
|
/* ---- Marquee: a row that keeps moving ------------------------------------
|
|
199
199
|
For a line of marks too long to stand still: logos, integrations, the
|
|
200
|
-
names a product works with.
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
200
|
+
names a product works with.
|
|
201
|
+
|
|
202
|
+
The track holds the list TWICE inside two .b-marquee__group elements and
|
|
203
|
+
travels exactly half its width, which puts group two where group one
|
|
204
|
+
started: that is what makes the loop seamless, and with one copy it
|
|
205
|
+
visibly snaps.
|
|
206
|
+
|
|
207
|
+
The groups exist because "twice" is not enough on its own. Half the track
|
|
208
|
+
is one group, so the loop is only seamless if a group is at least as wide
|
|
209
|
+
as the rail; seven short names in a 1280px row leave the second copy
|
|
210
|
+
ending early and a hole travelling along behind it. Each group is
|
|
211
|
+
therefore floored at the rail's own width and spaces its contents out to
|
|
212
|
+
fill it, so the belt is solid at any width with any number of names, and
|
|
213
|
+
when the list IS wider than the rail max-content wins and nothing changes.
|
|
214
|
+
|
|
215
|
+
It pauses under the pointer so a name can be read, and it stops entirely
|
|
216
|
+
for anyone who asked for less motion, where it becomes an ordinary
|
|
217
|
+
scrolling row instead. --b-marquee-time is the pace. */
|
|
205
218
|
.b-marquee {
|
|
206
219
|
overflow: hidden;
|
|
220
|
+
/* The floor a group measures itself against. */
|
|
221
|
+
container-type: inline-size;
|
|
207
222
|
-webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
|
|
208
223
|
mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
|
|
209
224
|
}
|
|
210
225
|
.b-marquee__track {
|
|
211
226
|
display: flex;
|
|
212
227
|
align-items: center;
|
|
213
|
-
gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
|
|
214
228
|
width: max-content;
|
|
215
229
|
animation: b-marquee var(--b-marquee-time, 40s) linear infinite;
|
|
216
230
|
}
|
|
231
|
+
.b-marquee__group {
|
|
232
|
+
display: flex;
|
|
233
|
+
flex: none;
|
|
234
|
+
align-items: center;
|
|
235
|
+
justify-content: space-around;
|
|
236
|
+
gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
|
|
237
|
+
min-width: 100cqi;
|
|
238
|
+
/* Half the gap on each end, so the seam between the two groups is spaced
|
|
239
|
+
exactly like the gaps inside one. */
|
|
240
|
+
padding-inline: clamp(var(--b-space-3), 2.5vw, var(--b-space-6));
|
|
241
|
+
}
|
|
217
242
|
.b-marquee:hover .b-marquee__track { animation-play-state: paused; }
|
|
218
243
|
@keyframes b-marquee { to { translate: -50% 0; } }
|
|
219
244
|
@media (prefers-reduced-motion: reduce) {
|
|
220
245
|
.b-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
|
|
221
246
|
.b-marquee__track { animation: none; }
|
|
247
|
+
.b-marquee__group { min-width: 0; }
|
|
222
248
|
}
|
|
223
249
|
|
|
224
250
|
/* ---- Quote card: a number, a sentence, and who said it -------------------
|