Files
livewire-material/tests/Fixtures/design-guard/scale/motion.js
T
Andreas Reinhold / reiniandClaude Sonnet 5 b243222e26 Match easing and duration Tailwind classes only in a class list
outsideTheScale() read ease-in/ease-out/ease-in-out/duration-* line by line
across every file, the way it still reads its other scale steps — but a
plain CSS keyword read out of an API into a JS string (matchMedia(…) ?
'linear' : 'ease-out') names a real value, not a Tailwind class, and the
same line scan read the words back out of a stylesheet test's own regex
literals (`ease-in`, `ease-out`) as if they were Tailwind too. Tested both
ways per the plan's instruction: Blade/PHP class lists have the identical
false-positive shape, so the two families move to FAMILIES, matched only
through a class list (literalClasses()/tailwindFamilyHint()) as the newer
families already are, in Blade and PHP as much as in JavaScript.

Plan step 42 (Phase F), Part B.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Qwx5USif3wFFmxtHg5U1g9
2026-09-15 09:31:01 +02:00

5 lines
357 B
JavaScript

// A plain CSS keyword read out of an API, not a Tailwind class: matches DesignGuard's easing and
// duration families only in a class list, never a bare JS string like this one.
const easing = matchMedia('(prefers-reduced-motion: reduce)').matches ? 'linear' : 'ease-out';
const duration = matchMedia('(prefers-reduced-motion: reduce)').matches ? 0 : 300;