Restore the mythic aura outline in production builds
Lightning CSS dropped mask-composite after the mask shorthand, so the crown and glow filled their whole area in production only. The exclusion now lives in the shorthand, with an E2E on the built site and a guard on the source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
361c4951ae
commit
33eda986e5
3 changed files with 15 additions and 2 deletions
|
|
@ -1062,6 +1062,10 @@ test("administrator navigates sections, manages mythic content and previews visu
|
||||||
expect(cardGlowVisual.map(({ side }) => side)).toEqual(["back", "face"]);
|
expect(cardGlowVisual.map(({ side }) => side)).toEqual(["back", "face"]);
|
||||||
for (const glow of cardGlowVisual) expect(glow).toMatchObject({ display: "block", backface: "hidden", animation: "nebula-opening-card-glow-palette-in" });
|
for (const glow of cardGlowVisual) expect(glow).toMatchObject({ display: "block", backface: "hidden", animation: "nebula-opening-card-glow-palette-in" });
|
||||||
for (const glow of cardGlowVisual) expect(glow.background).toContain("conic-gradient");
|
for (const glow of cardGlowVisual) expect(glow.background).toContain("conic-gradient");
|
||||||
|
// La couronne et la lueur ne colorent que le contour : sans cette exclusion, qu'un minifieur peut retirer, l'aura remplit toute la zone.
|
||||||
|
const maskComposites = await mythicSurface.locator(":scope > .nebula-card-opening-crown-palette, :scope > .nebula-card-opening-glow-palette").evaluateAll((elements) => elements.map((element) => globalThis.getComputedStyle(element).maskComposite));
|
||||||
|
expect(maskComposites).toHaveLength(2);
|
||||||
|
for (const composite of maskComposites) expect(composite).toMatch(/^exclude\b/);
|
||||||
const mythicAuraPalettes = mythicSurface.locator(":scope > .nebula-card-opening-aura-palette, :scope > .nebula-card-opening-crown-palette");
|
const mythicAuraPalettes = mythicSurface.locator(":scope > .nebula-card-opening-aura-palette, :scope > .nebula-card-opening-crown-palette");
|
||||||
await expect(mythicAuraPalettes).toHaveCount(2);
|
await expect(mythicAuraPalettes).toHaveCount(2);
|
||||||
const auraPaletteVisual = await mythicSurface.locator(":scope > .nebula-card-opening-aura-palette").evaluate((element) => {
|
const auraPaletteVisual = await mythicSurface.locator(":scope > .nebula-card-opening-aura-palette").evaluate((element) => {
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,14 @@ const baseCatalog = prepareVersionedCatalog(rawCatalog);
|
||||||
const TEST_MYTHIC_VARIATIONS = [{ editionId: "mythic-card-pull-spectral-prism-solar", cardId: "mythic-card-pull", finishId: "spectral-prism-solar", status: "active" }];
|
const TEST_MYTHIC_VARIATIONS = [{ editionId: "mythic-card-pull-spectral-prism-solar", cardId: "mythic-card-pull", finishId: "spectral-prism-solar", status: "active" }];
|
||||||
const catalog = buildPublishedCatalog(baseCatalog, { variations: TEST_MYTHIC_VARIATIONS, collectionStates: INITIAL_COLLECTION_STATES, dropRates: INITIAL_DROP_RATES });
|
const catalog = buildPublishedCatalog(baseCatalog, { variations: TEST_MYTHIC_VARIATIONS, collectionStates: INITIAL_COLLECTION_STATES, dropRates: INITIAL_DROP_RATES });
|
||||||
|
|
||||||
|
test("Sokko TCG styles keep mask compositions in a form the production minifier preserves", async () => {
|
||||||
|
const styles = await readFile("website/src/styles/_nebula-cards.scss", "utf8");
|
||||||
|
// Lightning CSS retire un mask-composite séparé qui suit le raccourci mask : l'effet n'apparaît alors qu'en production.
|
||||||
|
for (const rule of styles.split("\n").filter((line) => /(^|[\s;{])mask:/.test(line))) {
|
||||||
|
assert.doesNotMatch(rule, /mask-composite:/, rule.slice(0, 80));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
test("Sokko TCG uses design system dropdowns instead of native selects", async () => {
|
test("Sokko TCG uses design system dropdowns instead of native selects", async () => {
|
||||||
const entries = await readdir("website/src/features/cards", { recursive: true });
|
const entries = await readdir("website/src/features/cards", { recursive: true });
|
||||||
const sources = entries.filter((entry) => entry.endsWith(".jsx"));
|
const sources = entries.filter((entry) => entry.endsWith(".jsx"));
|
||||||
|
|
|
||||||
|
|
@ -117,7 +117,8 @@
|
||||||
.nebula-card-reveal::after { position: absolute; z-index: 0; inset: -48px; display: none; content: ""; border: 3px solid color-mix(in srgb, var(--opening-aura, transparent) 72%, transparent); border-radius: 58px; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--opening-aura, transparent) 68%, transparent) 0%, color-mix(in srgb, var(--opening-aura, transparent) 34%, transparent) 42%, transparent 72%); box-shadow: 0 0 28px color-mix(in srgb, var(--opening-aura, transparent) 78%, transparent), 0 0 64px color-mix(in srgb, var(--opening-aura, transparent) 48%, transparent); opacity: 0; pointer-events: none; filter: blur(3px) saturate(1.24); transform: scale(0.86); }
|
.nebula-card-reveal::after { position: absolute; z-index: 0; inset: -48px; display: none; content: ""; border: 3px solid color-mix(in srgb, var(--opening-aura, transparent) 72%, transparent); border-radius: 58px; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--opening-aura, transparent) 68%, transparent) 0%, color-mix(in srgb, var(--opening-aura, transparent) 34%, transparent) 42%, transparent 72%); box-shadow: 0 0 28px color-mix(in srgb, var(--opening-aura, transparent) 78%, transparent), 0 0 64px color-mix(in srgb, var(--opening-aura, transparent) 48%, transparent); opacity: 0; pointer-events: none; filter: blur(3px) saturate(1.24); transform: scale(0.86); }
|
||||||
.nebula-card-opening-aura-palette, .nebula-card-opening-crown-palette { position: absolute; z-index: 1; inset: -48px; display: none; box-sizing: border-box; border-radius: 58px; background: var(--opening-aura-gradient); opacity: 0; pointer-events: none; filter: blur(3px) saturate(1.24); transform: scale(0.86); }
|
.nebula-card-opening-aura-palette, .nebula-card-opening-crown-palette { position: absolute; z-index: 1; inset: -48px; display: none; box-sizing: border-box; border-radius: 58px; background: var(--opening-aura-gradient); opacity: 0; pointer-events: none; filter: blur(3px) saturate(1.24); transform: scale(0.86); }
|
||||||
.nebula-card-opening-aura-palette { mask-image: radial-gradient(ellipse at center, black 0%, rgba(0, 0, 0, 0.48) 42%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse at center, black 0%, rgba(0, 0, 0, 0.48) 42%, transparent 72%); }
|
.nebula-card-opening-aura-palette { mask-image: radial-gradient(ellipse at center, black 0%, rgba(0, 0, 0, 0.48) 42%, transparent 72%); -webkit-mask-image: radial-gradient(ellipse at center, black 0%, rgba(0, 0, 0, 0.48) 42%, transparent 72%); }
|
||||||
.nebula-card-opening-crown-palette { padding: 3px; mask: linear-gradient(black 0 0) content-box, linear-gradient(black 0 0); mask-composite: exclude; -webkit-mask: linear-gradient(black 0 0) content-box, linear-gradient(black 0 0); -webkit-mask-composite: xor; }
|
// L'exclusion reste dans le raccourci : un mask-composite séparé est retiré par le minifieur du build, qui génère aussi les variantes -webkit-.
|
||||||
|
.nebula-card-opening-crown-palette { padding: 3px; mask: linear-gradient(black 0 0) content-box exclude, linear-gradient(black 0 0); }
|
||||||
.nebula-card-reveal[data-reveal-phase="aura"]::after { display: block; animation: nebula-opening-aura var(--opening-aura-duration) ease-out both; }
|
.nebula-card-reveal[data-reveal-phase="aura"]::after { display: block; animation: nebula-opening-aura var(--opening-aura-duration) ease-out both; }
|
||||||
.nebula-card-reveal[data-reveal-phase="revealing"]::after { display: block; animation: nebula-opening-aura-release var(--opening-particle-duration, 700ms) ease-out both; }
|
.nebula-card-reveal[data-reveal-phase="revealing"]::after { display: block; animation: nebula-opening-aura-release var(--opening-particle-duration, 700ms) ease-out both; }
|
||||||
.nebula-card-reveal[data-reveal-phase="aura"] :is(.nebula-card-opening-aura-palette, .nebula-card-opening-crown-palette) { display: block; animation: nebula-opening-aura var(--opening-aura-duration) ease-out both; }
|
.nebula-card-reveal[data-reveal-phase="aura"] :is(.nebula-card-opening-aura-palette, .nebula-card-opening-crown-palette) { display: block; animation: nebula-opening-aura var(--opening-aura-duration) ease-out both; }
|
||||||
|
|
@ -129,7 +130,7 @@
|
||||||
.nebula-card-reveal[data-aura-palette]::after { box-shadow: none; }
|
.nebula-card-reveal[data-aura-palette]::after { box-shadow: none; }
|
||||||
.nebula-card-reveal[data-aura-palette] .nebula-card-tilt-surface { filter: none !important; animation: none !important; }
|
.nebula-card-reveal[data-aura-palette] .nebula-card-tilt-surface { filter: none !important; animation: none !important; }
|
||||||
// Halo de la couronne : la boîte déborde de 80px autour de la couronne et n'en garde que l'extérieur, comme un box-shadow.
|
// Halo de la couronne : la boîte déborde de 80px autour de la couronne et n'en garde que l'extérieur, comme un box-shadow.
|
||||||
.nebula-card-opening-glow-palette { position: absolute; z-index: 1; inset: -128px; display: none; padding: 80px; opacity: 0; pointer-events: none; transform: scale(0.86); mask: linear-gradient(black 0 0) border-box, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='58'/%3E%3C/svg%3E") content-box no-repeat; mask-composite: exclude; -webkit-mask: linear-gradient(black 0 0) border-box, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='58'/%3E%3C/svg%3E") content-box no-repeat; -webkit-mask-composite: xor; }
|
.nebula-card-opening-glow-palette { position: absolute; z-index: 1; inset: -128px; display: none; padding: 80px; opacity: 0; pointer-events: none; transform: scale(0.86); mask: linear-gradient(black 0 0) border-box exclude, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='100%25' height='100%25' rx='58'/%3E%3C/svg%3E") content-box no-repeat; }
|
||||||
.nebula-card-opening-glow-palette > span { position: absolute; inset: 80px; }
|
.nebula-card-opening-glow-palette > span { position: absolute; inset: 80px; }
|
||||||
.nebula-card-opening-glow-palette > span::before, .nebula-card-opening-glow-palette > span::after { position: absolute; inset: 0; content: ""; border-radius: 58px; background: var(--opening-aura-gradient); }
|
.nebula-card-opening-glow-palette > span::before, .nebula-card-opening-glow-palette > span::after { position: absolute; inset: 0; content: ""; border-radius: 58px; background: var(--opening-aura-gradient); }
|
||||||
.nebula-card-opening-glow-palette > span::before { opacity: 0.78; filter: blur(14px) saturate(1.24); }
|
.nebula-card-opening-glow-palette > span::before { opacity: 0.78; filter: blur(14px) saturate(1.24); }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue