pydata-sphinx-theme icon indicating copy to clipboard operation
pydata-sphinx-theme copied to clipboard

Styling bug for `"show_nav_level": 0`

Open SimenZhor opened this issue 1 year ago • 0 comments

Hi,

I noticed that "show_nav_level": 0 is probably not behaving as intended currently. The chevron/dropdown icons is jumping around and into the scroll-bar like so:

show_nav_level0

The issue seems possible to solve with text-alignment, but I'm not sure if there is a better way to do it. My "fix" that seems to work (in \src\pydata_sphinx_theme\assets\styles\components\_navbar-links.scss):

.toctree-checkbox {
    ~ ul {
      display: none;
    }
    ~ label i {
      transform: rotate(0deg);
      text-align: left;
    }
  }
  .toctree-checkbox:checked {
    ~ ul {
      display: block;
    }
    ~ label i {
      transform: rotate(180deg);
      text-align: right;
    }
  }

SimenZhor avatar Mar 15 '23 15:03 SimenZhor