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: README.md
+62Lines changed: 62 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,7 @@ The `serve` command is the default command. Running `tailwind-config-viewer` is
42
42
|-p, --port|`3000`|The port to run the viewer on. If occupied it will use next available port.|
43
43
|-o, --open|`false`|Open the viewer in default browser|
44
44
|-c, --config|`tailwind.config.js`|Path to your Tailwind config file|
45
+
|--css|`style.css`| Path to your stylesheet file (CSS). Inject CSS to head element of config viewer. This is handy for defining CSS variables|
45
46
46
47
### export
47
48
@@ -104,6 +105,67 @@ module.exports = {
104
105
105
106
You can replace any value in your theme for display in the config viewer by setting the corresponding `valueToFind: valueToReplace` in the `themeReplacements` object.
106
107
108
+
### CSS inject
109
+
110
+
You can inject CSS file to head of the config viewer. This is useful when you got defined your properties in config as CSS variables, also useful for importing fonts.
111
+
112
+
For defining variables in dark mode use class name `mode-dark`
// you can define different values for same variable in dark mode
154
+
.mode-dark {
155
+
--color-blue-50: #f0f9ff;
156
+
--color-blue-100: #dbeafe;
157
+
--color-blue-200: #bfdbfe;
158
+
--color-blue-300: #93c5fd;
159
+
--color-blue-400: #60a5fa;
160
+
--color-blue-500: #3b82f6;
161
+
--color-blue-600: #2563eb;
162
+
--color-blue-700: #0369a1;
163
+
--color-blue-800: #1d4ed8;
164
+
--color-blue-900: #1e40af;
165
+
--color-blue-950: #1e3a8a;
166
+
}
167
+
```
168
+
107
169
### baseFontSize
108
170
109
171
The config viewer displays the pixel equivalent of any rem values. By default `baseFontSize` is set to 16 to mirror the default root element font size in most browsers. If you plan on using a different root font size in your project, you should set the value of `baseFontSize` to match.
0 commit comments