Skip to content

**NOT A WORKING COMMIT** Demo purpose branch to show possible solutions to TailwindCSS & Radix UI css variables issue - #11

Open
chanmSC wants to merge 1 commit into
mainfrom
demo/combined-tailwindcss-radix-css-variables
Open

chanmSC wants to merge 1 commit into
mainfrom
demo/combined-tailwindcss-radix-css-variables

Conversation

@chanmSC

@chanmSC chanmSC commented Oct 2, 2025 •

Copy link
Copy Markdown
Contributor

Note This branch is not a working solution, this PR is purely for easy diffs demo/discussion jumping off point of the theme variables management/use issue between TailwindCSS & Radix UI.

Things that need to be discussed/decided:

  • ✔️ CSS module elements would need to be rewritten with purely tailwindcss (not a discussion point, just something important to note) Not true, we can totally use css modules, and for more complex styling, I would recommend it, as it's a lot more legible/maintainable than super crazy long text strings
  • How to resolve the theme issue?
    • Should we combine style.css to export both the tailwindcss and radix css variables?
    • Do we need 2 separate CSS files for exported theme styles and docs styles?
    • What should be the procedure for overwriting theme variables?
  • ✔️ Some components aren't exporting/built
    • i.e. import { Badge } from '@australiansynchrotron/sci-comp-ui'
    • Can notice the missing exports from index.es.js (as in they're not there) This has been fixed now, it was because some vanilla shadcn components weren't being re-exported, we now do these direct handball exports clearly in src/shadcn.ts
  • ✔️ What happens when we have a custom version of an existing Radix component? If we extend a shadcn component (and there's no existing custom alternative), then we should treat it as a custom component, i.e. create ui component/element file, create doc example file, export it from src/index.ts
    • i.e. Buttons, Form Inputs
    • Should we prefer non-radix components, as they're less likely to visual/behaviourally change based on 3rd party (Radix UI) decisions Yes, because shadcn has already been adding non-radix-ui components, and have started adding components imported from other libraries, this won't be great for maintenance going ahead, so it's custom component without heavy external package dependencies should be preferred where possible
    • Should we agree on sth like Radix can be used for components without an existing custom component, and in situations where it's less of an issue if we need to upgrade Radix and they change those components visually/behaviourally)? Yes, this should be the main use case, and we've made it easier to support ppl using shadcn components without breaking changes when a custom version of the component is made with the @australiansynchrotron/sci-comp-ui vs @australiansynchrotron/sci-comp-ui/shadcn separate import paths (so ppl can migrate to our custom components in their own time)
  • ✔️ Should we be doubling up on Radix UI component docs? No, we shouldn't double up on shadcn vanilla component docs, we should only create & maintain docs for our custom components/elements, this will also apply for when we add testing later
    • Should we prefer non-radix components in the docs?
    • We should make a decided distinction between what components go into sci-comp-ui docs, and what we leave for ppl to refer to radix-ui docs?

Not a working solution, using this branch for demo/discussion jumping off point  of the theme variables management/use issue between TailwindCSS & Radix UI
@chanmSC chanmSC closed this Nov 12, 2026
@chanmSC chanmSC reopened this Nov 12, 2026
@chanmSC
chanmSC requested a review from a team November 12, 2026 06:50
@chanmSC

chanmSC commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

A bunch of decisions have been made in offline meeting between @stmudie @pcsmomo , with the actionable plan being:

  1. Re-export all vanilla shadcn components/elements into @sci-comp-ui/shadcn/ path Done in this PR
  2. Delete all the documentation & duplicate exports of vanilla shadcn components/elements Done in this PR
  3. Import (& compare) all current 3 global theme files
  4. Promote experiment components into either components/elements
  5. Add custom components/elements from respective monorepos
    a. Make sure we PR each other's components to check for differences/similarities

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.

1 participant