sidebar.css 5.0 KB

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