@cube-drone/marquee-css 0.2.0 → 0.4.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 +103 -0
- package/package.json +1 -1
package/marquee.css
CHANGED
|
@@ -77,6 +77,35 @@
|
|
|
77
77
|
font-size: 0.75em;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
/* ---- :::center / :::right / :::left - the <center> tag back from the
|
|
81
|
+
dead, with siblings. Inline content aligns via text-align; block
|
|
82
|
+
children that size themselves (tables) follow via margins. Physical
|
|
83
|
+
directions on purpose. ---- */
|
|
84
|
+
|
|
85
|
+
.mq-center {
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mq-right {
|
|
90
|
+
text-align: right;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mq-left {
|
|
94
|
+
text-align: left;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mq-center .mq-table {
|
|
98
|
+
margin-inline: auto;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.mq-right .mq-table {
|
|
102
|
+
margin-left: auto;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mq-left .mq-table {
|
|
106
|
+
margin-right: auto;
|
|
107
|
+
}
|
|
108
|
+
|
|
80
109
|
/* ---- tables: paragraph-rows and [c] cells (SPEC.md, "Tables") ---- */
|
|
81
110
|
|
|
82
111
|
.mq-table {
|
|
@@ -94,6 +123,51 @@
|
|
|
94
123
|
background: rgba(127, 127, 127, 0.12);
|
|
95
124
|
}
|
|
96
125
|
|
|
126
|
+
/* ---- spoilers: content present, visually withheld. Zero-JS: blurred,
|
|
127
|
+
revealed on hover or focus. The element is focusable (tabindex=0), so a
|
|
128
|
+
tap focuses and reveals it on phones too, where there is no hover - :focus
|
|
129
|
+
(not :focus-visible) because touch focus matches the former, not the
|
|
130
|
+
latter. That's the best a static page can do. An interactive renderer
|
|
131
|
+
wraps the document in .mq-root and click-gates it instead - hover/focus no
|
|
132
|
+
longer reveal, a deliberate click does (and sets data-mq-revealed).
|
|
133
|
+
Degrades to plain visible text without the sheet, because a hidden spoiler
|
|
134
|
+
is worse than a shown one. ---- */
|
|
135
|
+
|
|
136
|
+
.mq-spoiler {
|
|
137
|
+
filter: blur(0.35em);
|
|
138
|
+
background: rgba(127, 127, 127, 0.22);
|
|
139
|
+
border-radius: 0.2em;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
transition: filter 0.12s ease;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mq-spoiler:hover,
|
|
145
|
+
.mq-spoiler:focus {
|
|
146
|
+
filter: none;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Under an interactive renderer: hover/focus must NOT reveal (a spoiler takes
|
|
150
|
+
a deliberate click); the click sets data-mq-revealed, which does. The
|
|
151
|
+
[data-mq-revealed] rule below is equal specificity but later, so a clicked
|
|
152
|
+
spoiler stays revealed even while it holds focus. */
|
|
153
|
+
.mq-root .mq-spoiler:hover,
|
|
154
|
+
.mq-root .mq-spoiler:focus {
|
|
155
|
+
filter: blur(0.35em);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.mq-root .mq-spoiler[data-mq-revealed] {
|
|
159
|
+
filter: none;
|
|
160
|
+
background: none;
|
|
161
|
+
cursor: text;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Block spoiler (`:::spoiler`): the same withholding, sized to a region -
|
|
165
|
+
an image, a paragraph - rather than a run of words. */
|
|
166
|
+
.mq-spoiler-block {
|
|
167
|
+
display: block;
|
|
168
|
+
padding: 0.5rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
97
171
|
/* ---- the color slot: validated author values, property mapping ours ---- */
|
|
98
172
|
|
|
99
173
|
.mq-color {
|
|
@@ -483,6 +557,35 @@ big {
|
|
|
483
557
|
* belong to the interactive renderer; this is the best-effort CSS reveal,
|
|
484
558
|
* same tier as every other effect.) */
|
|
485
559
|
|
|
560
|
+
/* ---- the interactive renderer's half of the animation contract.
|
|
561
|
+
Every rule here is inert without `.mq-js`, which only an interactive
|
|
562
|
+
renderer adds, and only AFTER mount - so a static page (or markup that
|
|
563
|
+
never hydrates) animates immediately, exactly as before. The hold exists
|
|
564
|
+
only where JavaScript is alive to release it: never a hostage situation.
|
|
565
|
+
|
|
566
|
+
`.mq-anim` marks an effect element; `[data-mq-play]` is the observer
|
|
567
|
+
saying "this one has been seen"; `[data-mq-skip]` on an ancestor is the
|
|
568
|
+
reader saying "enough" - which stills every effect and, because reveal
|
|
569
|
+
effects hide only inside their keyframes, shows all text whole. ---- */
|
|
570
|
+
|
|
571
|
+
.mq-js .mq-anim,
|
|
572
|
+
.mq-js .mq-anim .mq-l,
|
|
573
|
+
.mq-js .mq-anim .mq-marquee-inner {
|
|
574
|
+
animation-play-state: paused;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
.mq-js .mq-anim[data-mq-play],
|
|
578
|
+
.mq-js .mq-anim[data-mq-play] .mq-l,
|
|
579
|
+
.mq-js .mq-anim[data-mq-play] .mq-marquee-inner {
|
|
580
|
+
animation-play-state: running;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
[data-mq-skip] .mq-anim,
|
|
584
|
+
[data-mq-skip] .mq-anim .mq-l,
|
|
585
|
+
[data-mq-skip] .mq-anim .mq-marquee-inner {
|
|
586
|
+
animation: none;
|
|
587
|
+
}
|
|
588
|
+
|
|
486
589
|
/* ---- layouts: picked, not authored ---- */
|
|
487
590
|
|
|
488
591
|
.mq-page {
|