Skip to content

Allow custom css properties in tokenColors in theme.js #328

New issue

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

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

Already on GitHub? # to your account

Closed
saltcod opened this issue Mar 8, 2023 · 3 comments
Closed

Allow custom css properties in tokenColors in theme.js #328

saltcod opened this issue Mar 8, 2023 · 3 comments

Comments

@saltcod
Copy link

saltcod commented Mar 8, 2023

Hey Rodrigo!

Wondering if there's anything we can do to use custom properties in our tokenColours objects of the theme.js file.

The theme file is here:
https://github.com/supabase/supabase/blob/a59e76dd1d5345cda1e2f79f28597bc822e0f39d/apps/docs/codeHikeTheme.js

The issue is that we can use custom properties in colors: {} but not in tokenColors: [{}]

The values in tokenColors get computed to rgb before being output in inline styles. But that doesn't happen with the colors: {} values.

Any ideas?

CleanShot 2023-03-07 at 22 49 09@2x

@pomber
Copy link
Contributor

pomber commented Mar 10, 2023

Hi, it's not possible. It was kind of possible before v0.8.0 if you really need it. See this post: https://sdorra.dev/posts/2023-01-12-ch-dark-mode.

Do you need it for light/dark mode? or is another use case?

@gregnr
Copy link

gregnr commented Jun 4, 2023

IIUC, this should be fixed as of code-hike/lighter#25

@pomber
Copy link
Contributor

pomber commented Jun 5, 2023

IIUC, this should be fixed as of code-hike/lighter#25

True, official support with docs and everything is coming very soon. I'll close this one, you can track it with #271

@pomber pomber closed this as completed Jun 5, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants