cotnainer.css 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  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. #app-container {
  18. display: flex;
  19. flex: 0 0 100%;
  20. }
  21. #skip-to-main {
  22. @apply fixed p-2 rounded;
  23. left: 50%;
  24. transform: translate(-50%, 0);
  25. background-color: var(--ls-secondary-background-color);
  26. top: -100px;
  27. z-index: 10000;
  28. transition: top 0.3s;
  29. &:focus {
  30. top: 20px;
  31. }
  32. }
  33. #left-container {
  34. @apply flex flex-1 flex-col relative h-screen;
  35. }
  36. #main-container {
  37. /* Hack: (overflow-y) to fix sticky header not working */
  38. /* To reproduce: quick creating blocks */
  39. overflow-y: hidden;
  40. position: relative;
  41. height: 100%;
  42. transition: padding-left .3s;
  43. &.is-left-sidebar-open {
  44. padding-left: 0;
  45. @screen sm {
  46. padding-left: var(--ls-left-sidebar-width);
  47. }
  48. }
  49. }
  50. #main-content {
  51. position: relative;
  52. height: calc(100vh - var(--ls-headbar-height));
  53. }
  54. #main-content-container {
  55. @apply p-4 sm:px-8;
  56. font-size: 1em;
  57. }
  58. #main-content-container[data-is-margin-less-pages=true] {
  59. padding: 0 !important;
  60. position: relative;
  61. overflow: auto;
  62. }
  63. .left-sidebar-inner {
  64. position: relative;
  65. height: 100%;
  66. padding-top: 12px;
  67. width: var(--ls-left-sidebar-sm-width);
  68. overflow-y: auto;
  69. overflow-x: hidden;
  70. background-color: var(--ls-primary-background-color);
  71. transition: transform .3s;
  72. transform: translate3d(-100%, 0, 0);
  73. z-index: 3;
  74. -webkit-font-smoothing: antialiased;
  75. > .wrap {
  76. height: calc(100vh - var(--ls-headbar-inner-top-padding) - 50px);
  77. margin-top: 30px;
  78. width: 100%;
  79. > .fake-bar {
  80. @apply w-full px-5 pt-1 sm:hidden;
  81. top: -45px;
  82. }
  83. }
  84. .dropdown-wrapper {
  85. min-width: 180px;
  86. margin-top: 1px;
  87. .menu-link {
  88. padding: 5px 15px;
  89. opacity: .8;
  90. &:hover {
  91. opacity: 1;
  92. }
  93. }
  94. }
  95. .page-icon {
  96. @apply flex items-center mr-1 align-baseline;
  97. width: 20px;
  98. flex-shrink: 0;
  99. height: 18px;
  100. text-align: center;
  101. display: inline-block;
  102. line-height: 1em;
  103. }
  104. a.item {
  105. @apply px-2 py-2 sm:py-1.5;
  106. user-select: none;
  107. transition: background-color .3s;
  108. .ui__icon {
  109. width: 20px;
  110. text-align: center;
  111. font-size: 16px;
  112. margin-right: 8px;
  113. opacity: .9;
  114. position: relative;
  115. }
  116. &:hover {
  117. background-color: var(--ls-tertiary-background-color);
  118. }
  119. &.active, &:active {
  120. background-color: var(--ls-quaternary-background-color);
  121. }
  122. }
  123. .nav-contents-container {
  124. @apply h-full flex-grow-0 flex-grow-0
  125. overflow-x-hidden overflow-y-auto;
  126. padding-bottom: 60px;
  127. &.is-scrolled {
  128. border-top: 1px solid var(--ls-tertiary-border-color);
  129. }
  130. }
  131. .nav-content-item {
  132. &-inner {
  133. border-radius: 8px;
  134. }
  135. .header {
  136. @apply px-6 py-1;
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. user-select: none;
  141. cursor: pointer;
  142. > span {
  143. > a {
  144. padding-left: 12px;
  145. display: none;
  146. transition: none;
  147. &:last-child {
  148. transform: translateY(-6px) translateX(2px) rotate(90deg);
  149. transform-origin: center center;
  150. transition: .15s transform;
  151. }
  152. }
  153. }
  154. &:hover {
  155. background-color: var(--ls-tertiary-background-color);
  156. * {
  157. opacity: 1 !important;
  158. }
  159. > span {
  160. > a {
  161. display: block;
  162. &:last-child {
  163. display: block;
  164. opacity: .6;
  165. }
  166. }
  167. }
  168. }
  169. .wrap-th {
  170. > span {
  171. font-size: 11px;
  172. font-weight: 600;
  173. }
  174. }
  175. }
  176. .bd {
  177. display: none;
  178. ul {
  179. list-style: none;
  180. padding: 0;
  181. margin: 0;
  182. li {
  183. margin: 0;
  184. }
  185. a {
  186. width: 100%;
  187. padding: 4px 24px;
  188. transition: background-color .3s;
  189. .page-title {
  190. white-space: nowrap;
  191. overflow: hidden;
  192. text-overflow: ellipsis;
  193. flex-grow: 1;
  194. }
  195. .page-icon {
  196. display: flex;
  197. align-items: center;
  198. }
  199. &:hover {
  200. background-color: var(--ls-quaternary-background-color);
  201. }
  202. }
  203. }
  204. }
  205. &.is-expand {
  206. .header > span > a {
  207. &:last-child {
  208. transform: translateY(2px) translateX(-3px);
  209. }
  210. }
  211. .bd {
  212. display: block;
  213. }
  214. }
  215. }
  216. .create {
  217. position: absolute;
  218. bottom: 0;
  219. left: 0;
  220. width: 100%;
  221. padding: 14px;
  222. background-image: linear-gradient(transparent, var(--ls-primary-background-color));
  223. user-select: none;
  224. @screen sm {
  225. background-image: linear-gradient(transparent, var(--ls-secondary-background-color));
  226. }
  227. &-link {
  228. background-color: var(--ls-primary-background-color);
  229. box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
  230. }
  231. .dropdown-wrapper {
  232. top: initial;
  233. right: initial;
  234. bottom: calc(100% + 6px);
  235. left: 0;
  236. width: max-content;
  237. @screen sm {
  238. bottom: 0;
  239. left: calc(100% + 6px);
  240. }
  241. }
  242. #create-button {
  243. @apply flex items-center justify-center p-2 text-sm font-medium rounded-md w-full border;
  244. background-color: var(--ls-secondary-background-color) !important;
  245. border-color: transparent;
  246. &:hover,
  247. &:focus {
  248. border-color: var(--ls-border-color);
  249. background-color: var(--ls-primary-background-color) !important;
  250. }
  251. @screen sm {
  252. background-color: var(--ls-primary-background-color) !important;
  253. &:hover,
  254. &:focus {
  255. background-color: var(--ls-secondary-background-color) !important;
  256. }
  257. }
  258. }
  259. }
  260. @screen sm {
  261. padding-top: 0;
  262. width: var(--ls-left-sidebar-width);
  263. background-color: var(--ls-secondary-background-color);
  264. > .wrap {
  265. margin-top: 52px;
  266. }
  267. .create {
  268. &-link {
  269. background-color: var(--ls-primary-background-color);
  270. }
  271. }
  272. }
  273. }
  274. .cp__sidebar-left-layout {
  275. position: fixed;
  276. top: 0;
  277. left: 0;
  278. z-index: var(--ls-z-index-level-5);
  279. width: 10px;
  280. a {
  281. @apply opacity-90 hover:opacity-100;
  282. color: var(--ls-header-button-background);
  283. }
  284. > .left-sidebar-inner {
  285. padding-top: var(--ls-headbar-inner-top-padding);
  286. }
  287. > .shade-mask {
  288. background-color: rgba(0, 0, 0, .7);
  289. position: absolute;
  290. top: 0;
  291. left: 0;
  292. bottom: 0;
  293. right: 0;
  294. z-index: 1;
  295. opacity: 0;
  296. transition: opacity .4s;
  297. touch-action: none;
  298. }
  299. &.is-touching {
  300. width: 100% !important;
  301. transition: none;
  302. .left-sidebar-inner {
  303. transition: none !important;
  304. }
  305. > .shade-mask {
  306. transition: none !important;
  307. z-index: 1;
  308. }
  309. }
  310. &.is-open {
  311. width: 100%;
  312. .left-sidebar-inner {
  313. transform: translate3d(0, 0, 0);
  314. overflow: hidden;
  315. }
  316. > .shade-mask {
  317. opacity: 1;
  318. z-index: 1;
  319. }
  320. }
  321. &.is-closing {
  322. .left-sidebar-inner {
  323. transition: transform .3s;
  324. transform: translate3d(-100%, 0, 0) !important;
  325. }
  326. > .shade-mask {
  327. opacity: 0;
  328. z-index: 1;
  329. }
  330. }
  331. &:before {
  332. content: " ";
  333. height: 3rem;
  334. background-color: var(--ls-primary-background-color);
  335. position: fixed;
  336. left: 0;
  337. top: 0;
  338. opacity: 1;
  339. z-index: 5;
  340. }
  341. @screen sm {
  342. width: 0;
  343. z-index: var(--ls-z-index-level-1);
  344. transition: width .3s;
  345. &:before {
  346. background-color: var(--ls-secondary-background-color);
  347. width: 0;
  348. overflow: hidden;
  349. }
  350. &.is-open {
  351. width: var(--ls-left-sidebar-width);
  352. .left-sidebar-inner {
  353. overflow: visible;
  354. }
  355. }
  356. > .shade-mask {
  357. display: none;
  358. }
  359. }
  360. }
  361. .ls-left-sidebar-open {
  362. @screen sm {
  363. .cp__header > .r {
  364. display: flex;
  365. }
  366. }
  367. }
  368. .ls-wide-mode {
  369. .cp__sidebar-main-content {
  370. max-width: var(--ls-main-content-max-width-wide);
  371. }
  372. }
  373. html[data-theme='dark'] {
  374. #left-sidebar {
  375. > .shade-mask {
  376. background-color: rgba(0, 0, 0, .15);
  377. }
  378. }
  379. }
  380. .settings-modal {
  381. margin: -15px;
  382. }
  383. .cp__sidebar-main-layout {
  384. background-color: var(--ls-primary-background-color);
  385. }
  386. .cp__sidebar-main-content {
  387. width: 100%;
  388. max-width: var(--ls-main-content-max-width);
  389. flex: 1;
  390. }
  391. .cp__sidebar-help {
  392. &-docs {
  393. @apply ml-2 mt-1;
  394. td {
  395. word-break: break-all;
  396. }
  397. th {
  398. width: 80%;
  399. }
  400. }
  401. &-btn {
  402. @apply fixed bottom-4 right-8;
  403. > .inner {
  404. @apply font-bold
  405. rounded-full h-8 w-8 flex items-center justify-center font-bold
  406. select-none cursor-help;
  407. background-color: var(--ls-secondary-background-color);
  408. }
  409. }
  410. }
  411. .cp__right-sidebar {
  412. z-index: var(--ls-z-index-level-1);
  413. transition: width 0.3s;
  414. background-color: var(--ls-secondary-background-color, #d8e1e8);
  415. position: relative;
  416. user-select: none;
  417. .resizer {
  418. @apply absolute top-0 bottom-0;
  419. left: 0;
  420. width: 4px;
  421. user-select: none;
  422. cursor: col-resize !important;
  423. transition: background-color 300ms;
  424. transition-delay: 300ms;
  425. z-index: 1000;
  426. &:hover,
  427. &:focus,
  428. &:active {
  429. background-color: var(--ls-active-primary-color);
  430. }
  431. }
  432. &.closed {
  433. width: 0 !important;
  434. @screen lg {
  435. width: 4px !important;
  436. }
  437. }
  438. &.open {
  439. width: var(--ls-right-sidebar-width);
  440. max-width: 60vw;
  441. }
  442. &-scollable {
  443. min-height: 100%;
  444. overflow-y: scroll;
  445. }
  446. &-inner {
  447. padding-top: 0;
  448. }
  449. &-settings {
  450. @apply flex flex-row;
  451. margin-bottom: 0;
  452. margin-top: 0;
  453. overflow: auto;
  454. &-btn {
  455. display: block;
  456. white-space: nowrap;
  457. }
  458. }
  459. &-topbar {
  460. position: sticky;
  461. position: -webkit-sticky;
  462. top: 0;
  463. left: 0;
  464. right: 0;
  465. background-color: var(--ls-secondary-background-color, #d8e1e8);
  466. z-index: 999;
  467. user-select: none;
  468. -webkit-app-region: drag;
  469. a, svg {
  470. -webkit-app-region: no-drag;
  471. }
  472. }
  473. .page {
  474. margin-top: 0;
  475. }
  476. .non-block-editor textarea,
  477. pre,
  478. pre.code {
  479. margin: 0;
  480. padding: 0;
  481. font-size: 90%;
  482. background: none;
  483. }
  484. .references {
  485. margin-left: 12px;
  486. }
  487. .sidebar-item {
  488. @apply p-4;
  489. .close {
  490. transform: scale(0.8);
  491. transition: transform 0.1s;
  492. &:hover {
  493. transform: scale(1);
  494. }
  495. }
  496. }
  497. }
  498. .cp__sidebar-main-content[data-is-full-width='true'] {
  499. max-width: 100vw;
  500. }
  501. .cp__sidebar-main-content[data-is-margin-less-pages='true'] {
  502. padding: 0;
  503. }
  504. .cp__menubar-repos {
  505. .title-wrap {
  506. line-height: 1.2em;
  507. padding: 1px 0;
  508. }
  509. }
  510. @supports not (overflow-y: overlay) {
  511. .scrollbar-spacing {
  512. overflow-y: auto;
  513. }
  514. }
  515. @supports (overflow-y: overlay) {
  516. .scrollbar-spacing {
  517. overflow-y: overlay;
  518. }
  519. }
  520. .favorites li.dragging-target {
  521. border-left: 5px solid green;
  522. }
  523. .full-height-without-header {
  524. height: calc(100vh - var(--ls-headbar-height) - 4rem);
  525. }
  526. a.ui__modal-close svg, a.close svg, span.rotating-arrow svg {
  527. color: var(--ls-primary-text-color);
  528. }
  529. a.ui__modal-close, a.close {
  530. color: var(--ls-primary-text-color);
  531. opacity: 0.6;
  532. }
  533. a.ui__modal-close:hover, a.close:hover {
  534. opacity: 1;
  535. }