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

[Feature]: CSS light-dark() output? #324

Closed
1 task
brian-patrick-3 opened this issue Oct 28, 2024 · 1 comment
Closed
1 task

[Feature]: CSS light-dark() output? #324

brian-patrick-3 opened this issue Oct 28, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@brian-patrick-3
Copy link

What feature would you like?

Having a light and a dark theme, is it possible to generate variables using the CSS light-dark() syntax?

Ex desired output:

:root {
  /* palette tokens */
  --kd-color-black: #000;
  --kd-color-white: #fff;
    
  /* named tokens */
  --kd-color-text: light-dark(var(--kd-color-black), var(--kd-color-white));
  --kd-color-background: light-dark(var(--kd-color-white), var(--kd-color-black));
}

If yes, how would we need to structure the tokens in tokens studio to get the right JSON output?

Would you be available to contribute this feature?

  • Yes, I would like to contribute this
@brian-patrick-3 brian-patrick-3 added the enhancement New feature or request label Oct 28, 2024
@jorenbroekema
Copy link
Member

duplicate amzn/style-dictionary#1377

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants