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

Enhancement: Custom styling #1

Open
jhildenbiddle opened this issue Mar 15, 2024 · 0 comments
Open

Enhancement: Custom styling #1

jhildenbiddle opened this issue Mar 15, 2024 · 0 comments

Comments

@jhildenbiddle
Copy link

Original discussion: val-town/val-town-product#88


It would be useful if the vt-playground web component styles could be customized via CSS custom properties. Customization efforts can be reduced by using color-mix() to adjust unspecified colors as needed (e.g., make borders slightly lighter/darker than background color based on prefers-color-scheme).

Here is a basic example:

/* Defaults */
:root {
  --vt-background-color: #eee;
  --vt-border-color: color-mix(in srgb, var(--vt-background-color) 93%, black);
}
/* Custom styles */
:root {
 --vt-background-color: #222;
}
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

No branches or pull requests

1 participant