You are here

toc.css in Open Social 8

/*
 * Side navigation
 *
 * Scrollspy and affixed enhanced navigation to highlight sections and secondary
 * sections of docs content.
 */
.toc-wrapper.affix {
  position: static;
}

.toc-wrapper .nav li a {
  position: relative;
  display: inline-block;
  font-size: 14px;
  color: #555555;
  -webkit-transition: color 0.5s;
  transition: color 0.5s;
  padding-top: 0;
  padding-bottom: 0;
}

.toc-wrapper .nav li a:before {
  content: '';
  position: absolute;
  left: -20px;
  top: 0;
  width: 3px;
  height: 100%;
  background-color: #f3f3f3;
  -webkit-transition: background-color .3s, width .3s;
  transition: background-color .3s, width .3s;
}

.toc-wrapper .nav li a:hover, .toc-wrapper .nav li a:focus {
  color: #29abe2;
  font-weight: 500;
}

.toc-wrapper .nav li.active a {
  color: #29abe2;
  font-weight: 500;
}

.toc-wrapper .nav li.active a:before {
  background-color: #29abe2;
}

.toc-wrapper .nav li a.back-to-top {
  display: none;
  color: #777;
  margin-top: 1rem;
}

/* Show and affix the side nav when space allows it */

@media (min-width: 900px) {
  .toc-wrapper {
    padding-left: 40px;
  }
  .toc-wrapper .nav > .active > ul {
    display: block;
  }
  /* Widen the fixed sidebar */
  .toc-wrapper.affix,
  .toc-wrapper.affix-bottom {
    width: 320px;
  }
  .toc-wrapper.affix {
    position: fixed;
    /* Undo the static from mobile first approach */
    top: 74px;
  }
  .toc-wrapper.affix-bottom {
    position: absolute;
    /* Undo the static from mobile first approach */
  }
  .toc-wrapper.affix-bottom .table-of-contents,
  .toc-wrapper.affix .table-of-contents {
    margin-top: 0;
    margin-bottom: 0;
  }
  .back-to-top {
    display: block;
  }
}

File

themes/socialblue/assets/css/toc.css
View source
  1. /*
  2. * Side navigation
  3. *
  4. * Scrollspy and affixed enhanced navigation to highlight sections and secondary
  5. * sections of docs content.
  6. */
  7. .toc-wrapper.affix {
  8. position: static;
  9. }
  10. .toc-wrapper .nav li a {
  11. position: relative;
  12. display: inline-block;
  13. font-size: 14px;
  14. color: #555555;
  15. -webkit-transition: color 0.5s;
  16. transition: color 0.5s;
  17. padding-top: 0;
  18. padding-bottom: 0;
  19. }
  20. .toc-wrapper .nav li a:before {
  21. content: '';
  22. position: absolute;
  23. left: -20px;
  24. top: 0;
  25. width: 3px;
  26. height: 100%;
  27. background-color: #f3f3f3;
  28. -webkit-transition: background-color .3s, width .3s;
  29. transition: background-color .3s, width .3s;
  30. }
  31. .toc-wrapper .nav li a:hover, .toc-wrapper .nav li a:focus {
  32. color: #29abe2;
  33. font-weight: 500;
  34. }
  35. .toc-wrapper .nav li.active a {
  36. color: #29abe2;
  37. font-weight: 500;
  38. }
  39. .toc-wrapper .nav li.active a:before {
  40. background-color: #29abe2;
  41. }
  42. .toc-wrapper .nav li a.back-to-top {
  43. display: none;
  44. color: #777;
  45. margin-top: 1rem;
  46. }
  47. /* Show and affix the side nav when space allows it */
  48. @media (min-width: 900px) {
  49. .toc-wrapper {
  50. padding-left: 40px;
  51. }
  52. .toc-wrapper .nav > .active > ul {
  53. display: block;
  54. }
  55. /* Widen the fixed sidebar */
  56. .toc-wrapper.affix,
  57. .toc-wrapper.affix-bottom {
  58. width: 320px;
  59. }
  60. .toc-wrapper.affix {
  61. position: fixed;
  62. /* Undo the static from mobile first approach */
  63. top: 74px;
  64. }
  65. .toc-wrapper.affix-bottom {
  66. position: absolute;
  67. /* Undo the static from mobile first approach */
  68. }
  69. .toc-wrapper.affix-bottom .table-of-contents,
  70. .toc-wrapper.affix .table-of-contents {
  71. margin-top: 0;
  72. margin-bottom: 0;
  73. }
  74. .back-to-top {
  75. display: block;
  76. }
  77. }