codedoc icon indicating copy to clipboard operation
codedoc copied to clipboard

decreasing the width-size of TOC

Open zenhighzer opened this issue 2 years ago • 2 comments

Hi there,

codedoc is really nice! but one small question: is there a simple way to decrease the width of the toc? It seems to be too big :)

thanks and best regards!

grafik

zenhighzer avatar Jan 20 '22 10:01 zenhighzer

Do you use a large screen resolution? The TOC size is dynamically calculated as 50% of the screen width minus 464 pixels: calc(50vw - 464px).

danielsitnik avatar Jan 20 '22 13:01 danielsitnik

The TOC is given the id -codedoc-toc, so you can style it via some custom stylesheets like this:

#-codedoc-toc {
  width: ...
}

/** be sure to also provide an override for smaller screens **/
@media screen and (max-width: 1200px) {
  #-codedoc-toc {
      width: ...
  }
}

loreanvictor avatar Jan 20 '22 14:01 loreanvictor