chore(design-lint): tidy the colour test imports; control-height page-only; lazy-lcp title

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
garrytanandcapy-ai[bot] committed 2026-10-26 05:52:11 +00:00
1 parent 95b19fdbca
commit 95eee7e4e1
3 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -176,7 +176,7 @@ as `house-style`.
| `missing-states` | ask | 26b | no :active or :disabled state | all the states a control can be in |
| `missing-reduced-motion` | blocks | 27 | a keyframe or transform transition without a prefers-reduced-motion fallback | add @media (prefers-reduced-motion: reduce) |
| `autoplay-unmuted` | blocks | 28a | a video autoplaying without muted | autoplay muted loop playsinline |
| `lazy-lcp` | blocks | 28a | loading="lazy" on the first image | fetchpriority="high" on the LCP image |
| `lazy-lcp` | blocks | 28a | loading="lazy" on the first image or the hero video | fetchpriority="high" on the LCP image |
| `video-without-poster` | ask | 28b | a video without poster or a priority hint | add them |
| `input-state-shift` | blocks | 39a | input states that break: a border that changes width, a focus ring built from border, disabled by opacity alone | constant border, outline, shared height, three disabled channels |
| `control-height` | ask | 39b | control height outside 44 to 52px on a marketing page | the number |
+2 -2
View File
@@ -112,10 +112,10 @@ export const RULES: Record<string, RuleMeta> = {
'missing-states': { tier: 'ask', gate: '26b', title: 'no :active or :disabled state', fix: 'all the states a control can be in' },
'missing-reduced-motion': { tier: 'blocks', gate: '27', title: 'a keyframe or transform transition without a prefers-reduced-motion fallback', fix: 'add @media (prefers-reduced-motion: reduce)' },
'autoplay-unmuted': { tier: 'blocks', gate: '28a', title: 'a video autoplaying without muted', fix: 'autoplay muted loop playsinline' },
'lazy-lcp': { tier: 'blocks', gate: '28a', title: 'loading="lazy" on the first image', fix: 'fetchpriority="high" on the LCP image' },
'lazy-lcp': { tier: 'blocks', gate: '28a', title: 'loading="lazy" on the first image or the hero video', fix: 'fetchpriority="high" on the LCP image' },
'video-without-poster': { tier: 'ask', gate: '28b', title: 'a video without poster or a priority hint', fix: 'add them' },
'input-state-shift': { tier: 'blocks', gate: '39a', title: 'input states that break: a border that changes width, a focus ring built from border, disabled by opacity alone', fix: 'constant border, outline, shared height, three disabled channels' },
'control-height': { tier: 'ask', gate: '39b', title: 'control height outside 44 to 52px on a marketing page', fix: 'the number' },
'control-height': { tier: 'ask', gate: '39b', title: 'control height outside 44 to 52px on a marketing page', fix: 'the number', pageOnly: true },
'content-hidden-at-rest': { tier: 'blocks', gate: '62', title: 'a reveal class hiding content until JavaScript runs', fix: 'visible by default; hide only under a .js class, or animate from visible with @starting-style' },
// ── Assets and access ──
'emoji-decoration': { tier: 'blocks', gate: '30a', title: 'an emoji standing in for an icon', fix: 'one icon library, custom SVG, or typography' },
-2
View File
@@ -38,10 +38,8 @@ function lintPage(html: string, name = 'index.html'): { html: string; findings:
const byRule = (findings: Finding[], rule: string): Finding[] => findings.filter((f) => f.rule === rule);
const lines = (findings: Finding[]): string[] => findings.map(formatFinding);
import { buildContext } from '../lib/design-lint/static';
import { Reporter } from '../lib/design-lint/report';
import { run as runColor } from '../lib/design-lint/rules/color';
import type { TwItem } from '../lib/design-lint/tailwind';
describe('design-lint colour: purple-blue-gradient (2a, blocks)', () => {
test('a single-hue ramp and a repeating pattern are not findings', () => {