Skip to content

feat: use style-dictionary for common styling across all webs#263

Merged
dsiguero merged 4 commits into
mainfrom
move-style-dictionary-here
Aug 18, 2025
Merged

feat: use style-dictionary for common styling across all webs#263
dsiguero merged 4 commits into
mainfrom
move-style-dictionary-here

Conversation

@dsiguero
Copy link
Copy Markdown
Member

@dsiguero dsiguero commented Aug 15, 2025

It's a WIP for now, because there are some questions we need to answer:

  1. Do we want to commit the generated files to the repo? I'd say yes, mostly for reference?
  • If we do, then we need to include them into dist/ at buildtime (hence the fugly cp commands in package.json). Open to alternatives.
  • If we don't, we can tell style-dictionary to output them directly into dist/.
  1. Do we want to have a single folder (ie: theme) rather than 2 (theme for Mantine and styles for CSS) to avoid polluting this repo? Probably, right?

But, it works!

(Might need to tweak something in VSCode so the Tailwind IntelliSense picks them up though.)

Screenshot 2025-08-16 at 00 28 50

Forgot to mention the generated .ts file (for Mantine) is automatically bundled in dist (because it's .ts), so we wouldn't need to copy it to theme/

Comment thread package.json
"types": "./dist/pricing/index.d.ts"
}
},
"./styles/*.css": "./dist/styles/*.css"
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This should cover any other styling we want to apply across both webs (ie: fonts).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Curiosity: why is this export like this i.e. *.css ?

Also, are we missing the .theme export?

Comment thread package.json
"@types/node": "^22.10.10",
"@types/react": "^19.1.9",
"@vitest/eslint-plugin": "^1.1.36",
"clsx": "^2.1.1",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There were some dependencies out-of-order and they were put in their place (alphabetically) when installing tinycolor2 and style-dictionary.

@dsiguero dsiguero marked this pull request as draft August 15, 2025 22:32
@dsiguero dsiguero marked this pull request as ready for review August 18, 2025 12:42
@dsiguero dsiguero changed the title [WIP] feat: use style-dictionary for common styling across all webs feat: use style-dictionary for common styling across all webs Aug 18, 2025
* main:
  chore(dev-deps): Update dependency @mantine/core to v8.2.5 (#264)
  chore(dev-deps): Update dependency @types/node to v22.17.2 (#262)
Comment thread package.json
"import": "./dist/theme/index.js",
"types": "./dist/theme/index.d.ts"
},
"./styles": "./dist/styles/index.css",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've defined ./styles and ./styles/*.css because in TS we can either import the index.ts or whatever the index exports, but there's nothing like that in CSS, so this allows us to either import the index.css (w/o being explicit): @import '@notifycal/shared/styles'; or a .css file within styles/ if we don't want everything.

@dsiguero dsiguero merged commit eff4634 into main Aug 18, 2025
2 checks passed
@dsiguero dsiguero deleted the move-style-dictionary-here branch August 18, 2025 12:48
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.

2 participants