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
This step requires you to have unlocked your [github access](https://cssninja.io/faq/github-access) and have a [github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens).
14
+
This step requires you to have unlocked your [github access](https://cssninja.io/faq/github-access) and have a [github personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) with the `repo` scope for classic token, or read access to the Tairo repository for fine-grained access token.
15
15
:::
16
16
17
17
@@ -61,7 +61,7 @@ This step requires you to have unlocked your [github access](https://cssninja.io
61
61
::
62
62
63
63
#description
64
-
Link your project to the Tairo layers by adding them to the `nuxt.config.ts` file. Note the version number `v1.5.0` which you can change to the latest version.
64
+
Link your project to the Tairo layers by adding them to the `nuxt.config.ts` file. The version `__TAIRO_LAYERS_VERSION__` is the latest stable version of Tairo, you can also use the `edge` version which contains the current development version (useful for testing new features).
65
65
:::
66
66
67
67
@@ -125,6 +125,7 @@ This step requires you to have unlocked your [github access](https://cssninja.io
125
125
::tairo-toc-anchor
126
126
---
127
127
label: "Run the development server"
128
+
id: "run-the-development-server-from-github"
128
129
prefix: " "
129
130
level: 3
130
131
---
@@ -141,6 +142,7 @@ This step requires you to have unlocked your [github access](https://cssninja.io
141
142
::tairo-toc-anchor
142
143
---
143
144
label: "Done!"
145
+
id: "done-with-github"
144
146
prefix: " "
145
147
level: 3
146
148
---
@@ -297,6 +299,7 @@ It's also the way to go if you want to **run the demo app**.
297
299
::tairo-toc-anchor
298
300
---
299
301
label: "Run the development server"
302
+
id: "run-the-development-server-from-source"
300
303
prefix: " "
301
304
level: 3
302
305
---
@@ -314,6 +317,7 @@ It's also the way to go if you want to **run the demo app**.
Sometimes you need to use CSS variables to dynamically change a color at runtime. For example, to change the primary color on dark mode, or based on the user's preference (like with the customizer).
This maps all the primary color shades to CSS variables. You can use any CSS variable name you want. The `<alpha-value>` is the opacity placeholder that will be replaced by Tailwind CSS at build time.
272
+
:::
273
+
274
+
275
+
:::code-timeline-item{vertical}
276
+
::code-group
277
+
```css [<app>/assets/colors.css]
278
+
:root {
279
+
--color-primary-50: 245243255; /* #f5f3ff */
280
+
--color-primary-100: 237233254; /* #ede9fe */
281
+
--color-primary-200: 221214254; /* #ddd6fe */
282
+
--color-primary-300: 196181253; /* #c4b5fd */
283
+
--color-primary-400: 167139250; /* #a78bfa */
284
+
--color-primary-500: 13992246; /* #a855f7 */
285
+
--color-primary-600: 12458237; /* #9333ea */
286
+
--color-primary-700: 10940217; /* #7e22ce */
287
+
--color-primary-800: 9133182; /* #6b21a8 */
288
+
--color-primary-900: 7629149; /* #581c87 */
289
+
--color-primary-950: 4616101; /* #3b0764 */
290
+
}
291
+
292
+
.dark {
293
+
--color-primary-50: 255244212; /* #FFF4D4 */
294
+
--color-primary-100: 255233172; /* #FFE9AC */
295
+
--color-primary-200: 254222131; /* #FEDE83 */
296
+
--color-primary-300: 25421191; /* #FED35B */
297
+
--color-primary-400: 25420050; /* #FEC832 */
298
+
--color-primary-500: 2471821; /* #F7B601 */
299
+
--color-primary-600: 1911411; /* #BF8D01 */
300
+
--color-primary-700: 135991; /* #876301 */
301
+
--color-primary-800: 79580; /* #4F3A00 */
302
+
--color-primary-900: 48360; /* #302400 */
303
+
--color-primary-950: 36271; /* #241b01 */
304
+
}
305
+
```
306
+
::
307
+
308
+
#title
309
+
::tairo-toc-anchor
310
+
---
311
+
label: "Register the CSS variables"
312
+
prefix: " "
313
+
level: 3
314
+
---
315
+
::
316
+
317
+
#description
318
+
Here you need to define the CSS variables that will be used to change the primary color. The values used are the RGB values of the color you want to use. You can also define a different color for dark mode.
319
+
:::
320
+
321
+
:::code-timeline-item{vertical}
322
+
::code-group
323
+
```ts [<app>/nuxt.config.ts]
324
+
exportdefaultdefineNuxtConfig({
325
+
css: [
326
+
'~/assets/css/colors.css',
327
+
],
328
+
})
329
+
```
330
+
::
331
+
332
+
#title
333
+
::tairo-toc-anchor
334
+
---
335
+
label: "Load the CSS file"
336
+
prefix: " "
337
+
level: 3
338
+
---
339
+
::
340
+
341
+
#description
342
+
Register your CSS file in the `nuxt.config.ts` file to make sure it is loaded in your application to make it work.
343
+
:::
344
+
::
345
+
346
+
347
+
---
348
+
349
+
Useful resources:
350
+
351
+
-[Using CSS Variables on tailwindcss.com](https://tailwindcss.com/docs/customizing-colors#using-css-variables)
0 commit comments