Skip to content

Infra: Mute table zebra stripes to de-emphasise different rows #2740

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

Merged
merged 2 commits into from
Aug 28, 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
13 changes: 7 additions & 6 deletions pep_sphinx_extensions/pep_theme/static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
/* Set master colours */
:root {
--colour-background: var(--light, white) var(--dark, #011);
--colour-background-accent: var(--light, #ccc) var(--dark, #333);
--colour-background-accent-strong: var(--light, #ccc) var(--dark, #333);
--colour-background-accent-light: var(--light, #ddd) var(--dark, #222);
Copy link
Member

@CAM-Gerlach CAM-Gerlach Aug 3, 2022

Choose a reason for hiding this comment

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

Suggested change
--colour-background-accent-light: var(--light, #ddd) var(--dark, #222);
--colour-background-accent-light: var(--light, #eee) var(--dark, #111);

Mute the colors as much as practical (since we're adding back the lines to clearly delineate the rows)

--colour-text: var(--light, #333) var(--dark, #ccc);
--colour-links: var(--light, #069) var(--dark, #8bf);
--colour-links-light: var(--light, #057) var(--dark, #acf);
Expand Down Expand Up @@ -116,7 +117,7 @@ a:visited {
display: inline;
overflow-wrap: break-word;
overflow-wrap: anywhere;
text-decoration-color: var(--colour-background-accent);
text-decoration-color: var(--colour-background-accent-strong);
}
a:hover,
a:focus {
Expand Down Expand Up @@ -225,14 +226,14 @@ div.table-wrapper {
table {
width: 100%;
border-collapse: collapse;
border-top: 1px solid var(--colour-background-accent);
border-bottom: 1px solid var(--colour-background-accent);
border-top: 1px solid var(--colour-background-accent-light);
border-bottom: 1px solid var(--colour-background-accent-light);
Comment on lines +229 to +230
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
border-top: 1px solid var(--colour-background-accent-light);
border-bottom: 1px solid var(--colour-background-accent-light);
border-top: 1px solid var(--colour-background-accent-strong);
border-bottom: 1px solid var(--colour-background-accent-strong);

To be consistent with the current and the lines

}
table caption {
margin: 1rem 0 .75rem;
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}
table tr {
border-bottom: 1px solid var(--colour-rule-strong);
}
table thead tr {
background-color: var(--colour-background-accent-strong);
}

Add horizontal rules and clearly delineate header row

table tbody tr:nth-of-type(odd) {
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
table tbody tr:nth-of-type(odd) {
table tbody tr:nth-of-type(even) {

Switch this to even, since it looks better with the revised colors

background-color: var(--colour-background-accent);
background-color: var(--colour-background-accent-light);
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
}
}
table tbody tr:hover {
background-color: var(--colour-background-accent-strong);
}

Add "highlight" on hover

table th,
table td {
Expand Down Expand Up @@ -294,7 +295,7 @@ ul.breadcrumbs a {

/* Admonitions rules */
div.admonition {
background-color: var(--colour-background-accent);
background-color: var(--colour-background-accent-strong);
margin-bottom: 1rem;
margin-top: 1rem;
padding: 0.5rem 0.75rem;
Expand Down