studio-engine 0.54.1 → 0.55.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +27 -0
- data/app/assets/tailwind/studio_engine/engine-motion.css +83 -27
- data/app/views/style/_tricks.html.erb +11 -15
- data/lib/studio/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 203b2f8cf1001d19c7ffb24c778ab0f1bdcb0b9aafa59762ded0ea5689eb2423
|
|
4
|
+
data.tar.gz: a6dbf4164a79cd6b5de2a9cbee178e5455e55c619dfa7197f0db08ba398aaf5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0bb5c9bebe4977fef13ab139729ebbc5c560b52f31e573d153e63a00a8a40b970519ac783ad51b45773661e182f5dc848e424b4922e5748117c29560fdfc2b20
|
|
7
|
+
data.tar.gz: 4e16f3663bb43a61139cac420af9a2c265f91c5c5a6f708c32edf1ad5d1e92c6a559b545b148b4e134afe90d614a81de527906988a122b8326b9ae9ef881e6be
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,33 @@ The format is [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). This pro
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **`.studio-team-glow` rings a host that paints its own background**, and can
|
|
10
|
+
carry **two colors**.
|
|
11
|
+
|
|
12
|
+
The ring previously needed an opaque CHILD in front to cover its middle,
|
|
13
|
+
because both wedge layers are pseudo-elements at `z-index: -1 / -2` and CSS
|
|
14
|
+
paints an element's background BEFORE its negative-z descendants. A live board
|
|
15
|
+
card cannot supply that child: Turbo targets the card element itself for
|
|
16
|
+
replace and remove, so a wrapper host is orphaned every time a card leaves the
|
|
17
|
+
board. The primitive now cuts the host's own box out of both layers
|
|
18
|
+
(`padding` + `mask-composite`, the trick §1's `.studio-border-glow` already
|
|
19
|
+
used), so the ring works on the card directly.
|
|
20
|
+
|
|
21
|
+
**No-op for the wrapper shape** — its child was already covering that
|
|
22
|
+
interior. Verified side by side against both live consumers
|
|
23
|
+
(`style/_modal_specimen` and the hub's release-phase-meter): pixel-equivalent
|
|
24
|
+
before and after.
|
|
25
|
+
|
|
26
|
+
`--studio-team-glow-color-b` colors the SECOND of the two opposed wedges and
|
|
27
|
+
defaults to the first, so one-color callers see no change and a caller with a
|
|
28
|
+
pair to show — a Pokémon's two types — gets one per wedge.
|
|
29
|
+
|
|
30
|
+
The bloom twin needed care: a mask applies AFTER a filter, so its box carries a
|
|
31
|
+
transparent border twice the blur radius and its wedges stop at the padding
|
|
32
|
+
box. Without that room the halo ends on a hard line at its own edge.
|
|
33
|
+
|
|
7
34
|
### Fixed
|
|
8
35
|
|
|
9
36
|
- **`.conic-surface` keeps its wash inside its own box.** The wash was an
|
|
@@ -507,38 +507,56 @@
|
|
|
507
507
|
}
|
|
508
508
|
|
|
509
509
|
/* =============================================================================
|
|
510
|
-
9b. studio-team-glow —
|
|
510
|
+
9b. studio-team-glow — rotating "selected card" ring glow, one or two colors
|
|
511
511
|
Ported from turf-monster's per-team selected-card glow (.holo-border-glow):
|
|
512
|
-
a
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
512
|
+
a conic-gradient ring rotates around the element's edge, with a blurred bloom
|
|
513
|
+
twin behind it. DISTINCT from .studio-border-glow (an animated RAINBOW border)
|
|
514
|
+
and .studio-glow (a static soft box-shadow halo) — this is the "this card is
|
|
515
|
+
selected / live" ring.
|
|
516
516
|
|
|
517
517
|
The color is a CSS var (default the CTA role, so purple on McRitchie Studio),
|
|
518
|
-
just like TM's per-team --glow-c.
|
|
518
|
+
just like TM's per-team --glow-c. TWO opposed wedges travel the edge, and they
|
|
519
|
+
can carry two colors: --studio-team-glow-color-b defaults to the first, so a
|
|
520
|
+
one-color caller sees no change, and a caller with a pair to show (a Pokémon's
|
|
521
|
+
two types) gets one per wedge. The wedges are swept by animating a registered
|
|
519
522
|
@property angle (rotating the GRADIENT, not the element — so no oversized-child
|
|
520
523
|
clipping trick is needed). Opacity is a var (--studio-team-glow-opacity) with a
|
|
521
524
|
transition, so a consumer can fade the glow in/out (the living style guide
|
|
522
525
|
slides it between step cards as a modal's step machine advances).
|
|
523
526
|
|
|
524
|
-
THE HOST
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
527
|
+
THE HOST MAY CARRY ITS OWN BACKGROUND — the ring cuts the host's box out of
|
|
528
|
+
both wedge layers, so only the band around the edge paints. That hole is what
|
|
529
|
+
makes the primitive work in the two shapes its consumers need:
|
|
530
|
+
|
|
531
|
+
· the WRAPPER shape (TM's holo-wrap / holo-card split) — a bare host with an
|
|
532
|
+
opaque child in front. The engine's style/_modal_specimen and the hub's
|
|
533
|
+
release-phase-meter both ship this. Unchanged by the hole: the child was
|
|
534
|
+
already covering that interior.
|
|
535
|
+
· the CARD shape — the host IS the opaque surface. This is what a live board
|
|
536
|
+
card needs, because it cannot take a wrapper at all: Turbo targets the card
|
|
537
|
+
element for both replace and remove, so a wrapper is orphaned every time a
|
|
538
|
+
card leaves the board.
|
|
539
|
+
|
|
540
|
+
Without the hole the card shape is impossible, and not for a tunable reason:
|
|
541
|
+
both layers are pseudo-elements at z-index -1 / -2, and CSS paints an element's
|
|
542
|
+
own background FIRST, then its negative-z descendants ON TOP of it (CSS 2.1
|
|
543
|
+
Appendix E, steps 1 and 2) — so a background on the host is covered BY the
|
|
544
|
+
wedges, and the ring becomes a wash across the whole face. Only a child, or
|
|
545
|
+
this hole, can cover the middle.
|
|
546
|
+
|
|
547
|
+
The host must still NOT be clipped by an overflow-hidden ancestor near its
|
|
548
|
+
border, or the ring is cut off with it.
|
|
549
|
+
|
|
550
|
+
Usage: <div class="studio-team-glow rounded-xl bg-surface p-5">Selected</div>
|
|
551
|
+
wrapper shape, when the face is its own element:
|
|
552
|
+
<div class="studio-team-glow rounded-xl">
|
|
553
|
+
<div class="rounded-xl bg-surface p-5">Selected</div>
|
|
554
|
+
</div>
|
|
555
|
+
red glow: style="--studio-team-glow-color: #E11D48"
|
|
556
|
+
two types: style="--studio-team-glow-color: #F08030;
|
|
557
|
+
--studio-team-glow-color-b: #6890F0"
|
|
558
|
+
Tune: --studio-team-glow-color / -color-b / -opacity / -speed / -thickness /
|
|
559
|
+
-bloom
|
|
542
560
|
========================================================================== */
|
|
543
561
|
@property --studio-team-glow-angle {
|
|
544
562
|
syntax: "<angle>";
|
|
@@ -547,6 +565,11 @@
|
|
|
547
565
|
}
|
|
548
566
|
.studio-team-glow {
|
|
549
567
|
--studio-team-glow-color: var(--color-cta);
|
|
568
|
+
/* The SECOND wedge's color. Defaults to the first, so a one-color caller sees
|
|
569
|
+
no change; a caller with two colors to show (a Pokémon's two types, a pair of
|
|
570
|
+
brand colors) gets one per wedge. Resolved on this element, so an inline
|
|
571
|
+
--studio-team-glow-color override feeds this default too. */
|
|
572
|
+
--studio-team-glow-color-b: var(--studio-team-glow-color);
|
|
550
573
|
--studio-team-glow-opacity: 1;
|
|
551
574
|
--studio-team-glow-speed: 4s;
|
|
552
575
|
--studio-team-glow-thickness: 4px;
|
|
@@ -571,14 +594,47 @@
|
|
|
571
594
|
var(--studio-team-glow-color) 12%,
|
|
572
595
|
transparent 33%,
|
|
573
596
|
transparent 50%,
|
|
574
|
-
var(--studio-team-glow-color) 62%,
|
|
597
|
+
var(--studio-team-glow-color-b) 62%,
|
|
575
598
|
transparent 83%
|
|
576
599
|
);
|
|
577
600
|
animation: studio-team-glow-spin var(--studio-team-glow-speed) linear infinite;
|
|
601
|
+
/* THE HOST'S OWN BOX IS PUNCHED OUT of both wedge layers, so what paints is the
|
|
602
|
+
band around the edge and nothing else. `padding` makes each layer's CONTENT
|
|
603
|
+
box exactly the host's box; mask-composite then removes that box from the
|
|
604
|
+
layer — the same mask trick §1's .studio-border-glow uses.
|
|
605
|
+
Why it is here: an opaque child in front covers the middle only when the host
|
|
606
|
+
CAN take a child. A live board card cannot — Turbo targets the card element
|
|
607
|
+
itself for replace and remove, so a wrapper is orphaned on every remove. With
|
|
608
|
+
the hole cut here the ring rides the card directly. For a wrapper host this
|
|
609
|
+
changes nothing visible: the child was already covering that interior. */
|
|
610
|
+
padding: var(--studio-team-glow-thickness);
|
|
611
|
+
-webkit-mask:
|
|
612
|
+
linear-gradient(#000 0 0) content-box,
|
|
613
|
+
linear-gradient(#000 0 0);
|
|
614
|
+
-webkit-mask-composite: xor;
|
|
615
|
+
mask:
|
|
616
|
+
linear-gradient(#000 0 0) content-box,
|
|
617
|
+
linear-gradient(#000 0 0);
|
|
618
|
+
mask-composite: exclude;
|
|
578
619
|
}
|
|
579
620
|
.studio-team-glow::after {
|
|
580
|
-
/* Blurred bloom twin, a touch larger
|
|
581
|
-
|
|
621
|
+
/* Blurred bloom twin, a touch larger: its wedges reach 4px PAST the ring, which
|
|
622
|
+
is what makes the bloom read as a halo, not a soft edge on the ring. Drop the
|
|
623
|
+
4px and every WRAPPER consumer's ring visibly lightens (measured: 26% of the
|
|
624
|
+
pixels on style/_modal_specimen, 13% on the hub's release-phase-meter). The
|
|
625
|
+
box then carries a transparent BORDER of bloom-reach on top of that, and the
|
|
626
|
+
mask still holes out the host's box — so the blur
|
|
627
|
+
spreads outward into that reach and is cut where it has already faded, while
|
|
628
|
+
the inward half is cut at the host's edge (invisible: that edge is either the
|
|
629
|
+
card's own or the wrapper child's). Mask applies AFTER filter, which is why
|
|
630
|
+
the reach has to out-measure the blur — without it the halo ends on a hard
|
|
631
|
+
line at the layer's own box. */
|
|
632
|
+
inset: calc(-1 * (var(--studio-team-glow-thickness) + 4px + var(--studio-team-glow-bloom) * 2));
|
|
633
|
+
padding: calc(var(--studio-team-glow-thickness) + 4px);
|
|
634
|
+
border: calc(var(--studio-team-glow-bloom) * 2) solid transparent;
|
|
635
|
+
/* The wedges stop at the padding box (host + ring + the 4px); the border is empty
|
|
636
|
+
room the blur is allowed to spread into. */
|
|
637
|
+
background-clip: padding-box;
|
|
582
638
|
z-index: -2;
|
|
583
639
|
filter: blur(var(--studio-team-glow-bloom)) saturate(1.35);
|
|
584
640
|
}
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
<h3 class="text-xl font-bold text-heading">Effects</h3>
|
|
273
273
|
<p class="text-muted text-sm">
|
|
274
274
|
The <code class="font-mono text-2xs">engine-motion.css</code> visual-effect primitives beyond motion -
|
|
275
|
-
gradient text, a soft glow halo, a
|
|
275
|
+
gradient text, a soft glow halo, a one- or two-color rotating <strong>selection glow</strong>
|
|
276
276
|
(ported from Turf Monster's selected-team-card ring), frosted glass, and a conic wash. Each is
|
|
277
277
|
themed through the role tokens and tunable via CSS-var knobs.
|
|
278
278
|
</p>
|
|
@@ -297,22 +297,18 @@
|
|
|
297
297
|
</div>
|
|
298
298
|
<% end %>
|
|
299
299
|
|
|
300
|
-
<%# The
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
engine-motion.css §9b. %>
|
|
300
|
+
<%# The CARD shape: the host carries its own background and the ring still
|
|
301
|
+
rings, because the primitive punches the host's box out of both wedge
|
|
302
|
+
layers. The WRAPPER shape (bare host + opaque child) is staged by the
|
|
303
|
+
Modals section's glow cards — both are documented in engine-motion.css
|
|
304
|
+
§9b. Two wedges travel the edge, so a pair of colors reads as a pair. %>
|
|
306
305
|
<%= render layout: "style/specimen",
|
|
307
|
-
locals: { klass: ".studio-team-glow (
|
|
308
|
-
usage: %(<div class="studio-team-glow rounded-xl">\n
|
|
306
|
+
locals: { klass: ".studio-team-glow (knobs: --studio-team-glow-color / -color-b)",
|
|
307
|
+
usage: %(<div class="studio-team-glow rounded-xl bg-surface p-5">Selected</div>\n<div class="studio-team-glow rounded-xl bg-surface p-5"\n style="--studio-team-glow-color: #F08030; --studio-team-glow-color-b: #6890F0">Fire / Flying</div>) } do %>
|
|
309
308
|
<div class="flex flex-wrap items-center justify-center gap-6">
|
|
310
|
-
<div class="studio-team-glow rounded-xl">
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
<div class="studio-team-glow rounded-xl" style="--studio-team-glow-color: #E11D48">
|
|
314
|
-
<div class="rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center">Ravens</div>
|
|
315
|
-
</div>
|
|
309
|
+
<div class="studio-team-glow rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center">Selected</div>
|
|
310
|
+
<div class="studio-team-glow rounded-xl bg-surface border border-subtle px-5 py-4 text-sm font-semibold text-heading text-center"
|
|
311
|
+
style="--studio-team-glow-color: #F08030; --studio-team-glow-color-b: #6890F0">Fire / Flying</div>
|
|
316
312
|
</div>
|
|
317
313
|
<% end %>
|
|
318
314
|
|
data/lib/studio/version.rb
CHANGED