styles.scss 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  1. @import "./_variables";
  2. @import "./theme";
  3. :root {
  4. --sat: env(safe-area-inset-top);
  5. --sab: env(safe-area-inset-bottom);
  6. --sal: env(safe-area-inset-left);
  7. --sar: env(safe-area-inset-right);
  8. --text-color-primary: #{$oc-gray-8};
  9. --bg-color-main: #{$oc-white};
  10. --shadow-island: 0 1px 5px #{transparentize($oc-black, 0.85)};
  11. --border-radius-m: 4px;
  12. --space-factor: 0.25rem;
  13. }
  14. body {
  15. margin: 0;
  16. --ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto,
  17. Helvetica, Arial, sans-serif;
  18. font-family: var(--ui-font);
  19. color: var(--text-color-primary);
  20. -webkit-text-size-adjust: 100%;
  21. user-select: none;
  22. width: 100vw;
  23. height: 100vh;
  24. }
  25. [contenteditable] {
  26. user-select: auto;
  27. cursor: text;
  28. }
  29. a {
  30. font-weight: 500;
  31. text-decoration: none;
  32. color: $oc-blue-7; /* OC Blue 7 */
  33. &:hover {
  34. text-decoration: underline;
  35. }
  36. }
  37. canvas {
  38. touch-action: none;
  39. user-select: none;
  40. // following props improve blurriness at certain devicePixelRatios.
  41. // AFAIK it doesn't affect export (in fact, export seems sharp either way).
  42. image-rendering: pixelated; // chromium
  43. // NOTE: must be declared *after* the above
  44. image-rendering: -moz-crisp-edges; // FF
  45. }
  46. .excalidraw {
  47. display: flex;
  48. position: fixed;
  49. top: 0;
  50. bottom: 0;
  51. left: 0;
  52. right: 0;
  53. }
  54. .FixedSideContainer {
  55. padding-top: var(--sat, 0px);
  56. padding-right: var(--sar, 0px);
  57. padding-bottom: var(--sab, 0px);
  58. padding-left: var(--sal, 0px);
  59. }
  60. .panelRow {
  61. display: flex;
  62. justify-content: space-between;
  63. }
  64. .panelColumn {
  65. display: flex;
  66. flex-direction: column;
  67. h3,
  68. legend,
  69. .control-label {
  70. margin-top: 0.333rem;
  71. margin-bottom: 0.333rem;
  72. font-size: 0.75rem;
  73. color: var(--text-color-primary);
  74. font-weight: bold;
  75. display: block;
  76. }
  77. .control-label input {
  78. display: block;
  79. width: 100%;
  80. }
  81. h3:first-child,
  82. legend:first-child,
  83. .control-label:first-child {
  84. margin-top: 0;
  85. }
  86. legend {
  87. padding: 0;
  88. }
  89. .buttonList {
  90. flex-wrap: wrap;
  91. label {
  92. margin-right: 0.25rem;
  93. font-size: 0.75rem;
  94. display: inline-block;
  95. }
  96. input[type="radio"] {
  97. opacity: 0;
  98. position: absolute;
  99. pointer-events: none;
  100. }
  101. .ToolIcon {
  102. margin: 0 5px;
  103. }
  104. .ToolIcon__icon {
  105. width: 28px;
  106. height: 28px;
  107. }
  108. }
  109. fieldset {
  110. margin: 0;
  111. margin-top: 0.333rem;
  112. padding: 0;
  113. border: none;
  114. }
  115. }
  116. .divider {
  117. width: 1px;
  118. background-color: $oc-gray-2;
  119. margin: 1px;
  120. }
  121. .buttonList label:focus-within,
  122. input:focus {
  123. outline: transparent;
  124. box-shadow: 0 0 0 2px $oc-blue-2;
  125. }
  126. button,
  127. .buttonList label {
  128. user-select: none;
  129. background-color: $oc-gray-2;
  130. border: 0;
  131. border-radius: 4px;
  132. margin: 0.125rem 0;
  133. padding: 0.25rem;
  134. white-space: nowrap;
  135. cursor: pointer;
  136. &:focus {
  137. outline: transparent;
  138. box-shadow: 0 0 0 2px $oc-blue-2;
  139. }
  140. &:hover {
  141. background-color: $oc-gray-4;
  142. }
  143. &:active {
  144. background-color: $oc-gray-5;
  145. }
  146. &:disabled {
  147. cursor: not-allowed;
  148. }
  149. }
  150. .active,
  151. .buttonList label.active {
  152. background-color: $oc-gray-4;
  153. &:hover {
  154. background-color: $oc-gray-4;
  155. }
  156. &:active {
  157. background-color: $oc-gray-5;
  158. }
  159. }
  160. .App-bottom-bar {
  161. position: absolute;
  162. top: 0;
  163. bottom: 0;
  164. left: 0;
  165. right: 0;
  166. --bar-padding: calc(4 * var(--space-factor));
  167. padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"};
  168. padding-right: var(--sar, 0px);
  169. padding-bottom: var(--sab, 0px);
  170. padding-left: var(--sal, 0px);
  171. z-index: 4;
  172. display: flex;
  173. align-items: flex-end;
  174. pointer-events: none;
  175. > .Island {
  176. width: 100%;
  177. max-width: 100%;
  178. min-width: 100%;
  179. box-sizing: border-box;
  180. max-height: 100%;
  181. display: flex;
  182. flex-direction: column;
  183. pointer-events: initial;
  184. }
  185. }
  186. .App-toolbar {
  187. width: 100%;
  188. box-sizing: border-box;
  189. }
  190. .App-toolbar-content {
  191. display: flex;
  192. align-items: center;
  193. justify-content: space-between;
  194. }
  195. .App-mobile-menu {
  196. width: 100%;
  197. overflow-x: visible;
  198. overflow-y: auto;
  199. box-sizing: border-box;
  200. margin-bottom: var(--bar-padding);
  201. }
  202. .App-menu {
  203. display: grid;
  204. }
  205. .App-menu_top {
  206. grid-template-columns: 1fr auto 1fr;
  207. grid-gap: 4px;
  208. align-items: flex-start;
  209. cursor: default;
  210. pointer-events: none !important;
  211. }
  212. .App-menu_top > * {
  213. pointer-events: all;
  214. }
  215. .App-menu_top > *:first-child {
  216. justify-self: flex-start;
  217. }
  218. .App-menu_top > *:last-child {
  219. justify-self: flex-end;
  220. }
  221. .App-menu_bottom {
  222. position: fixed;
  223. bottom: 0;
  224. grid-template-columns: 1fr auto 1fr;
  225. grid-gap: 4px;
  226. align-items: flex-start;
  227. cursor: default;
  228. pointer-events: none !important;
  229. &--transition-left {
  230. section {
  231. width: 185px;
  232. }
  233. }
  234. section {
  235. display: flex;
  236. }
  237. }
  238. .App-menu_bottom > * {
  239. pointer-events: all;
  240. }
  241. .App-menu_bottom > *:first-child {
  242. justify-self: flex-start;
  243. }
  244. .App-menu_bottom > *:last-child {
  245. justify-self: flex-end;
  246. }
  247. .App-menu_left {
  248. grid-template-rows: 1fr auto 1fr;
  249. height: 100%;
  250. }
  251. .App-menu_right {
  252. grid-template-rows: 1fr;
  253. height: 100%;
  254. }
  255. .App-menu__left {
  256. overflow-y: auto;
  257. max-height: calc(100vh - 236px);
  258. }
  259. .ErrorSplash {
  260. min-height: 100vh;
  261. padding: 20px 0;
  262. overflow: auto;
  263. display: flex;
  264. align-items: center;
  265. justify-content: center;
  266. user-select: text;
  267. .ErrorSplash-messageContainer {
  268. display: flex;
  269. flex-direction: column;
  270. align-items: center;
  271. justify-content: center;
  272. padding: 40px;
  273. background-color: $oc-red-1;
  274. border: 3px solid $oc-red-9;
  275. }
  276. .ErrorSplash-paragraph {
  277. margin: 15px 0;
  278. max-width: 600px;
  279. &.align-center {
  280. text-align: center;
  281. }
  282. }
  283. .bigger,
  284. .bigger button {
  285. font-size: 1.1em;
  286. }
  287. .smaller,
  288. .smaller button {
  289. font-size: 0.9em;
  290. }
  291. .ErrorSplash-details {
  292. display: flex;
  293. flex-direction: column;
  294. align-items: flex-start;
  295. textarea {
  296. width: 100%;
  297. margin: 10px 0;
  298. font-family: "Cascadia";
  299. font-size: 0.8em;
  300. }
  301. }
  302. }
  303. .dropdown-select {
  304. height: 1.5rem;
  305. padding: 0;
  306. padding-inline-start: 0.5rem;
  307. padding-inline-end: 1.5rem;
  308. background-color: $oc-gray-2;
  309. border-radius: var(--space-factor);
  310. border: 1px solid $oc-gray-4;
  311. font-size: 0.8rem;
  312. outline: none;
  313. appearance: none;
  314. background-image: url("https://free-use.s3-us-west-2.amazonaws.com/up-sort.svg");
  315. background-repeat: no-repeat;
  316. background-position: right 0.7rem top 50%, 0 0;
  317. :root[dir="rtl"] & {
  318. background-position: left 0.7rem top 50%, 0 0;
  319. }
  320. background-size: 0.65em auto, 100%;
  321. &:focus {
  322. box-shadow: 0 0 0 2px $oc-blue-2;
  323. }
  324. &:hover {
  325. background-color: $oc-gray-4;
  326. }
  327. &:active {
  328. background-color: $oc-gray-4;
  329. }
  330. &.dropdown-select--floating {
  331. position: absolute;
  332. margin: 0.5em;
  333. }
  334. }
  335. .dropdown-select__language.dropdown-select--floating {
  336. position: fixed;
  337. bottom: 10px;
  338. :root[dir="ltr"] & {
  339. right: 44px;
  340. }
  341. :root[dir="rtl"] & {
  342. left: 44px;
  343. }
  344. }
  345. .zIndexButton {
  346. margin: 0 5px;
  347. padding: 5px;
  348. display: inline-flex;
  349. align-items: center;
  350. justify-content: center;
  351. svg {
  352. width: 18px;
  353. height: 18px;
  354. }
  355. }
  356. .scroll-back-to-content {
  357. position: fixed;
  358. left: 50%;
  359. bottom: 30px;
  360. transform: translateX(-50%);
  361. padding: 10px 20px;
  362. }
  363. .help-icon {
  364. position: fixed;
  365. cursor: pointer;
  366. fill: $oc-gray-6;
  367. bottom: 14px;
  368. :root[dir="ltr"] & {
  369. right: 14px;
  370. }
  371. :root[dir="rtl"] & {
  372. left: 14px;
  373. }
  374. }
  375. @media #{$media-query} {
  376. aside {
  377. display: none;
  378. }
  379. .scroll-back-to-content {
  380. bottom: calc(80px + var(--sab, 0px));
  381. z-index: -1;
  382. }
  383. }
  384. .rtl-mirror {
  385. :root[dir="rtl"] & {
  386. transform: scaleX(-1);
  387. }
  388. }
  389. .github-corner {
  390. position: fixed;
  391. top: 0;
  392. :root[dir="ltr"] & {
  393. right: 0;
  394. }
  395. :root[dir="rtl"] & {
  396. left: 0;
  397. }
  398. }
  399. .zen-mode-visibility {
  400. visibility: visible;
  401. opacity: 1;
  402. height: auto;
  403. width: auto;
  404. transition: opacity 0.5s;
  405. &.zen-mode-visibility--hidden {
  406. visibility: hidden;
  407. opacity: 0;
  408. height: 0;
  409. width: 0;
  410. transition: opacity 0.5s;
  411. }
  412. }
  413. .disable-pointerEvents {
  414. pointer-events: none !important;
  415. }
  416. @media print {
  417. .App-bottom-bar,
  418. .FixedSideContainer,
  419. .layer-ui__wrapper {
  420. display: none;
  421. }
  422. }