Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added dark theme selectors #147

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Comment on lines +65 to +66
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set in line 16-17

background-color: rgba(255, 255, 255, 0.05);
}

body:not([data-theme="light"]) .sphinx-tabs-tab[aria-selected="true"] {
font-weight: 700;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set in line 25

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;
Comment on lines +88 to +89
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set in line 16-17

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already set in line 25

border: 1px solid #a0b3bf;
border-bottom: 2px solid rgb(50, 50, 50);
margin: -1px;
background-color: rgb(50, 50, 50);
}