styles.scss 10 KB

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