Skip to content

Commit daaa30c

Browse files
committed
refactor(website): improve theme
1 parent 80c8607 commit daaa30c

File tree

1 file changed

+192
-0
lines changed

1 file changed

+192
-0
lines changed

apps/website/app/theme/theme.css

Lines changed: 192 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,192 @@
1+
@theme {
2+
--color-fd-background: hsl(0, 0%, 100%);
3+
--color-fd-foreground: hsl(240, 6%, 25%);
4+
--color-fd-card: hsl(0, 0%, 100%);
5+
--color-fd-card-foreground: hsl(0, 0%, 3.9%);
6+
--color-fd-popover: hsl(0, 0%, 100%);
7+
--color-fd-popover-foreground: hsl(0, 0%, 15.1%);
8+
--color-fd-primary: hsl(210, 100%, 44%);
9+
--color-fd-primary-foreground: hsl(0, 0%, 98%);
10+
--color-fd-secondary: hsl(240, 6%, 97%);
11+
--color-fd-secondary-foreground: hsl(0, 0%, 9%);
12+
--color-fd-border: hsl(0, 0%, 89.8%);
13+
--color-fd-ring: hsl(0, 0%, 63.9%);
14+
--color-fd-muted: hsl(0, 0%, 96%);
15+
--color-fd-muted-foreground: hsl(240, 6%, 50%);
16+
--color-fd-accent: hsl(0, 0%, 94.1%);
17+
--color-fd-accent-foreground: hsl(240, 6%, 25%);
18+
19+
--color-fd-prose-body:
20+
color-mix(in oklab, var(--color-fd-foreground) 80%, transparent);
21+
}
22+
23+
.dark {
24+
--color-fd-background: hsl(0, 0%, 7.04%);
25+
--color-fd-foreground: hsl(0, 0%, 92%);
26+
--color-fd-card: hsl(0, 0%, 9.8%);
27+
--color-fd-card-foreground: hsl(0, 0%, 98%);
28+
--color-fd-popover: hsl(0, 0%, 9.8%);
29+
--color-fd-popover-foreground: hsl(0, 0%, 88%);
30+
--color-fd-primary: hsl(0, 0%, 98%);
31+
--color-fd-primary-foreground: hsl(0, 0%, 9%);
32+
--color-fd-secondary: hsl(0, 0%, 12.9%);
33+
--color-fd-secondary-foreground: hsl(0, 0%, 98%);
34+
--color-fd-border: hsl(0, 0%, 14%);
35+
--color-fd-ring: hsl(0, 0%, 54.9%);
36+
--color-fd-muted: hsl(0, 0%, 12.9%);
37+
--color-fd-muted-foreground: hsl(0, 0%, 60.9%);
38+
--color-fd-accent: hsl(0, 0%, 16.9%);
39+
--color-fd-accent-foreground: hsl(0, 0%, 90%);
40+
41+
--color-fd-prose-body:
42+
color-mix(in oklab, var(--color-fd-foreground) 80%, transparent);
43+
}
44+
45+
:root {
46+
--font-family-body:
47+
"SF Pro Text",
48+
"SF Pro Icons",
49+
system-ui,
50+
-apple-system,
51+
BlinkMacSystemFont,
52+
"Segoe UI",
53+
Roboto,
54+
"Noto Sans",
55+
Ubuntu,
56+
Cantarell,
57+
"Helvetica Neue",
58+
Arial,
59+
sans-serif,
60+
"Apple Color Emoji",
61+
"Segoe UI Emoji",
62+
"Segoe UI Symbol",
63+
"Noto Color Emoji";
64+
65+
--font-family-ui:
66+
system-ui,
67+
-apple-system,
68+
BlinkMacSystemFont,
69+
"Segoe UI",
70+
Roboto,
71+
"Noto Sans",
72+
Ubuntu,
73+
Cantarell,
74+
"Helvetica Neue",
75+
Arial,
76+
sans-serif,
77+
"Apple Color Emoji",
78+
"Segoe UI Emoji",
79+
"Segoe UI Symbol",
80+
"Noto Color Emoji";
81+
82+
--font-family-mono:
83+
var(--font-ibm_plex_mono),
84+
ui-monospace,
85+
Menlo,
86+
Monaco,
87+
Consolas,
88+
monospace;
89+
}
90+
91+
body {
92+
font-family: var(--font-family-body);
93+
}
94+
95+
code,
96+
kbd,
97+
pre,
98+
samp {
99+
font-family: var(--font-family-mono);
100+
}
101+
102+
button {
103+
cursor: pointer;
104+
}
105+
106+
:focus-visible {
107+
outline: none;
108+
}
109+
110+
:focus-visible:not([class*="outline-none"]) {
111+
outline: 2px solid var(--color-fd-primary);
112+
outline-offset: -2px;
113+
}
114+
115+
[role="tabpanel"]:focus-visible {
116+
outline: none;
117+
}
118+
119+
#nd-docs-layout #nd-sidebar {
120+
a[data-active] {
121+
font-weight: 400;
122+
}
123+
124+
p.mt-8.mb-2[style^="padding-inline-start:"] {
125+
margin-top: 28px;
126+
margin-bottom: 16px;
127+
}
128+
129+
div[data-state],
130+
a[data-active] {
131+
margin-top: 4px;
132+
margin-bottom: 4px;
133+
border-radius: 6px;
134+
}
135+
}
136+
137+
.dark #nd-sidebar {
138+
--color-fd-muted: hsl(0, 0%, 16%);
139+
--color-fd-secondary: hsl(0, 0%, 18%);
140+
--color-fd-muted-foreground: hsl(0, 0%, 72%);
141+
}
142+
143+
.prose {
144+
font-family: var(--font-family-body);
145+
--tw-prose-links: var(--color-fd-primary);
146+
147+
.fd-codeblock.shiki {
148+
background-color: color-mix(in oklab, var(--color-fd-secondary) 25%, transparent);
149+
}
150+
151+
.fd-codeblock,
152+
[data-radix-scroll-area-viewport],
153+
[data-radix-scroll-area-viewport]>div {
154+
outline: none;
155+
}
156+
157+
:where(code):not(:where([class~='not-prose'], [class~='not-prose'] *)) {
158+
border: none;
159+
padding: .125rem .25em;
160+
font-size: 14px;
161+
}
162+
163+
table {
164+
font-size: 1em;
165+
166+
thead tr th code,
167+
tbody tr td code {
168+
white-space: nowrap;
169+
}
170+
}
171+
}
172+
173+
.dark .prose {
174+
--tw-prose-body: color-mix(in oklab, var(--color-fd-foreground) 80%, transparent);
175+
176+
:where(code):not(:where([class~="not-prose"], [class~="not-prose"] *)) {
177+
color: #ffffff;
178+
}
179+
}
180+
181+
.dark {
182+
183+
.shadow-2xs,
184+
.shadow-xs,
185+
.shadow-sm,
186+
.shadow-md,
187+
.shadow-lg,
188+
.shadow-xl,
189+
.shadow-2xl {
190+
box-shadow: 0 0 #0000;
191+
}
192+
}

0 commit comments

Comments
 (0)