sidebar.css 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. @supports(padding: max(0px)) {
  2. .post {
  3. padding-left: max(12px, env(safe-area-inset-left));
  4. padding-right: max(12px, env(safe-area-inset-right));
  5. }
  6. }
  7. #app-container {
  8. background-color: var(--ls-primary-background-color, #fff);
  9. position: relative;
  10. }
  11. #root {
  12. > div {
  13. color: var(--ls-primary-text-color, #24292e);
  14. font-size: var(--ls-page-text-size);
  15. }
  16. }
  17. .is-electron.is-mac .cp__sidebar-left-layout {
  18. }
  19. #app-container {
  20. flex: 0 0 100%;
  21. }
  22. #main-container {
  23. position: relative;
  24. height: 100%;
  25. }
  26. #main-content {
  27. &.is-left-sidebar-open {
  28. padding-left: var(--ls-left-sidebar-width);
  29. }
  30. &-container {
  31. @apply p-4 sm:px-8;
  32. font-size: 1em;
  33. }
  34. }
  35. html.is-mobile {
  36. #main-content.is-left-sidebar-open {
  37. padding-left: 0;
  38. }
  39. }
  40. #left-sidebar {
  41. width: 240px;
  42. height: 100%;
  43. top: 0;
  44. left: -240px;
  45. position: absolute;
  46. z-index: 11;
  47. opacity: 0;
  48. background-color: #002b36;
  49. .enter {
  50. opacity: 1;
  51. left: 0;
  52. }
  53. }
  54. #left-bar {
  55. background-color: var(--ls-primary-background-color);
  56. width: 75vw;
  57. max-width: 300px;
  58. > .head-wrap {
  59. background-color: var(--ls-search-background-color);
  60. }
  61. .close-panel-btn {
  62. color: var(--ls-active-primary-color);
  63. }
  64. nav > a {
  65. color: var(--ls-icon-color);
  66. }
  67. a {
  68. color: var(--ls-primary-text-color);
  69. }
  70. }
  71. .ls-mobile-left-sidebar {
  72. position: relative;
  73. z-index: -1;
  74. &.is-left-sidebar-open {
  75. z-index: var(--ls-z-index-level-3);
  76. }
  77. }
  78. .left-sidebar-inner {
  79. position: relative;
  80. height: 100%;
  81. z-index: 1;
  82. overflow: auto;
  83. > .wrap {
  84. padding-top: 60px;
  85. }
  86. .dropdown-wrapper {
  87. min-width: 180px;
  88. }
  89. a.item {
  90. user-select: none;
  91. > span {
  92. margin-top: 3px;
  93. }
  94. }
  95. .nav-content-item {
  96. padding: 32px 0 0 0;
  97. > .header {
  98. display: flex;
  99. justify-content: space-between;
  100. align-items: center;
  101. user-select: none;
  102. cursor: pointer;
  103. padding: 4px 18px;
  104. > span {
  105. > a {
  106. opacity: .4;
  107. padding-left: 12px;
  108. display: none;
  109. transition: none;
  110. &:hover {
  111. opacity: 1 !important;
  112. }
  113. &:last-child {
  114. transform: translateY(-6px) translateX(2px) rotate(90deg);
  115. transform-origin: center center;
  116. transition: .15s transform;
  117. }
  118. }
  119. }
  120. &:hover {
  121. background-color: var(--ls-tertiary-background-color);
  122. * {
  123. opacity: 1 !important;
  124. }
  125. > span {
  126. > a {
  127. display: block;
  128. &:last-child {
  129. display: block;
  130. opacity: .6;
  131. }
  132. }
  133. }
  134. }
  135. &:active {
  136. opacity: .8;
  137. }
  138. }
  139. > .bd {
  140. display: none;
  141. ul {
  142. list-style: none;
  143. padding: 0;
  144. margin: 0;
  145. a {
  146. width: 100%;
  147. padding: 2px 20px;
  148. display: block;
  149. text-overflow: ellipsis;
  150. overflow: hidden;
  151. white-space: nowrap;
  152. color: var(--ls-primary-text-color);
  153. &:hover {
  154. background-color: var(--ls-quaternary-background-color);
  155. }
  156. &:active {
  157. opacity: .7;
  158. }
  159. }
  160. }
  161. }
  162. &.is-expand {
  163. > .header > span > a {
  164. &:last-child {
  165. transform: translateY(2px) translateX(-3px);
  166. }
  167. }
  168. > .bd {
  169. display: block;
  170. }
  171. }
  172. }
  173. a.item:hover {
  174. background-color: var(--ls-quaternary-background-color);
  175. }
  176. }
  177. .white-theme .left-sidebar-inner a, .white-theme .left-bar a {
  178. color: var(--ls-primary-text-color);
  179. }
  180. .cp__sidebar-left-layout {
  181. @apply flex-col sm:block;
  182. background-color: var(--ls-secondary-background-color);
  183. width: var(--ls-left-sidebar-width);
  184. height: 100vh;
  185. position: fixed;
  186. top: 0;
  187. left: 0;
  188. z-index: 9;
  189. transition: transform .25s;
  190. transform: translateX(-100%);
  191. overflow: hidden;
  192. &:before {
  193. content: " ";
  194. height: 3rem;
  195. width: calc(var(--ls-left-sidebar-width) - var(--ls-scrollbar-width));
  196. background-color: var(--ls-secondary-background-color);
  197. position: fixed;
  198. left: 0;
  199. top: 0;
  200. z-index: 2;
  201. }
  202. &.is-open {
  203. transform: translateX(0);
  204. }
  205. }
  206. .settings-modal {
  207. margin: -15px;
  208. }
  209. .cp__sidebar-main-layout {
  210. background-color: var(--ls-primary-background-color);
  211. }
  212. .cp__sidebar-main-content {
  213. width: 100%;
  214. max-width: var(--ls-main-content-max-width);
  215. flex: 1;
  216. h1.title {
  217. padding-right: 15px;
  218. }
  219. }
  220. .cp__sidebar-help {
  221. &-docs {
  222. @apply ml-2 mt-1;
  223. td {
  224. word-break: break-all;
  225. }
  226. th {
  227. width: 80%;
  228. }
  229. }
  230. &-btn {
  231. @apply font-bold fixed bottom-4
  232. rounded-full h-8 w-8 flex items-center justify-center font-bold
  233. opacity-70 hover:opacity-100;
  234. user-select: none;
  235. cursor: help;
  236. right: 24px;
  237. background-color: var(--ls-secondary-background-color);
  238. }
  239. }
  240. .cp__right-sidebar {
  241. z-index: var(--ls-z-index-level-1);
  242. transition: width 0.3s;
  243. background-color: var(--ls-secondary-background-color, #d8e1e8);
  244. &.closed {
  245. width: 0 !important;
  246. }
  247. &.open {
  248. width: var(--ls-right-sidebar-width);
  249. }
  250. &-scollable {
  251. min-height: 100%;
  252. overflow-y: scroll;
  253. }
  254. &-inner {
  255. padding-top: 0;
  256. position: relative;
  257. .resizer {
  258. position: absolute;
  259. top: 0;
  260. bottom: 0;
  261. left: 0;
  262. width: 4px;
  263. user-select: none;
  264. cursor: col-resize !important;
  265. }
  266. }
  267. &-settings {
  268. @apply flex flex-row;
  269. margin: -15px;
  270. margin-bottom: 0;
  271. margin-top: 0;
  272. overflow: auto;
  273. &-btn {
  274. display: block;
  275. white-space: nowrap;
  276. }
  277. }
  278. &-topbar {
  279. position: sticky;
  280. position: -webkit-sticky;
  281. top: 0;
  282. left: 0;
  283. right: 0;
  284. background-color: var(--ls-secondary-background-color, #d8e1e8);
  285. z-index: 999;
  286. user-select: none;
  287. -webkit-app-region: drag;
  288. a, svg {
  289. -webkit-app-region: no-drag;
  290. }
  291. }
  292. .page {
  293. margin-top: 0;
  294. }
  295. .non-block-editor textarea,
  296. pre,
  297. pre.code {
  298. margin: 0;
  299. padding: 0;
  300. font-size: 90%;
  301. background: none;
  302. }
  303. .references {
  304. margin-left: 12px;
  305. }
  306. .sidebar-item {
  307. padding-top: 24px;
  308. padding-bottom: 24px;
  309. margin-bottom: 8px;
  310. .close {
  311. transform: scale(0.8);
  312. transition: transform 0.1s;
  313. &:hover {
  314. transform: scale(1);
  315. }
  316. }
  317. }
  318. }
  319. .cp__sidebar-main-content[data-is-full-width='true'] {
  320. max-width: 100vw;
  321. }
  322. .cp__sidebar-main-content[data-is-global-graph-pages='true'] {
  323. padding: 0;
  324. }
  325. @supports not (overflow-y: overlay) {
  326. .scrollbar-spacing {
  327. overflow-y: auto;
  328. }
  329. }
  330. @supports (overflow-y: overlay) {
  331. .scrollbar-spacing {
  332. overflow-y: overlay;
  333. }
  334. }
  335. .favorites li.dragging-target {
  336. border-left: 5px solid green;
  337. }