Skip to content

Commit

Permalink
Rollup merge of #102620 - GuillaumeGomez:css-stab-migration, r=notriddle
Browse files Browse the repository at this point in the history
Migrate `.stab` elements style to CSS variables

Part of #98460.

There should be no UI changes.

r? `@notriddle`
  • Loading branch information
matthiaskrgr authored Oct 3, 2022
2 parents f50b72f + c0c7597 commit d329213
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
7 changes: 7 additions & 0 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -1050,6 +1050,13 @@ so that we can apply CSS-filters to change the arrow color in themes */
margin-bottom: 5px;
font-size: 0.875rem;
font-weight: normal;
color: var(--main-color);
background-color: var(--stab-background-color);
}

.stab.portability > code {
background: none;
color: var(--stab-code-color);
}

.stab .emoji {
Expand Down
12 changes: 2 additions & 10 deletions src/librustdoc/html/static/css/themes/ayu.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Original by Dempfi (https://github.com/dempfi/ayu)
--link-color: #39afd7;
--sidebar-link-color: #53b1db;
--sidebar-current-link-background-color: transparent;
--stab-background-color: #314559;
--stab-code-color: #e6e1cf;
}

.slider {
Expand Down Expand Up @@ -155,16 +157,6 @@ details.rustdoc-toggle > summary::before {
color: #000;
}

.stab {
color: #c5c5c5;
background: #314559 !important;
}

.stab.portability > code {
color: #e6e1cf;
background: none;
}

.result-name .primitive > i, .result-name .keyword > i {
color: #788797;
}
Expand Down
9 changes: 2 additions & 7 deletions src/librustdoc/html/static/css/themes/dark.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
--link-color: #d2991d;
--sidebar-link-color: #fdbf35;
--sidebar-current-link-background-color: #444;
--stab-background-color: #314559;
--stab-code-color: #e6e1cf;
}

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

.stab { background: #314559; }

.stab.portability > code {
color: #e6e1cf;
background: none;
}

.src-line-numbers :target { background-color: transparent; }

/* Code highlighting */
Expand Down
5 changes: 2 additions & 3 deletions src/librustdoc/html/static/css/themes/light.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
--link-color: #3873ad;
--sidebar-link-color: #356da4;
--sidebar-current-link-background-color: #fff;
--stab-background-color: #fff5d6;
--stab-code-color: #000;
}

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

.stab { background: #FFF5D6; border-color: #FFC600; }
.stab.portability > code { background: none; }

.src-line-numbers :target { background-color: transparent; }

/* Code highlighting */
Expand Down

0 comments on commit d329213

Please sign in to comment.