Skip to content

Commit

Permalink
Added dark theme selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Feb 16, 2022
1 parent e15bc85 commit 7915f63
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions sphinx_tabs/static/tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,50 @@
.sphinx-tab img {
margin-bottom: 24 px;
}

/* Dark theme preference styling */

@media (prefers-color-scheme: dark) {
body:not([data-theme="light"]) .sphinx-tabs-panel {
color: white;
background-color: rgb(50, 50, 50);
}

body:not([data-theme="light"]) .sphinx-tabs-tab {
color: white;
font-size: 16px;
font-weight: 400;
background-color: rgba(255, 255, 255, 0.05);
}

body:not([data-theme="light"]) .sphinx-tabs-tab[aria-selected="true"] {
font-weight: 700;
border: 1px solid #a0b3bf;
border-bottom: 1px solid rgb(50, 50, 50);
margin: -1px;
background-color: rgb(50, 50, 50);
}
}

/* Explicit dark theme styling */

body[data-theme="dark"] .sphinx-tabs-panel {
color: white;
background-color: rgb(50, 50, 50);
}

body[data-theme="dark"] .sphinx-tabs-tab {
color: white;
font-size: 16px;
font-weight: 400;
border: 1px solid rgba(255, 255, 255, 0.15);
background-color: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .sphinx-tabs-tab[aria-selected="true"] {
font-weight: 700;
border: 1px solid #a0b3bf;
border-bottom: 2px solid rgb(50, 50, 50);
margin: -1px;
background-color: rgb(50, 50, 50);
}

0 comments on commit 7915f63

Please sign in to comment.