sidebar.css 5.1 KB

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