@cube-drone/marquee-css 0.6.1 → 0.7.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/marquee.css +29 -3
- package/package.json +1 -1
package/marquee.css
CHANGED
|
@@ -398,16 +398,22 @@ big {
|
|
|
398
398
|
* resolves to 0). Full-bleed is what marquee means. */
|
|
399
399
|
display: inline-block;
|
|
400
400
|
width: 100%;
|
|
401
|
-
overflow: hidden;
|
|
402
|
-
white-space: nowrap;
|
|
403
401
|
vertical-align: bottom;
|
|
404
402
|
}
|
|
405
403
|
|
|
406
404
|
.mq-marquee-inner {
|
|
407
405
|
display: inline-block;
|
|
408
|
-
padding-left: 100%;
|
|
409
406
|
}
|
|
410
407
|
|
|
408
|
+
/* The scroll VIEWPORT (clip + single-line) and the OFF-SCREEN start position
|
|
409
|
+
* (padding-left: 100%) are the marquee equivalent of a reveal's from-frame:
|
|
410
|
+
* they exist only to be animated away. So, exactly like a reveal's hiding
|
|
411
|
+
* (SPEC animation contract #5), they must NOT live in base styles - a marquee
|
|
412
|
+
* whose animation never runs (reduced motion, a skip, an element never scrolled
|
|
413
|
+
* into view) would otherwise rest with its text parked off-screen right and
|
|
414
|
+
* simply vanish. At rest the marquee is plain, whole, wrapped, visible text;
|
|
415
|
+
* the clip and the off-screen offset attach only where the animation does. */
|
|
416
|
+
|
|
411
417
|
.mq-bounce,
|
|
412
418
|
.mq-jitter,
|
|
413
419
|
.mq-wave,
|
|
@@ -493,7 +499,13 @@ big {
|
|
|
493
499
|
animation-delay: calc(var(--mq-o, 0) * (-1.2s / max(var(--mq-rate, 1), 1)));
|
|
494
500
|
}
|
|
495
501
|
|
|
502
|
+
.mq-marquee {
|
|
503
|
+
overflow: hidden;
|
|
504
|
+
white-space: nowrap;
|
|
505
|
+
}
|
|
506
|
+
|
|
496
507
|
.mq-marquee-inner {
|
|
508
|
+
padding-left: 100%;
|
|
497
509
|
animation: mq-marquee calc(16s / max(var(--mq-speed, 1), 1)) linear infinite;
|
|
498
510
|
}
|
|
499
511
|
|
|
@@ -630,6 +642,20 @@ big {
|
|
|
630
642
|
animation: none;
|
|
631
643
|
}
|
|
632
644
|
|
|
645
|
+
/* A skip stills motion AND shows the whole text plainly (contract #2). For a
|
|
646
|
+
* marquee that means undoing the scroll viewport too, not just the animation:
|
|
647
|
+
* without this the strip stops but stays parked off-screen right (padding-left:
|
|
648
|
+
* 100%, clipped by overflow), i.e. the words vanish. Drop the clip and the
|
|
649
|
+
* offset so the run rests as plain, whole, visible text. */
|
|
650
|
+
[data-mq-skip] .mq-marquee {
|
|
651
|
+
overflow: visible;
|
|
652
|
+
white-space: normal;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
[data-mq-skip] .mq-marquee-inner {
|
|
656
|
+
padding-left: 0;
|
|
657
|
+
}
|
|
658
|
+
|
|
633
659
|
/* ---- layouts: picked, not authored ---- */
|
|
634
660
|
|
|
635
661
|
.mq-page {
|