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/content/guides/7.multistore/3.patterns/5.subpath/1.subpath.md
+28-2
Original file line number
Diff line number
Diff line change
@@ -199,8 +199,21 @@ In your Nuxt app, add custom CSS variables in your style.scss:
199
199
```
200
200
::
201
201
202
-
::info
203
-
For more information on using CSS variables with Tailwind, see the [Tailwind CSS documentation](https://v3.tailwindcss.com/docs/customizing-colors#using-css-variables).
202
+
::tip Using CSS Variables with Tailwind
203
+
The CSS variables we defined can be used with Tailwind's color system. For example, `bg-primary-500` will use the store-specific primary color defined in the CSS variables. For more information, see the [Tailwind CSS documentation](https://v3.tailwindcss.com/docs/customizing-colors#using-css-variables).
204
+
::
205
+
206
+
::tip Understanding Generated CSS
207
+
When using store-specific variants like `electronics:!bg-primary-600`, Tailwind generates scoped CSS rules. For example:
This ensures the styles only apply when two conditions are met: the parent element must have the `.electronics` class and the target element must have the `electronics:!bg-primary-600` class.
204
217
::
205
218
206
219
## Setting Up the Storefront
@@ -575,6 +588,19 @@ Then use these variants (`electronics:`, `apparel:`, etc.) in your components:
575
588
The CSS variables we defined can be used with Tailwind's color system. For example, `bg-primary-500` will use the store-specific primary color defined in the CSS variables. For more information, see the [Tailwind CSS documentation](https://v3.tailwindcss.com/docs/customizing-colors#using-css-variables).
576
589
::
577
590
591
+
::tip Understanding Generated CSS
592
+
When using store-specific variants like `electronics:!bg-primary-600`, Tailwind generates scoped CSS rules. For example:
This ensures the styles only apply when two conditions are met: the parent element must have the `.electronics` class and the target element must have the `electronics:!bg-primary-600` class.
602
+
::
603
+
578
604
## Conditional Components
579
605
580
606
There are two main approaches to handling store-specific components:
0 commit comments