@fragment-build/ui 3.2.3 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/fragments/navbar/navbar.css +2 -2
- package/fragments/sidebar/sidebar.css +14 -9
- package/index.css +27 -0
- package/package.json +1 -1
- package/src/fragments/navbar/navbar.css +2 -2
- package/src/fragments/sidebar/sidebar.css +14 -9
- package/src/index.css +27 -0
- package/src/theme.example.css +26 -0
- package/theme.example.css +26 -0
package/README.md
CHANGED
|
@@ -28,6 +28,8 @@ Fragment UI is a design system and React component library which provides alread
|
|
|
28
28
|
- [🔧 Configuration](#-configuration)
|
|
29
29
|
- [`linkComponent`](#linkcomponent)
|
|
30
30
|
- [Next.js 13+](#nextjs-13)
|
|
31
|
+
- [🎨 Theming](#-theming)
|
|
32
|
+
- [Fragment surfaces](#fragment-surfaces)
|
|
31
33
|
- [🤝 Contributing](#-contributing)
|
|
32
34
|
- [👨💻 Development](#-development)
|
|
33
35
|
- [🤝 Community support](#-community-support)
|
|
@@ -179,6 +181,77 @@ import { ThemeSwitch } from '@fragment-build/ui';
|
|
|
179
181
|
<ThemeSwitch />
|
|
180
182
|
```
|
|
181
183
|
|
|
184
|
+
## 🎨 Theming
|
|
185
|
+
|
|
186
|
+
Fragment UI builds on the [HeroUI theme tokens](https://v3.heroui.com/docs/react/getting-started/theming).
|
|
187
|
+
Override any of them in your own stylesheet — see [`theme.example.css`](src/theme.example.css)
|
|
188
|
+
for the full list. Import Fragment UI first, then declare your overrides: both blocks are
|
|
189
|
+
unlayered and equally specific, so the later one wins.
|
|
190
|
+
|
|
191
|
+
```css
|
|
192
|
+
@import 'tailwindcss';
|
|
193
|
+
@import "@heroui/styles";
|
|
194
|
+
@import "@fragment-build/ui";
|
|
195
|
+
|
|
196
|
+
:root,
|
|
197
|
+
.light,
|
|
198
|
+
[data-theme="light"] {
|
|
199
|
+
--accent: #F56460;
|
|
200
|
+
}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Fragment surfaces
|
|
204
|
+
|
|
205
|
+
The `Sidebar` and `Navbar` fragments paint their own surface so they can be themed
|
|
206
|
+
independently of the page. Each defaults to the page surface, so a theme that declares none of
|
|
207
|
+
these renders exactly as it did before.
|
|
208
|
+
|
|
209
|
+
| Token | Default | Applies to |
|
|
210
|
+
| --- | --- | --- |
|
|
211
|
+
| `--sidebar` | `var(--background)` | Sidebar rail (collapsed + expanded) and its mobile bottom nav |
|
|
212
|
+
| `--sidebar-foreground` | `var(--foreground)` | Text, icons and tree guides inside the rail |
|
|
213
|
+
| `--navbar` | `var(--background)` | Navbar topbar and its mobile bottom nav |
|
|
214
|
+
| `--navbar-foreground` | `var(--foreground)` | Text and icons inside the navbar |
|
|
215
|
+
|
|
216
|
+
A tinted rail on a white page:
|
|
217
|
+
|
|
218
|
+
```css
|
|
219
|
+
:root,
|
|
220
|
+
.light,
|
|
221
|
+
[data-theme="light"] {
|
|
222
|
+
--sidebar: #F7F5F0;
|
|
223
|
+
}
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
They are also available as Tailwind utilities — `bg-sidebar`, `text-sidebar-foreground`,
|
|
227
|
+
`bg-navbar`, `text-navbar-foreground` — so you can reuse the same surface in your own markup.
|
|
228
|
+
|
|
229
|
+
#### Contrasting rails
|
|
230
|
+
|
|
231
|
+
The interactive states inside the rail are page-level palette roles, not sidebar roles, and
|
|
232
|
+
they do **not** follow `--sidebar` on their own. The active nav pill (`--accent-soft`) is
|
|
233
|
+
translucent, so it composites over whatever the rail is painted and needs nothing. The other
|
|
234
|
+
two do, once the rail contrasts noticeably with the page:
|
|
235
|
+
|
|
236
|
+
| Token | Default | Controls |
|
|
237
|
+
| --- | --- | --- |
|
|
238
|
+
| `--sidebar-default` | `var(--default)` | Hover ground of collapsible nav groups |
|
|
239
|
+
| `--sidebar-accent-soft-foreground` | `var(--accent-soft-foreground)` | Ink of the active nav item and active group |
|
|
240
|
+
|
|
241
|
+
A dark rail on a light page:
|
|
242
|
+
|
|
243
|
+
```css
|
|
244
|
+
:root,
|
|
245
|
+
.light,
|
|
246
|
+
[data-theme="light"] {
|
|
247
|
+
--sidebar: oklch(21% 0.006 285.89);
|
|
248
|
+
--sidebar-foreground: oklch(99.11% 0 0);
|
|
249
|
+
|
|
250
|
+
--sidebar-default: rgba(255, 255, 255, 0.08);
|
|
251
|
+
--sidebar-accent-soft-foreground: color-mix(in oklab, var(--accent) 70%, var(--sidebar-foreground) 30%);
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
182
255
|
## 🤝 Contributing
|
|
183
256
|
|
|
184
257
|
Feel free to fork and make a Pull Request to this project. All the input is warmly welcome!
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.fragment-navbar__topbar {
|
|
3
|
-
@apply flex gap-6 items-center px-8 py-5;
|
|
3
|
+
@apply flex gap-6 items-center px-8 py-5 bg-navbar text-navbar-foreground;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-navbar__tabs {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.fragment-navbar__bottom-nav {
|
|
15
|
-
@apply fixed md:hidden z-50 bottom-0 bg-
|
|
15
|
+
@apply fixed md:hidden z-50 bottom-0 bg-navbar text-navbar-foreground flex w-full gap-2 px-2 py-1 border-t border-border;
|
|
16
16
|
& > *,
|
|
17
17
|
& > * > * {
|
|
18
18
|
@apply h-12 flex-1;
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-sidebar__collapsed {
|
|
7
|
-
@apply fixed top-0 left-0 border-r border-border
|
|
7
|
+
@apply fixed top-0 left-0 border-r border-border bg-sidebar text-sidebar-foreground
|
|
8
|
+
flex flex-col h-screen gap-8 transition-all;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.fragment-sidebar__collapsed-body {
|
|
@@ -16,7 +17,8 @@
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.fragment-sidebar__expanded {
|
|
19
|
-
@apply fixed top-0 left-0 border-r border-border
|
|
20
|
+
@apply fixed top-0 left-0 border-r border-border bg-sidebar text-sidebar-foreground
|
|
21
|
+
flex flex-col h-screen gap-8 overflow-hidden transition-all;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.fragment-sidebar__expanded-body {
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
.fragment-sidebar__bottom-nav {
|
|
43
|
-
@apply fixed md:hidden z-50 bottom-0 bg-
|
|
45
|
+
@apply fixed md:hidden z-50 bottom-0 bg-sidebar text-sidebar-foreground flex w-full gap-2 px-2 py-1 border-t border-border;
|
|
44
46
|
& > *:nth-child(n+5):not(:last-child) {
|
|
45
47
|
@apply hidden;
|
|
46
48
|
}
|
|
@@ -121,9 +123,10 @@
|
|
|
121
123
|
|
|
122
124
|
.fragment-sidebar__accordion-trigger {
|
|
123
125
|
@apply w-full flex items-center gap-3 h-10 px-3 pr-1 py-1 rounded-2xl text-sm font-normal cursor-pointer
|
|
124
|
-
text-foreground transition-colors;
|
|
126
|
+
text-sidebar-foreground transition-colors;
|
|
125
127
|
&:hover, &[data-hovered="true"] {
|
|
126
|
-
|
|
128
|
+
/* `--default` is a page-level palette colour; opt out per-rail with `--sidebar-default`. */
|
|
129
|
+
background-color: var(--sidebar-default, var(--default)) !important;
|
|
127
130
|
}
|
|
128
131
|
& > .fragment-sidebar__accordion-label {
|
|
129
132
|
@apply flex-1 text-left;
|
|
@@ -131,7 +134,7 @@
|
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
.fragment-sidebar__accordion-trigger--active {
|
|
134
|
-
|
|
137
|
+
color: var(--sidebar-accent-soft-foreground, var(--accent-soft-foreground));
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
.fragment-sidebar__accordion-trigger .accordion__indicator {
|
|
@@ -149,7 +152,7 @@
|
|
|
149
152
|
@apply relative pl-7;
|
|
150
153
|
&::before {
|
|
151
154
|
content: '';
|
|
152
|
-
@apply absolute top-0 bottom-0 w-px bg-foreground opacity-15 rounded-full left-5;
|
|
155
|
+
@apply absolute top-0 bottom-0 w-px bg-sidebar-foreground opacity-15 rounded-full left-5;
|
|
153
156
|
}
|
|
154
157
|
.list-box {
|
|
155
158
|
@apply overflow-visible;
|
|
@@ -157,14 +160,16 @@
|
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
.fragment-sidebar__nav-item--active {
|
|
160
|
-
|
|
163
|
+
/* `--accent-soft` is translucent, so it composites over the rail, not the page. */
|
|
164
|
+
@apply bg-accent-soft!;
|
|
165
|
+
color: var(--sidebar-accent-soft-foreground, var(--accent-soft-foreground)) !important;
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
.fragment-sidebar__sub-item {
|
|
164
169
|
@apply pl-8! relative;
|
|
165
170
|
&::before {
|
|
166
171
|
content: '';
|
|
167
|
-
@apply absolute -left-3 ml-px top-1/2 -translate-y-1/2 w-3 h-px bg-foreground opacity-15;
|
|
172
|
+
@apply absolute -left-3 ml-px top-1/2 -translate-y-1/2 w-3 h-px bg-sidebar-foreground opacity-15;
|
|
168
173
|
}
|
|
169
174
|
}
|
|
170
175
|
|
package/index.css
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
--text-sm: 15px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
/*
|
|
7
|
+
* Fragment surface roles.
|
|
8
|
+
*
|
|
9
|
+
* `inline` so the utilities compile to `var(--sidebar)` / `var(--navbar)` and are
|
|
10
|
+
* therefore resolved on the element, not frozen at `:root`. Each falls back to the
|
|
11
|
+
* page role, so a theme that never declares them renders exactly as before.
|
|
12
|
+
*/
|
|
13
|
+
@theme inline {
|
|
14
|
+
--color-sidebar: var(--sidebar, var(--background));
|
|
15
|
+
--color-sidebar-foreground: var(--sidebar-foreground, var(--foreground));
|
|
16
|
+
|
|
17
|
+
--color-navbar: var(--navbar, var(--background));
|
|
18
|
+
--color-navbar-foreground: var(--navbar-foreground, var(--foreground));
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
@layer base {
|
|
7
22
|
body {
|
|
8
23
|
@apply bg-background text-foreground;
|
|
@@ -137,6 +152,12 @@
|
|
|
137
152
|
--background: #fff;
|
|
138
153
|
--border: rgba(0, 0, 0, 0.07);
|
|
139
154
|
--surface-secondary: rgba(0, 0, 0, 0.02);
|
|
155
|
+
|
|
156
|
+
/* Fragment surfaces: default to the page surface */
|
|
157
|
+
--sidebar: var(--background);
|
|
158
|
+
--sidebar-foreground: var(--foreground);
|
|
159
|
+
--navbar: var(--background);
|
|
160
|
+
--navbar-foreground: var(--foreground);
|
|
140
161
|
}
|
|
141
162
|
|
|
142
163
|
.dark,
|
|
@@ -146,6 +167,12 @@
|
|
|
146
167
|
--foreground: var(--snow);
|
|
147
168
|
--border: rgba(255, 255, 255, 0.07);
|
|
148
169
|
--surface-secondary: rgba(255, 255, 255, 0.02);
|
|
170
|
+
|
|
171
|
+
/* Fragment surfaces: default to the page surface */
|
|
172
|
+
--sidebar: var(--background);
|
|
173
|
+
--sidebar-foreground: var(--foreground);
|
|
174
|
+
--navbar: var(--background);
|
|
175
|
+
--navbar-foreground: var(--foreground);
|
|
149
176
|
}
|
|
150
177
|
|
|
151
178
|
/* @import "./theme.example.css"; */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.fragment-navbar__topbar {
|
|
3
|
-
@apply flex gap-6 items-center px-8 py-5;
|
|
3
|
+
@apply flex gap-6 items-center px-8 py-5 bg-navbar text-navbar-foreground;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-navbar__tabs {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.fragment-navbar__bottom-nav {
|
|
15
|
-
@apply fixed md:hidden z-50 bottom-0 bg-
|
|
15
|
+
@apply fixed md:hidden z-50 bottom-0 bg-navbar text-navbar-foreground flex w-full gap-2 px-2 py-1 border-t border-border;
|
|
16
16
|
& > *,
|
|
17
17
|
& > * > * {
|
|
18
18
|
@apply h-12 flex-1;
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
}
|
|
5
5
|
|
|
6
6
|
.fragment-sidebar__collapsed {
|
|
7
|
-
@apply fixed top-0 left-0 border-r border-border
|
|
7
|
+
@apply fixed top-0 left-0 border-r border-border bg-sidebar text-sidebar-foreground
|
|
8
|
+
flex flex-col h-screen gap-8 transition-all;
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.fragment-sidebar__collapsed-body {
|
|
@@ -16,7 +17,8 @@
|
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.fragment-sidebar__expanded {
|
|
19
|
-
@apply fixed top-0 left-0 border-r border-border
|
|
20
|
+
@apply fixed top-0 left-0 border-r border-border bg-sidebar text-sidebar-foreground
|
|
21
|
+
flex flex-col h-screen gap-8 overflow-hidden transition-all;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.fragment-sidebar__expanded-body {
|
|
@@ -40,7 +42,7 @@
|
|
|
40
42
|
}
|
|
41
43
|
|
|
42
44
|
.fragment-sidebar__bottom-nav {
|
|
43
|
-
@apply fixed md:hidden z-50 bottom-0 bg-
|
|
45
|
+
@apply fixed md:hidden z-50 bottom-0 bg-sidebar text-sidebar-foreground flex w-full gap-2 px-2 py-1 border-t border-border;
|
|
44
46
|
& > *:nth-child(n+5):not(:last-child) {
|
|
45
47
|
@apply hidden;
|
|
46
48
|
}
|
|
@@ -121,9 +123,10 @@
|
|
|
121
123
|
|
|
122
124
|
.fragment-sidebar__accordion-trigger {
|
|
123
125
|
@apply w-full flex items-center gap-3 h-10 px-3 pr-1 py-1 rounded-2xl text-sm font-normal cursor-pointer
|
|
124
|
-
text-foreground transition-colors;
|
|
126
|
+
text-sidebar-foreground transition-colors;
|
|
125
127
|
&:hover, &[data-hovered="true"] {
|
|
126
|
-
|
|
128
|
+
/* `--default` is a page-level palette colour; opt out per-rail with `--sidebar-default`. */
|
|
129
|
+
background-color: var(--sidebar-default, var(--default)) !important;
|
|
127
130
|
}
|
|
128
131
|
& > .fragment-sidebar__accordion-label {
|
|
129
132
|
@apply flex-1 text-left;
|
|
@@ -131,7 +134,7 @@
|
|
|
131
134
|
}
|
|
132
135
|
|
|
133
136
|
.fragment-sidebar__accordion-trigger--active {
|
|
134
|
-
|
|
137
|
+
color: var(--sidebar-accent-soft-foreground, var(--accent-soft-foreground));
|
|
135
138
|
}
|
|
136
139
|
|
|
137
140
|
.fragment-sidebar__accordion-trigger .accordion__indicator {
|
|
@@ -149,7 +152,7 @@
|
|
|
149
152
|
@apply relative pl-7;
|
|
150
153
|
&::before {
|
|
151
154
|
content: '';
|
|
152
|
-
@apply absolute top-0 bottom-0 w-px bg-foreground opacity-15 rounded-full left-5;
|
|
155
|
+
@apply absolute top-0 bottom-0 w-px bg-sidebar-foreground opacity-15 rounded-full left-5;
|
|
153
156
|
}
|
|
154
157
|
.list-box {
|
|
155
158
|
@apply overflow-visible;
|
|
@@ -157,14 +160,16 @@
|
|
|
157
160
|
}
|
|
158
161
|
|
|
159
162
|
.fragment-sidebar__nav-item--active {
|
|
160
|
-
|
|
163
|
+
/* `--accent-soft` is translucent, so it composites over the rail, not the page. */
|
|
164
|
+
@apply bg-accent-soft!;
|
|
165
|
+
color: var(--sidebar-accent-soft-foreground, var(--accent-soft-foreground)) !important;
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
.fragment-sidebar__sub-item {
|
|
164
169
|
@apply pl-8! relative;
|
|
165
170
|
&::before {
|
|
166
171
|
content: '';
|
|
167
|
-
@apply absolute -left-3 ml-px top-1/2 -translate-y-1/2 w-3 h-px bg-foreground opacity-15;
|
|
172
|
+
@apply absolute -left-3 ml-px top-1/2 -translate-y-1/2 w-3 h-px bg-sidebar-foreground opacity-15;
|
|
168
173
|
}
|
|
169
174
|
}
|
|
170
175
|
|
package/src/index.css
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
3
3
|
--text-sm: 15px;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
+
/*
|
|
7
|
+
* Fragment surface roles.
|
|
8
|
+
*
|
|
9
|
+
* `inline` so the utilities compile to `var(--sidebar)` / `var(--navbar)` and are
|
|
10
|
+
* therefore resolved on the element, not frozen at `:root`. Each falls back to the
|
|
11
|
+
* page role, so a theme that never declares them renders exactly as before.
|
|
12
|
+
*/
|
|
13
|
+
@theme inline {
|
|
14
|
+
--color-sidebar: var(--sidebar, var(--background));
|
|
15
|
+
--color-sidebar-foreground: var(--sidebar-foreground, var(--foreground));
|
|
16
|
+
|
|
17
|
+
--color-navbar: var(--navbar, var(--background));
|
|
18
|
+
--color-navbar-foreground: var(--navbar-foreground, var(--foreground));
|
|
19
|
+
}
|
|
20
|
+
|
|
6
21
|
@layer base {
|
|
7
22
|
body {
|
|
8
23
|
@apply bg-background text-foreground;
|
|
@@ -137,6 +152,12 @@
|
|
|
137
152
|
--background: #fff;
|
|
138
153
|
--border: rgba(0, 0, 0, 0.07);
|
|
139
154
|
--surface-secondary: rgba(0, 0, 0, 0.02);
|
|
155
|
+
|
|
156
|
+
/* Fragment surfaces: default to the page surface */
|
|
157
|
+
--sidebar: var(--background);
|
|
158
|
+
--sidebar-foreground: var(--foreground);
|
|
159
|
+
--navbar: var(--background);
|
|
160
|
+
--navbar-foreground: var(--foreground);
|
|
140
161
|
}
|
|
141
162
|
|
|
142
163
|
.dark,
|
|
@@ -146,6 +167,12 @@
|
|
|
146
167
|
--foreground: var(--snow);
|
|
147
168
|
--border: rgba(255, 255, 255, 0.07);
|
|
148
169
|
--surface-secondary: rgba(255, 255, 255, 0.02);
|
|
170
|
+
|
|
171
|
+
/* Fragment surfaces: default to the page surface */
|
|
172
|
+
--sidebar: var(--background);
|
|
173
|
+
--sidebar-foreground: var(--foreground);
|
|
174
|
+
--navbar: var(--background);
|
|
175
|
+
--navbar-foreground: var(--foreground);
|
|
149
176
|
}
|
|
150
177
|
|
|
151
178
|
/* @import "./theme.example.css"; */
|
package/src/theme.example.css
CHANGED
|
@@ -43,6 +43,23 @@
|
|
|
43
43
|
--surface-tertiary: rgba(0, 0, 0, 0.9);
|
|
44
44
|
--surface-tertiary-foreground: #FCFAF6;
|
|
45
45
|
|
|
46
|
+
/*
|
|
47
|
+
* Fragment surfaces — Sidebar / Navbar.
|
|
48
|
+
* Omit them and each fragment stays on the page surface, exactly as before.
|
|
49
|
+
* Set --sidebar to give the rail its own ground; --sidebar-foreground moves the ink with it.
|
|
50
|
+
*/
|
|
51
|
+
--sidebar: #F7F5F0;
|
|
52
|
+
--sidebar-foreground: var(--foreground);
|
|
53
|
+
--navbar: var(--background);
|
|
54
|
+
--navbar-foreground: var(--foreground);
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Optional. The states inside the rail are page-level palette roles, so they do not
|
|
58
|
+
* follow --sidebar on their own. Set these when the rail contrasts with the page.
|
|
59
|
+
*/
|
|
60
|
+
/* --sidebar-default: rgba(0, 0, 0, 0.04); */
|
|
61
|
+
/* --sidebar-accent-soft-foreground: color-mix(in oklab, var(--accent) 70%, var(--sidebar-foreground) 30%); */
|
|
62
|
+
|
|
46
63
|
--success: oklch(73.29% 0.1968 123.30);
|
|
47
64
|
--success-foreground: rgba(0, 0, 0, 0.9);
|
|
48
65
|
--warning: oklch(78.19% 0.1612 44.82);
|
|
@@ -91,6 +108,15 @@
|
|
|
91
108
|
--surface-secondary-foreground: oklch(99.11% 0.0000 24.57);
|
|
92
109
|
--surface-tertiary: oklch(27.21% 0.0000 24.57);
|
|
93
110
|
--surface-tertiary-foreground: oklch(99.11% 0.0000 24.57);
|
|
111
|
+
|
|
112
|
+
/* Fragment surfaces — Sidebar / Navbar */
|
|
113
|
+
--sidebar: oklch(16.00% 0.0000 24.57);
|
|
114
|
+
--sidebar-foreground: var(--foreground);
|
|
115
|
+
--navbar: var(--background);
|
|
116
|
+
--navbar-foreground: var(--foreground);
|
|
117
|
+
|
|
118
|
+
/* --sidebar-default: rgba(255, 255, 255, 0.06); */
|
|
119
|
+
/* --sidebar-accent-soft-foreground: color-mix(in oklab, var(--accent) 80%, var(--sidebar-foreground) 30%); */
|
|
94
120
|
--warning: oklch(82.03% 0.1388 48.83);
|
|
95
121
|
--warning-foreground: oklch(21.03% 0.0059 48.83);
|
|
96
122
|
}
|
package/theme.example.css
CHANGED
|
@@ -43,6 +43,23 @@
|
|
|
43
43
|
--surface-tertiary: rgba(0, 0, 0, 0.9);
|
|
44
44
|
--surface-tertiary-foreground: #FCFAF6;
|
|
45
45
|
|
|
46
|
+
/*
|
|
47
|
+
* Fragment surfaces — Sidebar / Navbar.
|
|
48
|
+
* Omit them and each fragment stays on the page surface, exactly as before.
|
|
49
|
+
* Set --sidebar to give the rail its own ground; --sidebar-foreground moves the ink with it.
|
|
50
|
+
*/
|
|
51
|
+
--sidebar: #F7F5F0;
|
|
52
|
+
--sidebar-foreground: var(--foreground);
|
|
53
|
+
--navbar: var(--background);
|
|
54
|
+
--navbar-foreground: var(--foreground);
|
|
55
|
+
|
|
56
|
+
/*
|
|
57
|
+
* Optional. The states inside the rail are page-level palette roles, so they do not
|
|
58
|
+
* follow --sidebar on their own. Set these when the rail contrasts with the page.
|
|
59
|
+
*/
|
|
60
|
+
/* --sidebar-default: rgba(0, 0, 0, 0.04); */
|
|
61
|
+
/* --sidebar-accent-soft-foreground: color-mix(in oklab, var(--accent) 70%, var(--sidebar-foreground) 30%); */
|
|
62
|
+
|
|
46
63
|
--success: oklch(73.29% 0.1968 123.30);
|
|
47
64
|
--success-foreground: rgba(0, 0, 0, 0.9);
|
|
48
65
|
--warning: oklch(78.19% 0.1612 44.82);
|
|
@@ -91,6 +108,15 @@
|
|
|
91
108
|
--surface-secondary-foreground: oklch(99.11% 0.0000 24.57);
|
|
92
109
|
--surface-tertiary: oklch(27.21% 0.0000 24.57);
|
|
93
110
|
--surface-tertiary-foreground: oklch(99.11% 0.0000 24.57);
|
|
111
|
+
|
|
112
|
+
/* Fragment surfaces — Sidebar / Navbar */
|
|
113
|
+
--sidebar: oklch(16.00% 0.0000 24.57);
|
|
114
|
+
--sidebar-foreground: var(--foreground);
|
|
115
|
+
--navbar: var(--background);
|
|
116
|
+
--navbar-foreground: var(--foreground);
|
|
117
|
+
|
|
118
|
+
/* --sidebar-default: rgba(255, 255, 255, 0.06); */
|
|
119
|
+
/* --sidebar-accent-soft-foreground: color-mix(in oklab, var(--accent) 80%, var(--sidebar-foreground) 30%); */
|
|
94
120
|
--warning: oklch(82.03% 0.1388 48.83);
|
|
95
121
|
--warning-foreground: oklch(21.03% 0.0059 48.83);
|
|
96
122
|
}
|