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/concepts/styling-theming.md
+22-17Lines changed: 22 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,24 @@ description: Learn how to style your AppShell application using Tailwind CSS v4
5
5
6
6
# Styling and Theming
7
7
8
-
Styling is done using Tailwind CSS v4. AppShell exports a `theme.css` file which includes Tailor's preferred color palette and CSS variables.
8
+
Styling is done using Tailwind CSS v4. AppShell exports `@tailor-platform/app-shell/styles`, which includes the default palette and CSS variables.
9
9
10
-
To configure in your AppShell application, in your global.css or top-level tailwind css file, include this theme.css
10
+
To configure your application, import AppShell styles from your global CSS or top-level Tailwind CSS file:
11
11
12
-
Example:
12
+
```css
13
+
@import"tailwindcss";
14
+
@import"@tailor-platform/app-shell/styles";
15
+
```
16
+
17
+
If you want a branded palette, import exactly one theme file after `styles`:
13
18
14
19
```css
15
-
@import"@tailor-platform/app-shell/theme.css"; /* <-- Include this line */
16
20
@import"tailwindcss";
21
+
@import"@tailor-platform/app-shell/styles";
22
+
@import"@tailor-platform/app-shell/themes/bloom";
17
23
```
18
24
19
-
After including this, your Application's Tailwind will apply the custom colors to to the utility classes.
25
+
After including this, your application's Tailwind utilities will resolve against the active AppShell tokens.
20
26
21
27
E.g.
22
28
@@ -108,8 +114,8 @@ These properties are defined in `:root` and can be overridden in your own CSS:
108
114
109
115
```css
110
116
/* your-app/globals.css */
111
-
@import"@tailor-platform/app-shell/theme.css";
112
117
@import"tailwindcss";
118
+
@import"@tailor-platform/app-shell/styles";
113
119
114
120
:root {
115
121
--z-popup: 100;
@@ -120,16 +126,15 @@ These properties are defined in `:root` and can be overridden in your own CSS:
120
126
121
127
Theme tokens live in `packages/core/src/assets/themes/`. Copy `_template.css` to start a new palette — it lists exactly which sections to fill in for light and dark mode.
|**5. Semantic**| Do not duplicate | Status and alert tokens inherit from `default.css`|
136
+
|**6. Structural**| Branded palettes | Copy the structural override block from `bloom.css` or `cream.css` when needed |
137
+
138
+
A palette is selected by CSS import, not by an AppShell prop. Import exactly one theme file after `@tailor-platform/app-shell/styles`; if you import none, the default palette from `styles` is used.
134
139
135
140
Preview token values at `/custom-page/color` in the Next.js example app.
0 commit comments