styles.scss 10 KB

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