Skip to content

Commit

Permalink
Revert adding more padding to Furo table of contents (#421)
Browse files Browse the repository at this point in the history
I thought that this was a good idea because we intentionally make the
left sidebar overall bigger.

But I realized when looking at the Qiskit Experiments docs that we have
a lot of API page titles, and those tend to have long names.

![Screenshot 2023-06-27 at 12 26 48
PM](https://github.com/Qiskit/qiskit_sphinx_theme/assets/14852634/91725369-e121-4f70-babc-fefeb3ea1662)

So, it's better to fully use the screen real estate and use Furo's
default padding rules, which IMO are sufficient.

We were also diverging from IBM Quantum, which uses 16 pixels of
padding.

Finally, this avoids weirdness with the right chevrons not having enough
padding. Closes
#411.
  • Loading branch information
Eric-Arellano authored Jun 28, 2023
1 parent 688cc5b commit 617dd77
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/qiskit_sphinx_theme/assets/styles/qiskit-sphinx-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ body {
--color-sidebar-item-background--hover: #efeff4;
/* This defaults to 15em in Furo, but we want a little bigger. */
--qiskit-left-sidebar-width: 18em;
/* This defaults to 1rem, but we make it bigger since we increase the size of the sidebar. */
--sidebar-item-spacing-horizontal: 2rem;

/* -----------------------------------------------------------------------
* Admonitions
Expand Down Expand Up @@ -203,14 +201,6 @@ div.header-left svg use {
* Left side bar: styling
* ------------------------------------------------------------------------------- */

/* Our override of --sidebar-item-spacing-horizontal to be 2rem rather than 1rem would naively
* result in subpages in the left table of contents having too much indentation. We want to keep
* the same indentation, only increase the overall padding of the left bar. So, we revert back
* this rule to be the original 1rem. */
.sidebar-tree li > ul {
margin-left: calc(var(--sidebar-item-spacing-horizontal) * 0.5);
}

/* Even though we override --color-sidebar-link--top-level to be a more muted look, we change
* the currently selected page to be purple to make it more obvious. */
.sidebar-tree .current-page > .reference {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 617dd77

Please sign in to comment.