Skip to content

Feat: Tailwind to CSS Modules - #174

Open
anneke wants to merge 25 commits into
mainfrom
feat/tailwind-to-css
Open

anneke wants to merge 25 commits into
mainfrom
feat/tailwind-to-css

Conversation

@anneke

@anneke anneke commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

Changes styling of components to using CSS Modules, instead of Tailwind. (For React components)

Type of change

  • Fix
  • New feature / variant
  • Breaking change
  • Docs / repo tooling (no package code changed)
  • Chore / refactor

Checklist

  • pnpm build, pnpm lint, and pnpm format pass
  • Storybook story added/updated to cover the change (variants, sizes, states)
  • Changeset added (pnpm changeset) — required for any change to @surfnet/curve-react or @surfnet/curve-angular; N/A for docs/CI-only changes
  • React and Angular kept in parity, if applicable (contract updated in @surfnet/curve-contracts)

@anneke
anneke marked this pull request as draft September 14, 2026 16:25
@anneke
anneke force-pushed the feat/tailwind-to-css branch 6 times, most recently from da8d2a8 to ff9cd1d Compare September 21, 2026 07:56
@anneke
anneke force-pushed the feat/tailwind-to-css branch from ff9cd1d to 333c4e8 Compare September 22, 2026 12:29
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

♿ Accessibility audit — WCAG 2.2 AA

✅ No violations across 424 stories / 11872 theme·mode combinations in @surfnet/curve-angular, @surfnet/curve-react.

Automated axe covers ~30–50% of WCAG 2.2 AA. Keyboard, screen-reader and reflow checks still need a manual pass. Full per-story JSON is in the run’s a11y-reports artifact.

github-actions Bot added a commit that referenced this pull request Sep 22, 2026
github-actions Bot added a commit that referenced this pull request Sep 22, 2026
@anneke anneke changed the title Feat/tailwind to css Feat: Tailwind to CSS Modules Sep 28, 2026
@anneke anneke linked an issue Sep 28, 2026 that may be closed by this pull request
@anneke
anneke added this pull request to stack #203 September 28, 2026 15:09
@anneke
anneke marked this pull request as ready for review September 28, 2026 15:19
@anneke
anneke removed this pull request from stack #203 September 28, 2026 15:41
@anneke
anneke force-pushed the feat/tailwind-to-css branch from 1641137 to 74bad31 Compare September 29, 2026 13:07
@github-actions

Copy link
Copy Markdown
Contributor

@WDeenikSURF WDeenikSURF left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vind het allemaal een stuk leesbaarder worden zo, zeker de lines met tientallen Tailwind classnames ❤️

Heb obviously niet alle styles vergeleken, maar heb vertrouwen in de Playwright tests die je daarvoor hebt opgezet.

Flink wat comments, maar wat kan je verwachten met een PR als deze 😬 Niet alles relevant voor deze PR, maar heb ze maar neergepend, wel goed om een keer over te hebben. Wat wel relevant is is vaak ook relevant voor meerdere files, maar heb dingen niet herhaald als ik ze vaker zag.

Comment thread packages/react/docs/css-modules-pilot.md Outdated
@@ -0,0 +1,404 @@
/*! Reset based on tailwindcss v4.3.1 preflight | MIT License | https://tailwindcss.com */

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik zie in de apps dat we daar de preflight juist skippen omdat onze design system packages reset includen via deze file.

Ik vraag me af of dat later tot problemen zou kunnen leiden, als onze resets en de preflight van een app z'n tailwind niet meer in sync zijn door een versieverschil (en de app's tailwind resets verwacht die wij niet gebruiken, of andersom). Dit kan ook met andere styling oplossingen voorkomen overigens. Allebei de resets gebruiken kan ook vervelende gevolgen hebben.

Geen idee of daar een goede oplossing voor is overigens 🤔 Dit moet bij meer design systems / component libraries spelen zou je zeggen.

Maar goed eigenlijk buiten scope van deze PR, aangezien dit ook speelde met Tailwind zelf. Zie dat op de Tailwind repo iemand precies deze vraag stelt maar zonder reacties.

