[IMP][CSS] Reorder styles according to styles guidelines

This commit is contained in:
Elisabeth Dickinson 2023-01-02 09:44:04 +01:00 committed by Antoine Vandevenne (anv)
parent b0decaa8c4
commit 9392d28758

View File

@ -15,11 +15,8 @@ div[aria-label="related navigation"] {
body { body {
position: relative; position: relative;
a {
@include media-breakpoint-down(lg) {
overflow-wrap: anywhere;
}
a {
&:not(:hover), &.o_logo { &:not(:hover), &.o_logo {
text-decoration: none !important; text-decoration: none !important;
} }
@ -28,25 +25,26 @@ body {
text-underline-position: from-font; text-underline-position: from-font;
} }
&.external { &.external:not(.image-reference):after {
&:not(.image-reference):after { content: '#{$i-external-link}';
content: '#{$i-external-link}'; margin: 0 $o-icon-margin;
margin: 0 $o-icon-margin; font-family: icomoon, sans-serif !important;
font-family: icomoon, sans-serif !important; @include font-size($font-size-base/1.3);
@include font-size($font-size-base/1.3); }
}
@include media-breakpoint-down(lg) {
overflow-wrap: anywhere;
} }
} }
// This fixes the scroll position on all elements, including refs // This fixes the scroll position on all elements, including refs
:target { :target:before {
&:before { @include o-scroll-padding()
@include o-scroll-padding()
}
} }
abbr { abbr {
text-underline-offset: 2px; text-underline-offset: 2px;
&[title="Pull Request"] { &[title="Pull Request"] {
@include o-easter-egg(); @include o-easter-egg();
} }
@ -63,6 +61,7 @@ span.viewcode-link {
float: none; float: none;
margin-left: .3rem; margin-left: .3rem;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Header with logo, searchbar and switchers // Header with logo, searchbar and switchers
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
@ -74,6 +73,7 @@ header {
left: 0; left: 0;
right: 0; right: 0;
z-index: 10; z-index: 10;
.o_main_header { .o_main_header {
height: $o-header-mobile-height; height: $o-header-mobile-height;
padding: 0 $o-padding-s; padding: 0 $o-padding-s;
@ -106,9 +106,9 @@ header {
} }
span { span {
color: $secondary;
@include font-size($font-size-base);
@include o-easter-egg($img:'img/ducky.svg'); @include o-easter-egg($img:'img/ducky.svg');
@include font-size($font-size-base);
color: $secondary;
} }
} }
} }
@ -139,7 +139,6 @@ header {
.btn { .btn {
@include o-position-absolute($top: 50%, $right: .5rem); @include o-position-absolute($top: 50%, $right: .5rem);
transform: translateY(-50%); transform: translateY(-50%);
padding: 0 $o-padding-xs; padding: 0 $o-padding-xs;
font-size: 1.2rem; font-size: 1.2rem;
color: $o-gray; color: $o-gray;
@ -164,8 +163,8 @@ header {
&:before { &:before {
@include o-position-absolute($top: 50%, $right: 3rem); @include o-position-absolute($top: 50%, $right: 3rem);
transform: translateY(-50%);
content: $i-close; content: $i-close;
transform: translateY(-50%);
@include o-inline-icon(auto, middle, 1.2rem); @include o-inline-icon(auto, middle, 1.2rem);
} }
} }
@ -228,8 +227,8 @@ header {
background-color: lighten($secondary, 70%) ; background-color: lighten($secondary, 70%) ;
color: $secondary; color: $secondary;
font-weight: $font-weight-normal; font-weight: $font-weight-normal;
@include font-size($font-size-sm); @include font-size($font-size-sm);
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
width: $o-side-nav-width; width: $o-side-nav-width;
height: calc(100vh - #{$o-headers-height}); height: calc(100vh - #{$o-headers-height});
@ -237,6 +236,7 @@ header {
padding-top: $o-padding-m; padding-top: $o-padding-m;
padding-left: $o-padding-m; padding-left: $o-padding-m;
} }
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 5px; width: 5px;
} }
@ -271,29 +271,25 @@ header {
} }
} }
.o_main_toc { .o_main_toc > ul li {
> ul { &.o_active_toc_entry {
li { &:not(.toctree-l1) > .o_toc_entry_wrapper i[class^="i-"]:not(.collapsed), > a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i {
&.o_active_toc_entry { color: $secondary;
&:not(.toctree-l1) > .o_toc_entry_wrapper i[class^="i-"]:not(.collapsed), > a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i { }
color: $secondary; }
}
}
a { a {
&.current { &.current {
color: $secondary; color: $secondary;
}
}
} }
} }
} }
ul { ul {
.o_deepest_active_toc_entry { .o_deepest_active_toc_entry {
background-color: $o-toc-bg;
border-left: 3px solid $o-toc-border;
margin-left: -3px; margin-left: -3px;
border-left: 3px solid $o-toc-border;
background-color: $o-toc-bg;
} }
> .toctree-l1 { > .toctree-l1 {
@ -328,9 +324,9 @@ header {
} }
.o_main_toc, .o_page_toc_nav { .o_main_toc, .o_page_toc_nav {
ul { // all uls in toc ul {
list-style: none;
padding-left: $o-padding-s; padding-left: $o-padding-s;
list-style: none;
li { li {
> a.reference { > a.reference {
@ -344,31 +340,29 @@ header {
font-weight: $font-weight-normal; font-weight: $font-weight-normal;
} }
&:not(.toctree-l1) { &:not(.toctree-l1) .o_toc_entry_wrapper {
.o_toc_entry_wrapper { &:not(.o_page_toc_title) {
&:not(.o_page_toc_title) { display: flex;
display: flex; align-items: baseline;
align-items: baseline; }
}
> i[class^="i-"] { > i[class^="i-"] {
display: inline-block; display: inline-block;
margin-right: .125rem; margin-right: .125rem;
transition: rotate, .3s; transition: rotate, .3s;
font-size: .75rem; font-size: .75rem;
&[aria-expanded="true"] {
transform: rotate(90deg); &[aria-expanded="true"] {
} transform: rotate(90deg);
} }
} }
} }
&.o_active_toc_entry { &.o_active_toc_entry {
&:not(.toctree-l1) > .o_toc_entry_wrapper { &:not(.toctree-l1) > .o_toc_entry_wrapper i[class^="i-"]:not(.collapsed) {
i[class^="i-"]:not(.collapsed) { transform: rotate(90deg);
transform: rotate(90deg);
}
} }
> a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i { > a , > .o_toc_entry_wrapper a, > .o_toc_entry_wrapper i {
font-weight: $font-weight-bolder; font-weight: $font-weight-bolder;
} }
@ -387,8 +381,14 @@ header {
aside.o_page_toc { aside.o_page_toc {
color: $body-color; color: $body-color;
@include font-size($font-size-sm); @include font-size($font-size-sm);
&:not(.o_in_nav_toc) { &:not(.o_in_nav_toc) {
position: -webkit-sticky;
position: sticky;
display: none; display: none;
height: 100%;
max-height: calc(100vh - #{$o-headers-height});
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
display: block; display: block;
grid-area: toc; grid-area: toc;
@ -396,24 +396,22 @@ header {
padding: $o-padding-m $o-padding-s $o-padding-m 0; padding: $o-padding-m $o-padding-s $o-padding-m 0;
overflow-y: auto; overflow-y: auto;
} }
position: -webkit-sticky;
position: sticky;
height: 100%;
max-height: calc(100vh - #{$o-headers-height});
} }
&.o_in_nav_toc { &.o_in_nav_toc {
display: block; display: block;
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
display: none; display: none;
} }
} }
h5 { h5 {
text-transform: uppercase; margin-bottom: $o-padding-xs;
padding-left: $o-padding-xs;
font-weight: $font-weight-bolder; font-weight: $font-weight-bolder;
color: $o-gray-color; color: $o-gray-color;
padding-left: $o-padding-xs; text-transform: uppercase;
margin-bottom: $o-padding-xs;
} }
a { a {
@ -439,6 +437,7 @@ header {
grid-template-areas: "main"; grid-template-areas: "main";
grid-template-columns: minmax(0,100%); grid-template-columns: minmax(0,100%);
margin-top: $o-headers-mobile-height; margin-top: $o-headers-mobile-height;
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
grid-template-areas: "sidebar main toc"; grid-template-areas: "sidebar main toc";
grid-template-columns: minmax(0,$o-side-nav-width) minmax(0,auto) minmax(0,$o-on-page-width); grid-template-columns: minmax(0,$o-side-nav-width) minmax(0,auto) minmax(0,$o-on-page-width);
@ -452,26 +451,30 @@ header {
.o_code { .o_code {
padding: 0 .3rem; padding: 0 .3rem;
&.file { &.file {
padding-right: .4rem;
background-color: $blue-100;
font-family: $font-family-base; font-family: $font-family-base;
font-weight: $o-font-weight-medium; font-weight: $o-font-weight-medium;
font-style: italic; font-style: italic;
padding-right: .4rem;
color: $blue-700; color: $blue-700;
background-color: $blue-100;
} }
} }
.sig { .sig {
.sig-prename { .sig-prename {
padding-left: .3rem; padding-left: .3rem;
&+ .sig-name { &+ .sig-name {
padding-right: .3rem; padding-right: .3rem;
} }
} }
em.property + .sig-name { em.property + .sig-name {
padding-left: .3rem; padding-left: .3rem;
} }
.sig-paren:last-of-type { .sig-paren:last-of-type {
padding-right: .3rem; padding-right: .3rem;
} }
@ -479,16 +482,19 @@ header {
dl.py, dl.js, dl.o-definition-list { dl.py, dl.js, dl.o-definition-list {
> dd { > dd {
border-left: 3px solid $o-literals-border;
margin-top: -0.075rem; margin-top: -0.075rem;
padding-left: $o-padding-s; padding-left: $o-padding-s;
padding-top: $o-padding-xs; padding-top: $o-padding-xs;
border-left: 3px solid $o-literals-border;
} }
&.class em.property { &.class em.property {
font-size: $font-size-sm; font-size: $font-size-sm;
&:first-child { &:first-child {
border-bottom: 3px solid $o-literals-border; border-bottom: 3px solid $o-literals-border;
} }
&:not(:first-child) { &:not(:first-child) {
@include o-code; @include o-code;
padding: 0 .3rem; padding: 0 .3rem;
@ -501,9 +507,10 @@ header {
} }
dl.field-list { dl.field-list {
@include font-size($font-size-sm);
padding: .5rem; padding: .5rem;
border: 1px solid $o-gray-border; border: 1px solid $o-gray-border;
@include font-size($font-size-sm);
@include media-breakpoint-down(lg) { @include media-breakpoint-down(lg) {
display: block; display: block;
} }
@ -530,11 +537,13 @@ header {
position: relative; position: relative;
grid-area: main; grid-area: main;
padding-bottom: $o-padding-l; padding-bottom: $o-padding-l;
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
padding: $o-padding-m $o-padding-l;
margin: 0;
grid-column-end: toc; grid-column-end: toc;
margin: 0;
padding: $o-padding-m $o-padding-l;
} }
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
grid-column-end: main; grid-column-end: main;
} }
@ -547,14 +556,16 @@ header {
&.o_index { &.o_index {
.o_content_fw_banner { .o_content_fw_banner {
align-items: center;
margin: 0 -0.75rem $o-margin-m; margin: 0 -0.75rem $o-margin-m;
padding: $o-padding-m $o-padding-s; padding: $o-padding-m $o-padding-s;
align-items: center;
@include o-gradient(); @include o-gradient();
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
margin: -#{$o-margin-m} -#{$o-margin-l} $o-margin-m; margin: -#{$o-margin-m} -#{$o-margin-l} $o-margin-m;
padding: $o-padding-m $o-padding-m; padding: $o-padding-m $o-padding-m;
} }
@include media-breakpoint-up(xl) { @include media-breakpoint-up(xl) {
margin: -#{$o-margin-m} -#{$o-margin-l} $o-margin-l; margin: -#{$o-margin-m} -#{$o-margin-l} $o-margin-l;
padding: $o-padding-l $o-padding-l; padding: $o-padding-l $o-padding-l;
@ -570,41 +581,40 @@ header {
font-size: 12px; font-size: 12px;
} }
ul { ul > li {
> li { position: relative;
position: relative; display: flex;
padding-bottom: $o-padding-xs; align-items: center;
display: flex; padding-bottom: $o-padding-xs;
align-items: center;
&:before { &:before {
content: $i-article; content: $i-article;
@include o-inline-icon(0 $o-icon-margin 0 0); @include o-inline-icon(0 $o-icon-margin 0 0);
color: $o-gray-light; color: $o-gray-light;
}
} }
} }
} }
// First level legal page and pages with toctrees (i.e.: User Docs, Install & Maintain, Developer, Contributing) // First level legal page and pages with toctrees (i.e.: User Docs, Install & Maintain, Developer, Contributing)
&.o_fullwidth_page { &.o_fullwidth_page div.toctree-wrapper > ul {
div.toctree-wrapper > ul { flex-wrap: wrap;
display: flex; display: flex;
flex-wrap: wrap;
> li {
@include media-breakpoint-down(lg) {
width: 100%;
}
@include media-breakpoint-up(lg) {
width: 33%;
&:not(:nth-of-type(3n)){
padding-right: $o-padding-m;
}
}
> li {
@include media-breakpoint-down(lg) {
width: 100%;
}
@include media-breakpoint-up(lg) {
width: 33%;
&:not(:nth-of-type(3n)){
padding-right: $o-padding-m;
} }
} }
} }
}
// pages with column for code on the right // pages with column for code on the right
&.o_has_code_column { &.o_has_code_column {
@ -616,9 +626,9 @@ header {
section { section {
> * { > * {
width: $o-halfpage-width;
float: left; float: left;
clear: left; clear: left;
width: $o-halfpage-width;
} }
> h1 { > h1 {
@ -631,9 +641,9 @@ header {
} }
.doc-aside { .doc-aside {
width: $o-codecol-width;
float: none; float: none;
clear: none; clear: none;
width: $o-codecol-width;
margin-left: 57%; margin-left: 57%;
padding: $o-padding-s; padding: $o-padding-s;
@ -655,10 +665,8 @@ header {
} }
} }
&.o_hide_toc { &.o_hide_toc .toctree-wrapper {
.toctree-wrapper { display: none;
display: none;
}
} }
.toctree-wrapper { .toctree-wrapper {
@ -669,12 +677,11 @@ header {
.toctree-l1 > a { .toctree-l1 > a {
display: block; display: block;
@include font-size($h2-font-size);
margin-top: $o-padding-m; margin-top: $o-padding-m;
margin-bottom: $o-margin-s;
padding-bottom: $o-padding-xs; padding-bottom: $o-padding-xs;
border-bottom: 1px solid $o-gray-border; border-bottom: 1px solid $o-gray-border;
margin-bottom: $o-margin-s; @include font-size($h2-font-size);
font-size: 1.2rem;
font-weight: 600; font-weight: 600;
} }
@ -688,23 +695,25 @@ header {
} }
a[href="#"] { a[href="#"] {
pointer-events: none;
cursor: default;
color: $o-gray-color; color: $o-gray-color;
font-weight: $font-weight-bold; font-weight: $font-weight-bold;
pointer-events: none;
cursor: default;
} }
} }
article.doc-body { article.doc-body {
padding-top: $o-padding-s;
position: relative; position: relative;
padding-top: $o-padding-s;
.o_git_link { .o_git_link {
@include font-size($font-size-sm);
@include o-position-absolute($top: 0px, $right: $o-margin-s); @include o-position-absolute($top: 0px, $right: $o-margin-s);
@include font-size($font-size-sm);
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
@include o-position-absolute($top: 10px, $right: $o-margin-s); @include o-position-absolute($top: 10px, $right: $o-margin-s);
} }
i { i {
margin-right: .2rem; margin-right: .2rem;
} }
@ -719,9 +728,9 @@ header {
margin-bottom: $o-margin-m; margin-bottom: $o-margin-m;
> h1 { > h1 {
margin-bottom: $o-margin-s;
color: $secondary; color: $secondary;
font-weight: $font-weight-bolder; font-weight: $font-weight-bolder;
margin-bottom: $o-margin-s;
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
max-width: calc(100% - 120px); max-width: calc(100% - 120px);
@ -729,11 +738,11 @@ header {
} }
> h2 { > h2 {
font-family: $o-font-family-serif;
color: $o-gray-color;
margin-bottom: $o-margin-s; margin-bottom: $o-margin-s;
padding-bottom: .3rem; padding-bottom: .3rem;
border-bottom: 1px solid $o-gray-border; border-bottom: 1px solid $o-gray-border;
font-family: $o-font-family-serif;
color: $o-gray-color;
} }
> h3 { > h3 {
@ -754,21 +763,20 @@ header {
} }
p > img { p > img {
border: none;
padding: 0;
margin-bottom: 0; margin-bottom: 0;
padding: 0;
border: none;
} }
.figure { .figure {
.caption, .caption-text { .caption, .caption-text {
font-weight: $font-weight-bold; font-weight: $font-weight-bold;
color: $o-gray; color: $o-gray;
} }
.caption, .caption-text, .legend, .legend p { .caption, .caption-text, .legend, .legend p {
font-style: italic;
margin: 0 auto; margin: 0 auto;
font-style: italic;
} }
@include media-breakpoint-up(md) { @include media-breakpoint-up(md) {
@ -779,10 +787,10 @@ header {
} }
a.headerlink { a.headerlink {
text-decoration: none;
font-size: 0;
line-height: 0; line-height: 0;
visibility: hidden !important; visibility: hidden !important;
text-decoration: none;
font-size: 0;
&:before { &:before {
content: "\a0"; content: "\a0";
@ -790,26 +798,27 @@ header {
&:after { &:after {
content: '#{$i-link}'; content: '#{$i-link}';
font-family: icomoon, sans-serif !important;
@include font-size($font-size-base);
margin: 0 0 0 .3rem;
visibility: hidden; visibility: hidden;
color: $o-gray-light;
opacity: 0; opacity: 0;
transition: all, .1s; transition: all, .1s;
margin: 0 0 0 .3rem;
color: $o-gray-light;
font-family: icomoon, sans-serif !important;
@include font-size($font-size-base);
} }
} }
*:hover > a.headerlink:after { *:hover > a.headerlink:after {
// This makes permalinks only visible on hover. // This makes permalinks only visible on hover.
visibility: visible; visibility: visible;
opacity: 1; opacity: 1;
} }
table.table { table.table {
@include media-breakpoint-down(lg){ @include media-breakpoint-down(lg){
display: block; display: block;
overflow-x: auto; overflow-x: auto;
code { code {
overflow-wrap: break-word; overflow-wrap: break-word;
} }
@ -821,20 +830,20 @@ header {
div[class^="highlight"] { div[class^="highlight"] {
// This styles the consoles like read-the-doc's consoles // This styles the consoles like read-the-doc's consoles
overflow-x: auto; overflow-x: auto;
border: 1px solid $o-gray-border;
margin: 1px 0 24px 0; margin: 1px 0 24px 0;
border: 1px solid $o-gray-border;
div[class^="highlight"] { div[class^="highlight"] {
margin: 0;
padding: 0; padding: 0;
border: none; border: none;
margin: 0;
} }
pre { pre {
display: block;
overflow: auto;
white-space: pre; white-space: pre;
margin: 0; margin: 0;
padding: 1rem; padding: 1rem;
display: block;
overflow: auto;
} }
} }
@ -847,11 +856,13 @@ header {
line-height: 1; line-height: 1;
color: $blue-600; color: $blue-600;
font-weight: $font-weight-bold; font-weight: $font-weight-bold;
&:before { &:before {
content:'?'; content:'?';
display: inline-block; display: inline-block;
width: 15px; width: 15px;
height: 15px; height: 15px;
margin: 0 .1rem;
border: 2px solid $blue-600; border: 2px solid $blue-600;
border-radius: 20px; border-radius: 20px;
text-align: center; text-align: center;
@ -859,26 +870,24 @@ header {
font-size: 12px; font-size: 12px;
font-weight: $font-weight-bolder; font-weight: $font-weight-bolder;
font-style: normal; font-style: normal;
margin: 0 .1rem;
} }
} }
.container .container:not([class^="col"]) { .container .container:not([class^="col"]) {
padding: 0;
margin: 0; margin: 0;
padding: 0;
} }
ul, ol { ul, ol {
text-align: left; text-align: left;
} }
ol { ol ol {
ol { list-style: lower-alpha;
list-style: lower-alpha;
> li:before { > li:before {
content: none; content: none;
}
} }
} }
@ -890,8 +899,8 @@ header {
border-width: 0 0 0 $alert-border-width; border-width: 0 0 0 $alert-border-width;
> *:not(.sphinx-tabs) .o_code, > *:not(.sphinx-tabs) div[class^="highlight"] { > *:not(.sphinx-tabs) .o_code, > *:not(.sphinx-tabs) div[class^="highlight"] {
background-color: $white !important;
border: 1px solid var(--o-alert-code-border-color,#{$o-gray-border}) ; border: 1px solid var(--o-alert-code-border-color,#{$o-gray-border}) ;
background-color: $white !important;
color: inherit; color: inherit;
} }
@ -904,14 +913,15 @@ header {
} }
> h3, > .alert-title { > h3, > .alert-title {
line-height: 1em;
margin: 0 0 10px 0; margin: 0 0 10px 0;
@include font-size($h5-font-size); @include font-size($h5-font-size);
line-height: 1em;
font-weight: $font-weight-bolder; font-weight: $font-weight-bolder;
&:before { &:before {
content: var(--o-alert-icon, #{$o-alert-default-icon}); content: var(--o-alert-icon, #{$o-alert-default-icon});
@include o-inline-icon(0 $o-icon-margin 0 0, baseline, inherit, inherit); @include o-inline-icon(0 $o-icon-margin 0 0, baseline, inherit, inherit);
@include media-breakpoint-down(md) { @include media-breakpoint-down(md) {
display:none; display:none;
} }
@ -922,6 +932,7 @@ header {
&[class^="admonition"] { &[class^="admonition"] {
--o-alert-icon: '#{$i-info}'; --o-alert-icon: '#{$i-info}';
--o-alert-code-border-color: tint-color($info, 30%); --o-alert-code-border-color: tint-color($info, 30%);
$background: shift-color($info, $alert-bg-scale); $background: shift-color($info, $alert-bg-scale);
$border: shift-color($info, $alert-border-scale); $border: shift-color($info, $alert-border-scale);
$color: shift-color($info, $alert-color-scale); $color: shift-color($info, $alert-color-scale);
@ -943,6 +954,7 @@ header {
&.alert-secondary { &.alert-secondary {
--o-alert-icon: '#{$i-article}'; --o-alert-icon: '#{$i-article}';
--o-alert-code-border-color: #{tint-color($secondary, 30%)}; --o-alert-code-border-color: #{tint-color($secondary, 30%)};
a { a {
color: $secondary; color: $secondary;
} }
@ -952,6 +964,7 @@ header {
&.alert-tip { &.alert-tip {
--o-alert-icon: '#{$i-lightbulb}'; --o-alert-icon: '#{$i-lightbulb}';
--o-alert-code-border-color: #{$o-gray-border}; --o-alert-code-border-color: #{$o-gray-border};
$background: $o-gray-bg; $background: $o-gray-bg;
$border: shift-color($primary, $alert-border-scale); $border: shift-color($primary, $alert-border-scale);
$color: shift-color($primary, $alert-color-scale); $color: shift-color($primary, $alert-color-scale);
@ -959,6 +972,7 @@ header {
@if (contrast-ratio($background, $color) < $min-contrast-ratio) { @if (contrast-ratio($background, $color) < $min-contrast-ratio) {
$color: mix($primary, color-contrast($background), abs($alert-color-scale)); $color: mix($primary, color-contrast($background), abs($alert-color-scale));
} }
@include alert-variant($background, $border, $color); @include alert-variant($background, $border, $color);
} }
@ -1008,6 +1022,7 @@ header {
@if (contrast-ratio($background, $color) < $min-contrast-ratio) { @if (contrast-ratio($background, $color) < $min-contrast-ratio) {
$color: mix($o-accordion-bg, color-contrast($background), abs($alert-color-scale)); $color: mix($o-accordion-bg, color-contrast($background), abs($alert-color-scale));
} }
@include alert-variant($background, $border, $color); @include alert-variant($background, $border, $color);
.accordion-button { .accordion-button {
@ -1048,15 +1063,15 @@ header {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
.sphinx-tabs { .sphinx-tabs {
padding: 0;
margin-bottom: $o-margin-s; margin-bottom: $o-margin-s;
padding: 0;
div[role="tablist"] { div[role="tablist"] {
border-color: $o-gray-border;
display: inline-flex; display: inline-flex;
width: 100%;
overflow-x: auto; overflow-x: auto;
overflow-y: clip; overflow-y: clip;
width: 100%; border-color: $o-gray-border;
} }
*:focus-visible { *:focus-visible {
@ -1072,19 +1087,19 @@ header {
} }
.sphinx-tabs-tab { .sphinx-tabs-tab {
background: $o-gray-bg; padding: $o-padding-xs $o-padding-s;
color: $o-gray-color;
border: 0; border: 0;
border-top: solid 1px $o-gray-border; border-top: solid 1px $o-gray-border;
padding: $o-padding-xs $o-padding-s; background: $o-gray-bg;
color: $o-gray-color;
&:hover { &:hover {
&:not([aria-selected="true"]) { &:not([aria-selected="true"]) {
cursor: pointer; cursor: pointer;
border-radius: 0;
background: tint-color($secondary, 80%); background: tint-color($secondary, 80%);
color: $secondary; color: $secondary;
transition: color .15s, background .15s; transition: color .15s, background .15s;
border-radius: 0;
} }
} }
@ -1116,10 +1131,10 @@ header {
} }
.sphinx-tabs-panel { .sphinx-tabs-panel {
padding: $o-padding-s;
border: 1px solid $o-gray-border;
background: $white; background: $white;
color: $o-gray-color; color: $o-gray-color;
border: 1px solid $o-gray-border;
padding: $o-padding-s;
&:focus { &:focus {
outline: none; outline: none;
@ -1143,14 +1158,15 @@ footer {
padding-top: $o-padding-l; padding-top: $o-padding-l;
padding-bottom: $o-padding-l; padding-bottom: $o-padding-l;
background: $o-gray-bg; background: $o-gray-bg;
@include media-breakpoint-up(lg) { @include media-breakpoint-up(lg) {
padding-left: calc(#{$o-side-nav-width} + #{$o-padding-l}) padding-left: calc(#{$o-side-nav-width} + #{$o-padding-l})
} }
h4 { h4 {
margin-bottom: $o-margin-s;
color: $secondary; color: $secondary;
font-weight: $font-weight-bolder; font-weight: $font-weight-bolder;
margin-bottom: $o-margin-s;
} }
} }