Skip to content

What is Clarity's stance with regards to custom styling? #66

Answered by ashleyryan
alehar9320 asked this question in Q&A
Discussion options

You must be logged in to vote

Just about everything in Clarity Core is tokenized, making it easier to create a custom theme for your use. We focus heavily on using css variables related to interactions, instead of referencing color names, so that updating a background color will update it everything.

https://clarity.design/storybook/core/?path=/story/foundation-design-tokens--page
https://clarity.design/storybook/core/?path=/story/themes-getting-started--page

Our dark mode stylesheet, for example, simply changes the values of some of the CSS variables: https://unpkg.com/@cds/[email protected]/styles/theme.dark.css

The individual components themselves also expose css variables that you can tweak to meet your need. Our stance …

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@ashleyryan
Comment options

@TekSiDoT
Comment options

@ashleyryan
Comment options

@TekSiDoT
Comment options

@TekSiDoT
Comment options

Answer selected by alehar9320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants