Skip to content
Closed
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions doc/en/_static/pytest.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* Hide list bullets and top-level indent in TOC sidebar */
.sidebar-scroll ul {list-style: none;}
.sidebar-scroll > ul {padding-left: 0;}
.sidebar-scroll li {margin: 0.4em 0;}
Comment on lines +1 to +4
Copy link
Author

Choose a reason for hiding this comment

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

A slight change from @pradyunsg's #12575, as I discovered that the navigation sidebar isn't styled .sidebar (surprisingly), but the events sidebar is. So, nesting these changes under .sidebar would've hit the wrong part of the docs.

The navigation content-list is under a div at .sidebar-drawer > .sidebar-container > .sidebar-scroll.

I suppose I could've used either of those parent selectors instead, except for the .sidebar-scroll > ul change.

Copy link
Contributor

Choose a reason for hiding this comment

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

Wait, this was not meant for TOC sidebar at all. It's meant for the literal "sidebar" thing in reStructuredText: https://pradyunsg.me/furo/kitchen-sink/generic/#sidebar

Copy link
Contributor

@pradyunsg pradyunsg Jul 7, 2024

Choose a reason for hiding this comment

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

My understanding is that folks didn't like the extra indentation that having list within sidebar, specifically due to lack of width for content in an already thin sidebar.

Copy link
Author

Choose a reason for hiding this comment

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

Oh, no, pytest devs want list markers in the event sidebar. The original CSS this replaces was intended to remove them only from the TOC/navigation sidebar, but it was overzealous by a lot.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, fun.

Comment on lines +2 to +4
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.sidebar-scroll ul {list-style: none;}
.sidebar-scroll > ul {padding-left: 0;}
.sidebar-scroll li {margin: 0.4em 0;}
.sidebar ul {
list-style: none;
padding-left: 0;
}
.sidebar ul li {
margin: 0.4em 0;
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm gonna say this isn't necessary because I clearly misunderstood what the goals were here.

/* Widen the events sidebar on the front page */
@media (min-width: 46em) {
#features {
width: 50%;
margin-bottom: 1em;
}
}
7 changes: 0 additions & 7 deletions doc/en/_templates/style.html

This file was deleted.

8 changes: 5 additions & 3 deletions doc/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
html_static_path = ["_static"]

# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
Expand All @@ -274,7 +274,6 @@
"globaltoc.html",
"links.html",
"sidebar/scroll-end.html",
"style.html",
],
"**": [
"sidebar/brand.html",
Expand All @@ -284,10 +283,13 @@
"relations.html",
"links.html",
"sidebar/scroll-end.html",
"style.html",
],
}

html_css_files = [
"pytest.css",
]

# Additional templates that should be rendered to pages, maps page names to
# template names.
# html_additional_pages = {}
Expand Down