mirror of
https://github.com/adobe/skills.git
synced 2026-09-19 08:06:09 +08:00
71b6007465
Pins SECTION scope: marker names matching data-section in the DOM, token redefinitions and default-content overrides grouped under the same marker, cascade verification, and orphan-section refusal. Total weight 100; refusal path 20 weight. Refs #147
1.6 KiB
1.6 KiB
Eval: four-scope CSS — SECTION classification
Setup
Stardust v0.10.0+ with Discipline 11 in prototype/SKILL.md.
A captured site with at least two sections needing token redefinition
— typically a hero with a brand-accent background plus a features
section with a different palette.
User prompt
"Render a prototype for the home page; hero section uses the accent palette, features section uses the neutral palette."
Expected behavior
The stardust:prototype skill is invoked. Phase 2 craft produces a
proposed file whose first <style> block:
- Carries a
/* === SECTION: hero === */marker before anysection[data-section="hero"] { ... }rule, with the marker's name (hero) matching the DOM'sdata-sectionattribute. - Places per-section token redefinition (e.g.,
--color-bg,--heading-xxl) inside the SECTION group. - Places per-section default-content overrides
(
section[data-section="hero"] > h1 { ... }) inside the same SECTION group (still classifies as section scope per Discipline 11; the > selector is allowed at section depth). - Carries a separate
/* === SECTION: features === */group with the features section's token redefinitions. - Cascade works: the hero's
h1resolvesvar(--heading-xxl)against the hero section's lifted value, not the global default. - Refuses to write when a section-scoped rule's SECTION marker
doesn't match the DOM's
data-sectionvalue (typo / orphaned section detection); the refusal names the unmatched section name and the nearest match by Levenshtein distance.