You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/colors.md
+14-6Lines changed: 14 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,19 +89,27 @@ which contains values for these options which might go well together in a monoch
89
89
90
90
To apply the theme to aelement you simply add the `neversink-{name}-scheme` class to the element and then add another class which binds the CSS vars as you like.
91
91
92
+
There is one built-in one called `.ns-c-mixin` which applies the color to the background, text, and border of the element. It's definition looks like this:
93
+
94
+
```css
95
+
.ns-c-mixin {
96
+
background-color: var(--neversink-bg-color);
97
+
color: var(--neversink-text-color);
98
+
border-color: var(--neversink-border-color);
99
+
}
100
+
```
101
+
92
102
For example, to apply the `red` scheme from above to a `div` element you would add the following classes:
93
103
94
104
```html
95
-
<div class="neversink-red-schemecolorbinding">This is a red div</div>
105
+
<divclass="neversink-red-scheme ns-c-mixin">This is a red div</div>
96
106
```
97
107
98
-
and then define the color binding class
108
+
You can also define you own custom binding classes if you want to map the colors from the theme in a different way. For example, you could define a class like this:
0 commit comments