barua-ui 0.10.0 → 0.11.1
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 +43 -6
- package/package.json +1 -1
|
@@ -197,28 +197,65 @@
|
|
|
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
|
+
/* Named twice on purpose. A group almost always carries a row class as well
|
|
232
|
+
(.b-logo-wall is the usual one), and those are defined later in this layer,
|
|
233
|
+
so at equal specificity they were winning: the wall's justify-content
|
|
234
|
+
centred each group inside its floored width and the two dead ends met at
|
|
235
|
+
the seam as one wide hole, which is the bug the group was added to fix.
|
|
236
|
+
The three properties that make a marquee a marquee are not the row's to
|
|
237
|
+
decide. The rhythm still is: set --b-marquee-gap. */
|
|
238
|
+
.b-marquee .b-marquee__group {
|
|
239
|
+
--b-marquee-gap: clamp(var(--b-space-6), 5vw, var(--b-space-12));
|
|
240
|
+
display: flex;
|
|
241
|
+
flex: none;
|
|
242
|
+
flex-wrap: nowrap;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: space-around;
|
|
245
|
+
gap: var(--b-marquee-gap);
|
|
246
|
+
min-width: 100cqi;
|
|
247
|
+
/* space-around leaves half a share at each end, so a seam is already half
|
|
248
|
+
plus half. The gap is a separate, fixed minimum that only applies BETWEEN
|
|
249
|
+
items, so without this the seam came up exactly one gap short of every
|
|
250
|
+
other space in the belt. Half at each end restores it. */
|
|
251
|
+
padding-inline: calc(var(--b-marquee-gap) / 2);
|
|
252
|
+
}
|
|
217
253
|
.b-marquee:hover .b-marquee__track { animation-play-state: paused; }
|
|
218
254
|
@keyframes b-marquee { to { translate: -50% 0; } }
|
|
219
255
|
@media (prefers-reduced-motion: reduce) {
|
|
220
256
|
.b-marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
|
|
221
257
|
.b-marquee__track { animation: none; }
|
|
258
|
+
.b-marquee .b-marquee__group { min-width: 0; }
|
|
222
259
|
}
|
|
223
260
|
|
|
224
261
|
/* ---- Quote card: a number, a sentence, and who said it -------------------
|