Skip to content

Commit 3df10a5

Browse files
authored
docs: update website theme styles (#413)
1 parent 7205d43 commit 3df10a5

2 files changed

Lines changed: 72 additions & 35 deletions

File tree

‎website/theme/index.scss‎

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
1-
:root {
2-
--rp-c-text-code: var(--rp-c-text-1);
3-
}
4-
5-
.dark {
6-
--rp-c-link: var(--rp-c-brand-light);
7-
}
1+
@import './theme.scss';
82

93
/* Keep document content visually centered when a page has no sidebar. */
104
@media (min-width: 1280px) {
@@ -20,31 +14,3 @@ body:has(#home-hero-title) .rp-nav {
2014
.rspress-logo {
2115
height: 1.8rem;
2216
}
23-
24-
.rp-doc {
25-
.rp-link,
26-
.rp-link code {
27-
color: inherit;
28-
text-decoration-line: underline;
29-
text-underline-offset: 2px;
30-
text-decoration-color: rgba(0, 0, 0, 0.25);
31-
32-
&:hover {
33-
opacity: 1;
34-
text-decoration-color: currentColor;
35-
border-bottom: none !important;
36-
}
37-
}
38-
}
39-
40-
.dark {
41-
.rp-doc {
42-
.rp-link {
43-
text-decoration-color: rgba(255, 255, 255, 0.5);
44-
45-
&:hover {
46-
text-decoration-color: currentColor;
47-
}
48-
}
49-
}
50-
}

‎website/theme/theme.scss‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
:root {
2+
--rp-c-brand: #f93920;
3+
--rp-c-brand-light: #fa6552;
4+
--rp-c-brand-lighter: #fc9183;
5+
--rp-c-brand-dark: #f82307;
6+
--rp-c-brand-darker: #e01f06;
7+
--rp-c-brand-tint: rgba(249, 57, 32, 0.15);
8+
--rp-c-text-code: var(--rp-c-text-1);
9+
}
10+
11+
.dark {
12+
--rp-c-link: var(--rp-c-brand-light);
13+
}
14+
15+
html:not(.dark) {
16+
--rp-c-text-2: #666;
17+
}
18+
19+
.rp-sidebar-item:hover,
20+
.rp-sidebar-item--active,
21+
.rp-sidebar-item--active:hover {
22+
color: var(--rp-c-text-0);
23+
background-color: var(--rp-c-bg-mute);
24+
}
25+
26+
.dark {
27+
.rp-sidebar-item:hover,
28+
.rp-sidebar-item--active,
29+
.rp-sidebar-item--active:hover {
30+
background-color: #1f1f1f;
31+
}
32+
}
33+
34+
.rp-toc-item__text,
35+
.rp-toc-item__text code {
36+
color: var(--rp-c-text-2);
37+
}
38+
39+
.rp-toc-item--active .rp-toc-item__text,
40+
.rp-toc-item--active .rp-toc-item__text code {
41+
color: var(--rp-c-text-0);
42+
font-weight: 500;
43+
}
44+
45+
.rp-doc {
46+
.rp-link,
47+
.rp-link code {
48+
color: inherit;
49+
text-decoration-line: underline;
50+
text-underline-offset: 2px;
51+
text-decoration-color: rgba(0, 0, 0, 0.25);
52+
53+
&:hover {
54+
opacity: 1;
55+
text-decoration-color: currentColor;
56+
border-bottom: none !important;
57+
}
58+
}
59+
}
60+
61+
.dark {
62+
.rp-doc {
63+
.rp-link {
64+
text-decoration-color: rgba(255, 255, 255, 0.5);
65+
66+
&:hover {
67+
text-decoration-color: currentColor;
68+
}
69+
}
70+
}
71+
}

0 commit comments

Comments
 (0)