sidebar.css 4.8 KB

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