sidebar.css 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. .sidebar-section {
  2. order: 1;
  3. flex: 20%;
  4. max-width: 20%;
  5. /* background-color: lightsalmon; */
  6. transition: all ease-out 0.5s;
  7. }
  8. .sidebar-holder {
  9. top: 2.5rem;
  10. position: -webkit-sticky;
  11. position: sticky;
  12. background-color: #f9fafc;
  13. height: 100vh;
  14. overflow: auto;
  15. box-shadow: 0px 8px 56px rgba(15, 80, 100, 0.16);
  16. transition: all ease-out 0.3s;
  17. }
  18. .sidebar {
  19. background: #f9fafc;
  20. height: 100vh;
  21. transition: all ease-out 0.3s;
  22. }
  23. .sidebar-tree {
  24. padding-left: 1rem;
  25. position: relative;
  26. width: -webkit-max-content;
  27. width: -moz-max-content;
  28. width: max-content;
  29. }
  30. #search-box {
  31. margin-left: 5%;
  32. margin-right: 5%;
  33. width: -webkit-fill-available;
  34. height: 35px;
  35. padding-left: 15px;
  36. margin-top: 30px;
  37. margin-bottom: 10px;
  38. border-radius: 5px;
  39. background-color: #e5e9f2;
  40. transition: all 0.3s ease-out;
  41. border: 1px solid #c0ccda;
  42. }
  43. #search-box:focus {
  44. border: 1pt solid #248aaa;
  45. outline: none;
  46. }
  47. #list-heading {
  48. padding-left: 0px !important;
  49. }
  50. .tree,
  51. .tree ul {
  52. margin: 0;
  53. padding: 0;
  54. list-style: none;
  55. }
  56. .tree li {
  57. margin: 0;
  58. padding: 0 1em;
  59. line-height: 2em;
  60. color: #3c4858;
  61. position: relative;
  62. }
  63. .tree li a {
  64. text-decoration: none;
  65. color: #131313;
  66. transition: all 0.3s ease-out;
  67. }
  68. .tree li a.active {
  69. display: inline;
  70. color: #2098d1;
  71. }
  72. .tree li a:hover {
  73. margin-left: 3px;
  74. color: #2098d1;
  75. transition: all 0.3s ease-out;
  76. }
  77. .tree i {
  78. color: #3c4858;
  79. font-size: 12px;
  80. margin-right: 5px;
  81. }
  82. .tree .shift-right {
  83. margin-left: 5px;
  84. }
  85. .tree .active,
  86. .tree .active > ul {
  87. display: block;
  88. }
  89. .subtree {
  90. padding-left: 0.7rem;
  91. }
  92. .subtree:before {
  93. content: "";
  94. display: block;
  95. width: 0;
  96. position: absolute;
  97. top: 2.5rem;
  98. left: 1.5rem;
  99. bottom: 0.9rem;
  100. border-left: 1px solid;
  101. }
  102. .subtree ul,
  103. ul > ul {
  104. position: relative;
  105. padding-left: 0.5rem;
  106. display: none;
  107. }
  108. .subtree ul:before {
  109. content: "";
  110. display: block;
  111. width: 0;
  112. position: absolute;
  113. top: -10px;
  114. left: 0.3rem;
  115. bottom: 0.9rem;
  116. border-left: 1px solid;
  117. }
  118. .subtree li:before {
  119. content: "";
  120. display: block;
  121. width: 20px;
  122. height: 0;
  123. border-top: 1px solid;
  124. margin-top: -1px;
  125. position: absolute;
  126. top: 18px;
  127. left: -3px;
  128. }
  129. .subtree li:last-child:before {
  130. background: #f9fafc;
  131. height: auto;
  132. top: 1.1rem;
  133. bottom: 0;
  134. }
  135. a.focused {
  136. color: #2098d1 !important;
  137. }
  138. /* ============= Device specific fixes ======= */
  139. /* Large screens such as TV */
  140. @media only screen and (min-width: 1824px) {
  141. .sidebar-section {
  142. flex: 15%;
  143. max-width: 15%;
  144. }
  145. .sidebar-holder {
  146. max-width: 100%;
  147. }
  148. }
  149. /* Extra large devices (large desktops, 1200px and up) */
  150. @media (max-width: 1400px) {
  151. .sidebar-holder {
  152. max-width: 20rem;
  153. }
  154. }
  155. @media (max-width: 1200px) {
  156. .sidebar-tree {
  157. margin-left: 1rem;
  158. }
  159. }
  160. /* IPad Pro */
  161. @media (max-width: 1024px) {
  162. .sidebar-section {
  163. flex: 0%;
  164. max-width: 0%;
  165. min-height: 100vh;
  166. transition: all ease-out 0.3s;
  167. }
  168. .sidebar-holder {
  169. position: -webkit-sticky;
  170. position: sticky;
  171. top: 2.5rem;
  172. width: 100%;
  173. max-height: calc(100vh - 2.5rem);
  174. }
  175. .sidebar-section.hide {
  176. flex: 30%;
  177. max-width: 30%;
  178. margin-right: 0.5rem;
  179. transition: all ease-out 0.3s;
  180. }
  181. }
  182. /* Large devices (desktops, 992px and up) */
  183. @media (max-width: 992px) {
  184. }
  185. /* Medium devices (tablets, 768px and up) */
  186. @media only screen and (max-width: 768px) {
  187. .sidebar-section {
  188. flex: 0%;
  189. max-width: 0%;
  190. min-height: 100vh;
  191. transition: all ease-out 0.3s;
  192. }
  193. .sidebar-holder {
  194. position: -webkit-sticky;
  195. position: sticky;
  196. top: 2.5rem;
  197. width: 100%;
  198. }
  199. .sidebar-section.hide {
  200. flex: 40%;
  201. max-width: 40%;
  202. margin-right: 0.5rem;
  203. transition: all ease-out 0.3s;
  204. }
  205. }
  206. /* Small devices (landscape phones, 576px and up) */
  207. @media only screen and (max-width: 576px) {
  208. .sidebar-section {
  209. width: 100%;
  210. min-height: 0;
  211. max-height: 0;
  212. max-width: 100%;
  213. transition: all ease-out 0.5s;
  214. }
  215. .sidebar-section.hide {
  216. margin-top: 2rem;
  217. position: relative;
  218. height: -webkit-fit-content;
  219. height: -moz-fit-content;
  220. height: fit-content;
  221. flex: none;
  222. max-height: 300vh;
  223. max-width: 100%;
  224. transition: all ease-out 0.5s;
  225. }
  226. .sidebar-holder {
  227. max-height: 0;
  228. height: -webkit-fit-content;
  229. height: -moz-fit-content;
  230. height: fit-content;
  231. overflow: hidden;
  232. max-width: 100%;
  233. transition: all ease-out 0.5s;
  234. }
  235. .sidebar-section.hide .sidebar-holder {
  236. max-height: 200vh;
  237. transition: all ease-out 0.5s;
  238. }
  239. .sidebar {
  240. position: relative;
  241. height: -webkit-fit-content;
  242. height: -moz-fit-content;
  243. height: fit-content;
  244. max-height: -webkit-fit-content;
  245. max-height: -moz-fit-content;
  246. max-height: fit-content;
  247. width: 100vw;
  248. min-height: 0;
  249. overflow: hidden;
  250. transition: all ease-out 0.5s;
  251. }
  252. .sidebar-tree {
  253. margin-left: 0rem;
  254. max-height: 0;
  255. transition: all 0.5s ease-out;
  256. }
  257. .sidebar-section.hide .sidebar-tree {
  258. max-height: 200vh;
  259. transition: all 0.5s ease-out;
  260. }
  261. }
  262. /* iPhoneX, iPhone 6,7,8 */
  263. @media only screen and (max-width: 375px) {
  264. }
  265. /* Galaxy S5, Moto G4 */
  266. @media only screen and (max-width: 360px) {
  267. }
  268. /* iPhone 5 or before */
  269. @media only screen and (max-width: 320px) {
  270. }