No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_sidebar.scss 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. // stylelint-disable declaration-no-important
  2. //
  3. // Right side table of contents
  4. //
  5. .ct-toc {
  6. @supports (position: sticky) {
  7. position: sticky;
  8. top: 4rem;
  9. height: calc(100vh - 4rem);
  10. overflow-y: auto;
  11. }
  12. order: 2;
  13. padding-top: 2rem;
  14. padding-bottom: 1.5rem;
  15. font-size: .875rem;
  16. }
  17. .section-nav {
  18. padding-left: 0;
  19. border-left: 1px solid #eee;
  20. ul {
  21. padding-left: 1rem;
  22. ul {
  23. display: none;
  24. }
  25. }
  26. }
  27. .toc-entry {
  28. display: block;
  29. font-size: 1rem;
  30. a {
  31. display: block;
  32. padding: .125rem 1.5rem;
  33. color: #99979c;
  34. font-size: 90%;
  35. &:hover {
  36. color: $blue;
  37. text-decoration: none;
  38. }
  39. }
  40. }
  41. //
  42. // Left side navigation
  43. //
  44. .ct-sidebar {
  45. order: 0; // background-color: #f5f2f9;
  46. border-bottom: 1px solid $ct-sidebar-border-color;
  47. background-color: $ct-sidebar-bg;
  48. @include media-breakpoint-up(md) {
  49. @supports (position: sticky) {
  50. position: sticky;
  51. top: 4rem;
  52. z-index: 1000;
  53. height: calc(100vh - 4rem);
  54. }
  55. border-right: 1px solid $ct-sidebar-border-color;
  56. }
  57. @include media-breakpoint-up(xl) {
  58. flex: 0 1 320px;
  59. }
  60. }
  61. .ct-links {
  62. padding-top: 2rem;
  63. padding-bottom: 1rem;
  64. margin-right: -15px;
  65. margin-left: -15px;
  66. @include media-breakpoint-up(md) {
  67. @supports (position: sticky) {
  68. max-height: calc(100vh - 5rem);
  69. overflow-y: auto;
  70. }
  71. } // Override collapse behaviors
  72. @include media-breakpoint-up(md) {
  73. display: block !important;
  74. }
  75. }
  76. .ct-search {
  77. position: relative; // To contain the Algolia search
  78. padding: 1rem 15px;
  79. margin-right: -15px;
  80. margin-left: -15px;
  81. border-bottom: 1px solid rgba(0, 0, 0, .05);
  82. .form-control:focus {
  83. border-color: $ct-primary-bright;
  84. box-shadow: 0 0 0 3px rgba($ct-primary-bright, .25);
  85. }
  86. }
  87. .ct-search-docs-toggle {
  88. line-height: 1;
  89. color: $gray-900;
  90. }
  91. .ct-sidenav {
  92. display: none;
  93. }
  94. .ct-toc-link {
  95. display: block;
  96. padding: .25rem 1.5rem;
  97. font-weight: 600;
  98. font-size: .875rem;
  99. color: #0d2b3e;
  100. &:hover {
  101. color: rgba(0, 0, 0, .85);
  102. text-decoration: none;
  103. }
  104. }
  105. .ct-toc-item {
  106. &.active {
  107. margin-bottom: 1rem;
  108. &:not(:first-child) {
  109. margin-top: 1rem;
  110. }
  111. >.ct-toc-link {
  112. color: rgba(0, 0, 0, .85);
  113. &:hover {
  114. background-color: transparent;
  115. }
  116. }
  117. >.ct-sidenav {
  118. display: block;
  119. }
  120. }
  121. }
  122. // All levels of nav
  123. .ct-sidebar .nav>li>a {
  124. display: block;
  125. padding: .25rem 1.5rem;
  126. font-size: 84%;
  127. color: #4c555a;
  128. }
  129. .ct-sidebar .nav>li>a:hover {
  130. color: rgba(0, 0, 0, .85);
  131. text-decoration: none;
  132. background-color: transparent;
  133. }
  134. .ct-sidebar .nav>.active>a {
  135. font-weight: 500;
  136. color: #0099e5;
  137. background-color: transparent;
  138. padding-left: 2rem;
  139. position: relative;
  140. &:before {
  141. content: '';
  142. position: absolute;
  143. height: 16px;
  144. width: 2px;
  145. background-color: #0099e5;
  146. top: 50%;
  147. left: 1.5rem;
  148. transform: translateY(-50%);
  149. }
  150. }
  151. .ct-sidebar .nav>.active:hover>a {
  152. color: #0099e5
  153. }
  154. .scrollbar-inner {
  155. height: 100%;
  156. &:not(:hover) .scroll-element {
  157. opacity: 0;
  158. }
  159. .scroll-element {
  160. transition: opacity 300ms;
  161. margin-right: 2px;
  162. .scroll-bar,
  163. .scroll-element_track {
  164. transition: background-color 300ms;
  165. }
  166. .scroll-element_track {
  167. background-color: transparent;
  168. }
  169. }
  170. .scroll-element.scroll-y {
  171. width: 3px;
  172. right: 0;
  173. }
  174. .scroll-element.scroll-x {
  175. height: 3px;
  176. bottom: 0;
  177. }
  178. }