_react_docs_nav.scss 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  1. .docsNavContainer {
  2. background: $sidenav;
  3. height: 35px;
  4. left: 0;
  5. position: fixed;
  6. width: 100%;
  7. z-index: 100;
  8. }
  9. .docMainWrapper {
  10. .wrapper {
  11. &.mainWrapper {
  12. padding-left: 0;
  13. padding-right: 0;
  14. padding-top: 10px;
  15. }
  16. }
  17. }
  18. .docsSliderActive {
  19. .docsNavContainer {
  20. box-sizing: border-box;
  21. height: 100%;
  22. overflow-y: auto;
  23. -webkit-overflow-scrolling: touch;
  24. padding-bottom: 50px;
  25. }
  26. .mainContainer {
  27. display: none;
  28. }
  29. }
  30. .navBreadcrumb {
  31. box-sizing: border-box;
  32. display: flex;
  33. flex-flow: row nowrap;
  34. font-size: 12px;
  35. height: 35px;
  36. overflow: hidden;
  37. padding: 5px 10px;
  38. a, span {
  39. border: 0;
  40. color: $sidenav-text;
  41. }
  42. i {
  43. padding: 0 3px;
  44. }
  45. }
  46. nav.toc {
  47. position: relative;
  48. section {
  49. padding: 0px;
  50. position: relative;
  51. .navGroups {
  52. display: none;
  53. padding: 40px 10px 10px;
  54. }
  55. }
  56. .toggleNav {
  57. background: $sidenav;
  58. color: $sidenav-text;
  59. position: relative;
  60. transition: background-color 0.3s, color 0.3s;
  61. .navToggle {
  62. cursor: pointer;
  63. height: 24px;
  64. margin-right: 10px;
  65. position: relative;
  66. text-align: left;
  67. width: 18px;
  68. &::before, &::after {
  69. content: "";
  70. position: absolute;
  71. top: 50%;
  72. left: 0;
  73. left: 8px;
  74. width: 3px;
  75. height: 6px;
  76. border: 5px solid $sidenav-text;
  77. border-width: 5px 0;
  78. margin-top: -8px;
  79. transform: rotate(45deg);
  80. z-index: 1;
  81. }
  82. &::after {
  83. transform: rotate(-45deg);
  84. }
  85. i {
  86. &::before, &::after {
  87. content: "";
  88. position: absolute;
  89. top: 50%;
  90. left: 2px;
  91. background: transparent;
  92. border-width: 0 5px 5px;
  93. border-style: solid;
  94. border-color: transparent $sidenav-text;
  95. height: 0;
  96. margin-top: -7px;
  97. opacity: 1;
  98. width: 5px;
  99. z-index: 10;
  100. }
  101. &::after {
  102. border-width: 5px 5px 0;
  103. margin-top: 2px;
  104. }
  105. }
  106. }
  107. .navGroup {
  108. background: $sidenav-overlay;
  109. margin: 1px 0;
  110. ul {
  111. display: none;
  112. }
  113. h3 {
  114. background: $sidenav-overlay;
  115. color: $sidenav-text;
  116. cursor: pointer;
  117. font-size: 14px;
  118. font-weight: 400;
  119. line-height: 1.2em;
  120. padding: 10px;
  121. transition: color 0.2s;
  122. i:not(:empty) {
  123. width: 16px;
  124. height: 16px;
  125. display: inline-block;
  126. box-sizing: border-box;
  127. text-align: center;
  128. color: rgba($sidenav-text, 0.5);
  129. margin-right: 10px;
  130. transition: color 0.2s;
  131. }
  132. &:hover {
  133. color: $primary-bg;
  134. i:not(:empty) {
  135. color: $primary-bg;
  136. }
  137. }
  138. }
  139. &.navGroupActive {
  140. background: $sidenav-active;
  141. color: $sidenav-text;
  142. ul {
  143. display: block;
  144. padding-bottom: 10px;
  145. padding-top: 10px;
  146. .navListSubItems {
  147. padding-bottom: 0px;
  148. padding-top: 0px;
  149. }
  150. }
  151. h3 {
  152. background: $primary-bg;
  153. color: $primary-overlay;
  154. i {
  155. display: none;
  156. }
  157. }
  158. }
  159. }
  160. ul {
  161. padding-left: 0;
  162. padding-right: 18px;
  163. li {
  164. list-style-type: none;
  165. padding-bottom: 0;
  166. padding-left: 0;
  167. a {
  168. border: none;
  169. color: $sidenav-text;
  170. display: inline-block;
  171. font-size: 14px;
  172. line-height: 1.1em;
  173. margin: 2px 10px 2px;
  174. padding: 1px 0 1px;
  175. transition: color 0.3s;
  176. &:hover,
  177. &:focus {
  178. color: $primary-bg;
  179. }
  180. &.navItemActive {
  181. color: $primary-bg;
  182. font-weight: 900;
  183. }
  184. &.navItem {
  185. font-weight: bold;
  186. }
  187. }
  188. .navListSubItem {
  189. padding-top: 0;
  190. margin-left: 20px;
  191. a.navItem {
  192. font-weight: normal;
  193. }
  194. }
  195. }
  196. }
  197. }
  198. .toggleNavActive {
  199. .navBreadcrumb {
  200. background: $sidenav;
  201. margin-bottom: 20px;
  202. position: fixed;
  203. width: 100%;
  204. }
  205. section {
  206. .navGroups {
  207. display: block;
  208. }
  209. }
  210. .navToggle {
  211. &::before, &::after {
  212. border-width: 6px 0;
  213. height: 0px;
  214. margin-top: -6px;
  215. }
  216. i {
  217. opacity: 0;
  218. }
  219. }
  220. }
  221. }
  222. .docsNavVisible {
  223. .navPusher {
  224. .mainContainer {
  225. padding-top: 35px;
  226. }
  227. }
  228. }
  229. @media only screen and (min-width: 900px) {
  230. .navBreadcrumb {
  231. padding: 5px 0;
  232. }
  233. nav.toc {
  234. section {
  235. .navGroups {
  236. padding: 40px 0 0;
  237. }
  238. }
  239. }
  240. }
  241. @media only screen and (min-width: 1024px) {
  242. .navToggle {
  243. display: none;
  244. }
  245. .docsSliderActive {
  246. .mainContainer {
  247. display: block;
  248. }
  249. }
  250. .docsNavVisible {
  251. .navPusher {
  252. .mainContainer {
  253. padding-top: 0;
  254. }
  255. }
  256. }
  257. .docsNavContainer {
  258. background: none;
  259. box-sizing: border-box;
  260. height: auto;
  261. margin: 40px 40px 0 0;
  262. overflow-y: auto;
  263. position: relative;
  264. width: 300px;
  265. }
  266. nav.toc {
  267. section {
  268. .navGroups {
  269. display: block;
  270. padding-top: 0px;
  271. }
  272. }
  273. .toggleNavActive {
  274. .navBreadcrumb {
  275. margin-bottom: 0;
  276. position: relative;
  277. }
  278. }
  279. }
  280. .docMainWrapper {
  281. display: flex;
  282. flex-flow: row nowrap;
  283. margin-bottom: 40px;
  284. .wrapper {
  285. padding-left: 0;
  286. padding-right: 0;
  287. &.mainWrapper {
  288. padding-top: 0;
  289. }
  290. }
  291. }
  292. .navBreadcrumb {
  293. display: none;
  294. h2 {
  295. padding: 0 10px;
  296. }
  297. }
  298. }