Skip to content

Commit c0c7597

Browse files
Migrate stab elements style to CSS variables
1 parent dbaf3e6 commit c0c7597

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

src/librustdoc/html/static/css/rustdoc.css

+7
Original file line numberDiff line numberDiff line change
@@ -1062,6 +1062,13 @@ so that we can apply CSS-filters to change the arrow color in themes */
10621062
margin-bottom: 5px;
10631063
font-size: 0.875rem;
10641064
font-weight: normal;
1065+
color: var(--main-color);
1066+
background-color: var(--stab-background-color);
1067+
}
1068+
1069+
.stab.portability > code {
1070+
background: none;
1071+
color: var(--stab-code-color);
10651072
}
10661073

10671074
.stab .emoji {

src/librustdoc/html/static/css/themes/ayu.css

+2-10
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
3737
--link-color: #39afd7;
3838
--sidebar-link-color: #53b1db;
3939
--sidebar-current-link-background-color: transparent;
40+
--stab-background-color: #314559;
41+
--stab-code-color: #e6e1cf;
4042
}
4143

4244
.slider {
@@ -155,16 +157,6 @@ details.rustdoc-toggle > summary::before {
155157
color: #000;
156158
}
157159

158-
.stab {
159-
color: #c5c5c5;
160-
background: #314559 !important;
161-
}
162-
163-
.stab.portability > code {
164-
color: #e6e1cf;
165-
background: none;
166-
}
167-
168160
.result-name .primitive > i, .result-name .keyword > i {
169161
color: #788797;
170162
}

src/librustdoc/html/static/css/themes/dark.css

+2-7
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
--link-color: #d2991d;
3333
--sidebar-link-color: #fdbf35;
3434
--sidebar-current-link-background-color: #444;
35+
--stab-background-color: #314559;
36+
--stab-code-color: #e6e1cf;
3537
}
3638

3739
.slider {
@@ -114,13 +116,6 @@ details.rustdoc-toggle > summary::before {
114116
filter: invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);
115117
}
116118

117-
.stab { background: #314559; }
118-
119-
.stab.portability > code {
120-
color: #e6e1cf;
121-
background: none;
122-
}
123-
124119
.src-line-numbers :target { background-color: transparent; }
125120

126121
/* Code highlighting */

src/librustdoc/html/static/css/themes/light.css

+2-3
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
--link-color: #3873ad;
3333
--sidebar-link-color: #356da4;
3434
--sidebar-current-link-background-color: #fff;
35+
--stab-background-color: #fff5d6;
36+
--stab-code-color: #000;
3537
}
3638

3739
.slider {
@@ -102,9 +104,6 @@ body.source .example-wrap pre.rust a {
102104
filter: invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);
103105
}
104106

105-
.stab { background: #FFF5D6; border-color: #FFC600; }
106-
.stab.portability > code { background: none; }
107-
108107
.src-line-numbers :target { background-color: transparent; }
109108

110109
/* Code highlighting */

0 commit comments

Comments
 (0)