Skip to content

Commit 2ea55a5

Browse files
authored
style: modify link style in container (#1124)
1 parent ec951a7 commit 2ea55a5

File tree

1 file changed

+78
-15
lines changed

1 file changed

+78
-15
lines changed

packages/plugin-container-syntax/container.css

Lines changed: 78 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,24 @@
2121
--rp-container-details-text: #666666;
2222
--rp-container-details-bg: rgba(128, 128, 128, 0.1);
2323
--rp-container-details-code-bg: rgba(128, 128, 128, 0.1);
24+
--rp-container-details-link: rgb(0, 119, 255);
2425
}
2526

2627
.dark {
27-
--rp-container-info-text: var(--rp-text-1);
28+
--rp-container-info-text: rgb(66, 215, 140);
2829
--rp-container-info-bg: rgba(7, 156, 112, 0.1);
2930

30-
--rp-container-details-text: var(--rp-text-1);
31-
--rp-container-details-bg: rgba(128, 128, 128, 0.16);
32-
31+
--rp-container-warning-text: rgb(251, 180, 81);
3332
--rp-container-warning-border: rgba(255, 197, 23, 0.25);
3433
--rp-container-warning-bg: rgba(255, 197, 23, 0.12);
35-
--rp-container-warning-text: var(--rp-text-1);
3634

35+
--rp-container-danger-text: rgb(247, 110, 133);
3736
--rp-container-danger-border: rgba(237, 60, 80, 0.3);
3837
--rp-container-danger-bg: rgba(237, 60, 80, 0.12);
39-
--rp-container-danger-text: var(--rp-text-1);
38+
39+
--rp-container-details-text: var(--rp-text-1);
40+
--rp-container-details-bg: rgba(128, 128, 128, 0.16);
41+
--rp-container-details-link: rgb(0, 119, 255);
4042
}
4143

4244
.rspress-doc .rspress-directive {
@@ -45,7 +47,7 @@
4547
padding: 20px 24px 12px;
4648
line-height: 1.7;
4749
font-size: 14px;
48-
font-weight: 500;
50+
font-weight: 400;
4951
margin: 24px 0;
5052
}
5153

@@ -72,55 +74,116 @@
7274

7375
.rspress-doc .rspress-directive code {
7476
color: inherit;
75-
font-weight: bold;
7677
font-size: 13px;
7778
}
7879

7980
.rspress-doc .rspress-directive.tip,
8081
.rspress-doc .rspress-directive.note,
8182
.rspress-doc .rspress-directive.info {
8283
border-color: var(--rp-container-info-border);
83-
color: var(--rp-container-info-text);
8484
background-color: var(--rp-container-info-bg);
8585
}
8686

87-
.rspress-doc .rspress-directive.tip code,
88-
.rspress-doc .rspress-directive.note code {
89-
background-color: var(--rp-container-info-code-bg);
87+
.rspress-doc .rspress-directive.tip .rspress-directive-title,
88+
.rspress-doc .rspress-directive.note .rspress-directive-title,
89+
.rspress-doc .rspress-directive.info .rspress-directive-title {
90+
color: var(--rp-container-info-text);
9091
}
9192

93+
.rspress-doc .rspress-directive.tip code,
94+
.rspress-doc .rspress-directive.note code,
9295
.rspress-doc .rspress-directive.info code {
96+
color: var(--rp-container-info-text);
9397
background-color: var(--rp-container-info-code-bg);
9498
}
9599

100+
.rspress-doc .rspress-directive.tip a,
101+
.rspress-doc .rspress-directive.note a,
102+
.rspress-doc .rspress-directive.info a {
103+
font-weight: 500;
104+
color: var(--rp-container-info-text);
105+
transition: color 0.25s;
106+
}
107+
108+
.rspress-doc .rspress-directive.tip a:hover,
109+
.rspress-doc .rspress-directive.note a:hover,
110+
.rspress-doc .rspress-directive.info a:hover {
111+
border-bottom: 1px solid var(--rp-container-info-text);
112+
}
113+
96114
.rspress-doc .rspress-directive.warning {
97115
border-color: var(--rp-container-warning-border);
98-
color: var(--rp-container-warning-text);
99116
background-color: var(--rp-container-warning-bg);
100117
}
101118

119+
.rspress-doc .rspress-directive.warning .rspress-directive-title {
120+
color: var(--rp-container-warning-text);
121+
}
122+
102123
.rspress-doc .rspress-directive.warning code {
124+
color: var(--rp-container-warning-text);
103125
background-color: var(--rp-container-warning-code-bg);
104126
}
105127

128+
.rspress-doc .rspress-directive.warning a {
129+
font-weight: 500;
130+
color: var(--rp-container-warning-text);
131+
transition: color 0.25s;
132+
}
133+
134+
.rspress-doc .rspress-directive.warning a:hover {
135+
border-bottom: 1px solid var(--rp-container-warning-text);
136+
}
137+
106138
.rspress-doc .rspress-directive.caution,
107139
.rspress-doc .rspress-directive.danger {
108140
border-color: var(--rp-container-danger-border);
109-
color: var(--rp-container-danger-text);
110141
background-color: var(--rp-container-danger-bg);
111142
}
112143

144+
.rspress-doc .rspress-directive.caution .rspress-directive-title,
145+
.rspress-doc .rspress-directive.danger .rspress-directive-title {
146+
color: var(--rp-container-danger-text);
147+
}
148+
113149
.rspress-doc .rspress-directive.caution code,
114150
.rspress-doc .rspress-directive.danger code {
151+
color: var(--rp-container-danger-text);
115152
background-color: var(--rp-container-danger-code-bg);
116153
}
117154

155+
.rspress-doc .rspress-directive.caution a,
156+
.rspress-doc .rspress-directive.danger a {
157+
font-weight: 500;
158+
color: var(--rp-container-danger-text);
159+
transition: color 0.25s;
160+
}
161+
162+
.rspress-doc .rspress-directive.caution a:hover,
163+
.rspress-doc .rspress-directive.danger a:hover {
164+
border-bottom: 1px solid var(--rp-container-danger-text);
165+
}
166+
118167
.rspress-doc .rspress-directive.details {
119168
border-color: var(--rp-container-details-border);
120-
color: var(--rp-container-details-text);
121169
background-color: var(--rp-container-details-bg);
122170
}
123171

172+
.rspress-doc .rspress-directive.details .rspress-directive-title {
173+
color: var(--rp-container-details-text);
174+
}
175+
124176
.rspress-doc .rspress-directive.details code {
177+
color: var(--rp-container-details-text);
125178
background-color: var(--rp-container-details-code-bg);
126179
}
180+
181+
.rspress-doc .rspress-directive.details a {
182+
font-weight: 500;
183+
color: var(--rp-container-details-link);
184+
transition: color 0.25s;
185+
}
186+
187+
.rspress-doc .rspress-directive.details a:hover {
188+
border-bottom: 1px solid var(--rp-container-details-link);
189+
}

0 commit comments

Comments
 (0)