Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow disable color vars, radius, global styles #5

Merged
merged 4 commits into from
May 11, 2024

Conversation

NamesMT
Copy link
Contributor

@NamesMT NamesMT commented May 10, 2024

Description

This would allow user to config the color variables in css file, as well as finer control over the global styles behavior

Linked Issues

Related / Resolves #3

Additional context

Copy link

vercel bot commented May 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unocss-preset-shadcn-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 11, 2024 6:30am

src/types.ts Outdated Show resolved Hide resolved
src/generate.ts Outdated Show resolved Hide resolved
@NamesMT NamesMT force-pushed the flexible-configs branch from 50aaa5d to 9538621 Compare May 11, 2024 05:36
@NamesMT NamesMT changed the title feat: more flexible configs: disable color vars, disable global styles feat: finer controls: allow disable color vars, radius, global styles May 11, 2024
@NamesMT
Copy link
Contributor Author

NamesMT commented May 11, 2024

Hi @hyoban, I just force pushed the PR with the following changes:

  • Change null to false
  • Also allowing to disable radius with false when in combination with color
  • DRYing colorCSSVarsStyles's return
  • Rebased to main to resolve conflict

src/index.ts Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
@NamesMT
Copy link
Contributor Author

NamesMT commented May 11, 2024

@hyoban I have added the missing default for globals and added tests.
I also moved test snapshots to a sub directory and ignore them in eslint, is that ok?

@hyoban
Copy link
Owner

hyoban commented May 11, 2024

LGTM, Thank you so much for your contribution.

@hyoban hyoban merged commit e68464b into hyoban:main May 11, 2024
7 checks passed
@hyoban hyoban changed the title feat: finer controls: allow disable color vars, radius, global styles feat: allow disable color vars, radius, global styles May 11, 2024
@hyoban
Copy link
Owner

hyoban commented May 11, 2024

Released at 0.3.0, you can give it a try.

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.

Add support for custom theming with css variables in a css file
2 participants