Comment on lines +2 to +4
* Designer- and app-facing semantic color utilities (Tailwind-like names).
* Maps to Curve token CSS variables — not generated by Tailwind.
* Layout/spacing utilities belong in the app or Storybook Tailwind entry.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kleine nitpick: ik zie nu in heel veels comments referenties naar dat we specifiek niet Tailwind gebruiken. Dat maakt sense in context van deze PR, maar voor de toekomst maakt het natuurlijk helemaal niet uit dat we eerst Tailwind gebruikten en nu niet meer.

Comment thread packages/angular/ng-package.json Outdated
'border-input dark:bg-input/30 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][data-matches-spartan-invalid=true]]:ring-destructive/20 has-[[data-slot][data-matches-spartan-invalid=true]]:border-destructive dark:has-[[data-slot][data-matches-spartan-invalid=true]]:ring-destructive/40 h-9 rounded-md border shadow-xs transition-[color,box-shadow] in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][data-matches-spartan-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pe-1.5 has-[>[data-align=inline-start]]:[&>input]:ps-1.5 group/input-group relative flex w-full min-w-0 items-center outline-none has-[>textarea]:h-auto',
);
// Styling lives in ./hlm-input-group.css; `group/input-group` stays as a hook for consumers' Tailwind.
classes(() => 'curve-input-group group/input-group');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idealiter hoeven we geen rekening te houden met of consumers Tailwind gebruiken, toch zie ik overal deze "hook for consumers' Tailwind" classnames. Kunnen we zonder? Als een hook als deze echt nodig is zodat de consumer dit component goed kan gebruiken (liever vermijden w.m.b.), is het beter om ze zelf custom classnames toe te kunnen laten voegen IMO

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik ben hier een beetje huiverig voor omdat dit een vraag is om aan de Angular-gebruikers te stellen. Ik stel voor om dit apart op te pakken

Comment on lines +115 to +116
* defining it here is the real source of truth and lets consumers override
* the base unit for their whole app.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and lets consumers override the base unit for their whole app

Willen we die flexibiliteit geven? "Dingen passen niet mooi op het scherm, maar als ik --spacing: 2px doe wel, let's go" lijkt me niet iets dat we willen?

Dat staat overigens los van of het überhaupt handig is om spacing aan rems te koppelen, maar dat is een hele andere discussie.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In zijn algemeenheid is het aanpassen van CSS variables al mogelijk toch, dus die flexibiliteit hebben ze? Dit lijkt me meer een stuk governance, hoe strak moet het Curve team controleren of het design systeem goed wordt gebruikt

Comment thread packages/react/src/vite-env.d.ts Outdated
Comment on lines +3 to +4
.sbdocs-content > ul,
.sbdocs-content > ol {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik zie deze styles ook langskomen in packages/storybook-config. Waarom gebruiken we die niet in de react/angular packages?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dit is styling voor Storybook zelf alleen, en daarmee niet een onderdeel van de packages :)

Comment thread AGENTS.md
- React and Angular each have a `*.spec.ts` that `toHaveScreenshot`s every story (light + dark).
Baselines live in separate folders: `tests/visual/__screenshots__/react/` and
`.../angular/` (same story ids, different PNGs — never share one flat directory).
- Refresh baselines with `pnpm test:visual:update`. Optional parity: `pnpm test:visual:parity`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Misschien goed om erbij te zetten dat baselines pas moeten worden bijgewerkt als zeker is dat de nieuw look intended is? Niet dat een AI agent de test als een probleem ziet en ipv de regressie te fixen de visuals update.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ik denk dat we die baseline sowieso zelf moeten refreshen handmatig.

Comment thread .github/workflows/preview-pages.yml Outdated
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
@SURFnet SURFnet deleted a comment from github-actions Bot Sep 30, 2026
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>
Signed-off-by: Anneke Sinnema <mail@annekesinnema.nl>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onderzoek: Gebruik CSS in plaats van Tailwind voor component styling

2 participants