Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 3 KB

AGENTS.md

File metadata and controls

15 lines (13 loc) · 3 KB

AGENTS.md

This repository holds @plone/xmas-theme, a Plone Aurora theme, and a Plone Aurora app to develop and test it.

  • Use pnpm. Validate with make lint, pnpm typecheck, make build, and the acceptance tests (see the README).
  • @plone/xmas-theme, in packages/xmas-theme, is a theme on top of @plone/agave, with Tailwind and three skins (noel, the default, neve and dourado). The app of this repository loads it after the add-ons of @plone/aurora. The acceptance workflow of Plone Aurora runs this repository's acceptance tests against its own checkout: it is the real-world check of a theme built on Agave.
  • styles/tokens.css sets token values only, with zero specificity (:where()), on .app-slot, .content-area: the token contract of @plone/theming and Agave's tokens. Each skin is a :where([data-skin='<name>'] :is(.app-slot, .content-area)) rule after the default. styles/content.css styles the theme's own blocks, including their block theme properties. Plain CSS in both: no @layer, no Tailwind.
  • Don't re-declare the derived tokens (--border, --input, --muted, --muted-foreground): set --background and --foreground, or the --*-mix knobs. A block with its own colours is a block theme: its element carries data-surface="block" and sets --theme-color and --theme-foreground-color. @plone/layout sets --background, --foreground, --card, --muted-foreground and the derived tokens from them on the element, and paints it, so the element's own rules read the theme's tokens. The values may point at the roles, the brand and any other token, but never at those: on the element that is a cycle. A theme that needs the surrounding colours (the alert's tint of the page background) sets the values on a parent element.
  • The roles (--primary…) are set once. The header is a coloured band, so the theme sets its own --primary there (--header-primary).
  • styles/publicui.css extends Agave's Tailwind (@theme inline, @utility) and decorates the frame in @layer custom, reading tokens. It doesn't import Tailwind: Agave does.
  • Blocks don't set outer margins: the gap after a block is --block-spacing-after (@plone/layout).
  • components/ui/ comes from the shadcn CLI (components.json). After generating a component, run ESLint with --fix and Prettier, and import Slot from @radix-ui/react-slot, the version @plone/plate uses, instead of radix-ui.
  • The specs in acceptance/tests/xmas-theme.test.ts assert the theme's exact values. Change both together.
  • The theme needs Plone Aurora 1.0.0-alpha.32 or later (it loads styles/tokens.css); its peer dependencies say so. The acceptance workflow runs against the released packages and against Aurora main (make core, the core overlay, see the README). When a change needs an unreleased Aurora, raise the peer dependencies once it's released.
  • The acceptance helpers in acceptance/tests/ must stay self-contained (only @playwright/test and @plone/react-router): Plone Aurora's CI runs them from this repository.