table-of-contents.css 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. :root {
  2. --pagetoc-width: 250px;
  3. }
  4. @media only screen and (max-width:1439px) {
  5. .sidetoc {
  6. display: none;
  7. }
  8. }
  9. @media only screen and (min-width:1440px) {
  10. main {
  11. position: relative;
  12. margin-left: 100px !important;
  13. margin-right: var(--pagetoc-width) !important;
  14. }
  15. .sidetoc {
  16. margin-left: auto;
  17. margin-right: auto;
  18. left: calc(100% + (var(--content-max-width))/4 - 140px);
  19. position: absolute;
  20. text-align: right;
  21. }
  22. .pagetoc {
  23. position: fixed;
  24. width: var(--pagetoc-width);
  25. overflow: auto;
  26. right: 20px;
  27. height: calc(100% - var(--menu-bar-height));
  28. }
  29. .pagetoc a {
  30. color: var(--fg) !important;
  31. display: block;
  32. padding: 5px 15px 5px 10px;
  33. text-align: left;
  34. text-decoration: none;
  35. }
  36. .pagetoc a:hover,
  37. .pagetoc a.active {
  38. background: var(--sidebar-bg) !important;
  39. color: var(--sidebar-fg) !important;
  40. }
  41. .pagetoc .active {
  42. background: var(--sidebar-bg);
  43. color: var(--sidebar-fg);
  44. }
  45. }