diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 45433fd9b65fe..5f034723c33a4 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -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 { diff --git a/src/librustdoc/html/static/css/themes/ayu.css b/src/librustdoc/html/static/css/themes/ayu.css index 1c317aa7cfe6c..219e6509d2007 100644 --- a/src/librustdoc/html/static/css/themes/ayu.css +++ b/src/librustdoc/html/static/css/themes/ayu.css @@ -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 { @@ -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; } diff --git a/src/librustdoc/html/static/css/themes/dark.css b/src/librustdoc/html/static/css/themes/dark.css index a8204eebe547b..0b598db82ee80 100644 --- a/src/librustdoc/html/static/css/themes/dark.css +++ b/src/librustdoc/html/static/css/themes/dark.css @@ -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 { @@ -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 */ diff --git a/src/librustdoc/html/static/css/themes/light.css b/src/librustdoc/html/static/css/themes/light.css index 8fb60b6f887f5..fe1cf10bc2fd4 100644 --- a/src/librustdoc/html/static/css/themes/light.css +++ b/src/librustdoc/html/static/css/themes/light.css @@ -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 { @@ -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 */