_book.scss 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. /*************************************************
  2. * Documentation layout
  3. **************************************************/
  4. .docs-article-container {
  5. max-width: 760px;
  6. }
  7. /* Documentation: article footer. */
  8. .docs .body-footer {
  9. border-top: 1px solid #e8e8e8;
  10. margin-top: 30px;
  11. padding-top: 10px;
  12. font-size: 14px;
  13. color: #707070;
  14. }
  15. /* Docs content. */
  16. .docs-content {
  17. order: 1;
  18. position: relative;
  19. }
  20. .docs-content > h2[id],
  21. .docs-content > h3[id],
  22. .docs-content > h4[id] {
  23. pointer-events: none;
  24. }
  25. .docs-content > ol li,
  26. .docs-content > ul li {
  27. margin-bottom: 0.25rem;
  28. }
  29. /* Docs search. */
  30. .docs-search {
  31. position: relative;
  32. padding: 1rem 15px;
  33. margin-right: -15px;
  34. margin-left: -15px;
  35. border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  36. @include media-breakpoint-down(sm) {
  37. padding: 0.8rem 15px;
  38. }
  39. }
  40. .docs-search .form-control:focus {
  41. border-color: $sta-primary;
  42. box-shadow: 0 0 0 3px $sta-primary-light;
  43. }
  44. /* Docs sidebar. */
  45. .docs-sidebar {
  46. order: 0;
  47. border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  48. }
  49. @media (min-width: 768px) {
  50. .docs-sidebar {
  51. border-right: 1px solid rgba(0, 0, 0, 0.1);
  52. }
  53. @supports ((position: -webkit-sticky) or (position: sticky)) {
  54. .docs-sidebar {
  55. position: -webkit-sticky;
  56. position: sticky;
  57. top: 50px;
  58. z-index: 10;
  59. height: calc(100vh - 50px);
  60. }
  61. }
  62. }
  63. @media (min-width: 1200px) {
  64. .docs-sidebar {
  65. border-right: 1px solid rgba(0, 0, 0, 0.1);
  66. }
  67. @supports ((position: -webkit-sticky) or (position: sticky)) {
  68. .docs-sidebar {
  69. position: -webkit-sticky;
  70. position: sticky;
  71. top: 70px;
  72. z-index: 10;
  73. height: calc(100vh - 70px);
  74. }
  75. }
  76. }
  77. @media (min-width: 1200px) {
  78. .docs-sidebar {
  79. flex: 0 1 320px;
  80. }
  81. }
  82. /* Hide sidebar in printouts. */
  83. @media print {
  84. .docs-sidebar {
  85. display: none;
  86. }
  87. }
  88. /* Docs sidebar li>a. */
  89. .docs-sidebar .nav > li > a {
  90. display: block;
  91. padding: 0.25rem 1.5rem;
  92. font-size: 0.8rem;
  93. color: rgba(0, 0, 0, 0.65);
  94. }
  95. .docs-sidebar .nav > li > a:hover {
  96. color: rgba(0, 0, 0, 0.85);
  97. text-decoration: none;
  98. background-color: transparent;
  99. }
  100. .docs-sidebar .docs-toc-item.active a,
  101. .docs-sidebar .docs-toc-item a.active, // Book layout sidebar links
  102. .docs-sidebar .nav>.active:hover>a,
  103. .docs-sidebar .nav>.active>a {
  104. font-weight: bold;
  105. color: $sta-primary;
  106. background-color: transparent;
  107. }
  108. /* Docs links. */
  109. .docs-toggle {
  110. line-height: 1.5;
  111. font-size: 1.2rem;
  112. color: $sta-primary;
  113. background-color: transparent;
  114. }
  115. .docs-links {
  116. padding-top: 1rem;
  117. padding-bottom: 1rem;
  118. margin-right: -15px;
  119. margin-left: -15px;
  120. }
  121. @media (min-width: 768px) {
  122. @supports ((position: -webkit-sticky) or (position: sticky)) {
  123. .docs-links {
  124. max-height: calc(100vh - 5rem - 70px);
  125. overflow-y: auto;
  126. }
  127. }
  128. }
  129. @media (min-width: 768px) {
  130. .docs-links {
  131. display: block !important;
  132. }
  133. }
  134. /* Docs TOC. */
  135. .docs-toc {
  136. order: 2;
  137. padding-top: 1.5rem;
  138. padding-bottom: 1.5rem;
  139. font-size: 0.875rem;
  140. }
  141. @supports ((position: -webkit-sticky) or (position: sticky)) {
  142. .docs-toc {
  143. position: -webkit-sticky;
  144. position: sticky;
  145. top: 70px;
  146. height: calc(100vh - 70px);
  147. overflow-y: auto;
  148. }
  149. }
  150. /* Docs TOC item links. */
  151. .docs-toc-link {
  152. display: block;
  153. padding: 0.25rem 1.5rem;
  154. font-weight: bold;
  155. color: rgba(0, 0, 0, 0.65);
  156. }
  157. .docs-toc-link:hover {
  158. color: rgba(0, 0, 0, 0.85);
  159. text-decoration: none;
  160. }
  161. .docs-toc-item.active {
  162. margin-bottom: 1rem;
  163. }
  164. .docs-toc-item.active:not(:first-child) {
  165. margin-top: 1rem;
  166. }
  167. .docs-toc-item.active > .docs-toc-link {
  168. color: rgba(0, 0, 0, 0.85);
  169. }
  170. .docs-toc-item.active > .docs-toc-link:hover {
  171. background-color: transparent;
  172. }
  173. .docs-sidenav {
  174. display: block;
  175. }
  176. /* Docs TOC nav. */
  177. .docs-toc-title {
  178. color: #b5b5b5;
  179. font-size: 0.875rem;
  180. font-weight: 600;
  181. padding-left: calc(1.5rem + 1px);
  182. }
  183. #TableOfContents {
  184. padding-left: 0;
  185. border-left: 1px solid #eee;
  186. }
  187. #TableOfContents ul,
  188. ul.toc-top {
  189. padding-left: 0;
  190. }
  191. // TOC indentation for each level.
  192. #TableOfContents ul ul {
  193. padding-left: 0.8rem;
  194. }
  195. #TableOfContents li {
  196. display: block;
  197. margin-bottom: 8px; // Lighthouse: tap targets must be at least 8px apart
  198. }
  199. #TableOfContents li a,
  200. .toc-top li a {
  201. display: block;
  202. padding: 0 1.5rem; // Override default padding
  203. color: rgba(0, 0, 0, 0.65);
  204. line-height: 1.75; // Lighthouse: min tap target size
  205. font-size: 16px; // Lighthouse: min tap target size
  206. }
  207. .dark #TableOfContents li a,
  208. .dark .toc-top li a {
  209. color: rgba(255, 255, 255, 0.65);
  210. }
  211. #TableOfContents li a:hover,
  212. .toc-top li a:hover {
  213. color: $sta-primary;
  214. text-decoration: none;
  215. }
  216. /* ScrollSpy active link style. */
  217. #TableOfContents li a.active {
  218. color: $sta-primary;
  219. font-weight: 700;
  220. }
  221. /* Docs achnorjs links. */
  222. .anchorjs-link {
  223. font-weight: 400;
  224. color: $sta-primary-dark;
  225. transition: color 0.16s linear;
  226. }
  227. .anchorjs-link:hover {
  228. color: $sta-primary;
  229. text-decoration: none;
  230. }