mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
parent
c9d5ec9277
commit
c0dd870c6e
33 changed files with 660 additions and 358 deletions
|
@ -1,18 +1,6 @@
|
|||
@import "./_variables";
|
||||
@import "./theme";
|
||||
|
||||
:root {
|
||||
--sat: env(safe-area-inset-top);
|
||||
--sab: env(safe-area-inset-bottom);
|
||||
--sal: env(safe-area-inset-left);
|
||||
--sar: env(safe-area-inset-right);
|
||||
--text-color-primary: #{$oc-gray-8};
|
||||
--bg-color-main: #{$oc-white};
|
||||
--shadow-island: 0 1px 5px #{transparentize($oc-black, 0.85)};
|
||||
--border-radius-m: 4px;
|
||||
--space-factor: 0.25rem;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
--ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto,
|
||||
|
@ -49,6 +37,13 @@ canvas {
|
|||
image-rendering: pixelated; // chromium
|
||||
// NOTE: must be declared *after* the above
|
||||
image-rendering: -moz-crisp-edges; // FF
|
||||
|
||||
.Appearance_dark & {
|
||||
// The percentage is inspired by
|
||||
// https://material.io/design/color/dark-theme.html#properties, which
|
||||
// recommends surface color of #121212, 93% yields #111111 for #FFF
|
||||
filter: var(--appearance-filter);
|
||||
}
|
||||
}
|
||||
|
||||
.excalidraw {
|
||||
|
@ -144,13 +139,13 @@ canvas {
|
|||
.buttonList label:focus-within,
|
||||
input:focus {
|
||||
outline: transparent;
|
||||
box-shadow: 0 0 0 2px $oc-blue-2;
|
||||
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
||||
}
|
||||
|
||||
button,
|
||||
.buttonList label {
|
||||
user-select: none;
|
||||
background-color: $oc-gray-2;
|
||||
background-color: var(--button-gray-1);
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
margin: 0.125rem 0;
|
||||
|
@ -161,15 +156,15 @@ button,
|
|||
|
||||
&:focus {
|
||||
outline: transparent;
|
||||
box-shadow: 0 0 0 2px $oc-blue-2;
|
||||
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $oc-gray-4;
|
||||
background-color: var(--button-gray-2);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: $oc-gray-5;
|
||||
background-color: var(--button-gray-3);
|
||||
}
|
||||
|
||||
&:disabled {
|
||||
|
@ -179,12 +174,12 @@ button,
|
|||
|
||||
.active,
|
||||
.buttonList label.active {
|
||||
background-color: $oc-gray-4;
|
||||
background-color: var(--button-gray-2);
|
||||
&:hover {
|
||||
background-color: $oc-gray-4;
|
||||
background-color: var(--button-gray-2);
|
||||
}
|
||||
&:active {
|
||||
background-color: $oc-gray-5;
|
||||
background-color: var(--button-gray-3);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,6 +231,7 @@ button,
|
|||
|
||||
.App-menu {
|
||||
display: grid;
|
||||
color: var(--icon-fill-color);
|
||||
}
|
||||
|
||||
.App-menu_top {
|
||||
|
@ -267,6 +263,7 @@ button,
|
|||
cursor: default;
|
||||
pointer-events: none !important;
|
||||
left: 0.25rem;
|
||||
z-index: 100;
|
||||
|
||||
&--transition-left {
|
||||
section {
|
||||
|
@ -363,13 +360,14 @@ button,
|
|||
padding: 0;
|
||||
padding-inline-start: 0.5rem;
|
||||
padding-inline-end: 1.5rem;
|
||||
background-color: $oc-gray-2;
|
||||
color: var(--icon-fill-color);
|
||||
background-color: var(--button-gray-1);
|
||||
border-radius: var(--space-factor);
|
||||
border: 1px solid $oc-gray-4;
|
||||
border: 1px solid var(--button-gray-2);
|
||||
font-size: 0.8rem;
|
||||
outline: none;
|
||||
appearance: none;
|
||||
background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>');
|
||||
background-image: var(--dropdown-icon);
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 0.7rem top 50%, 0 0;
|
||||
:root[dir="rtl"] & {
|
||||
|
@ -378,15 +376,15 @@ button,
|
|||
background-size: 0.65em auto, 100%;
|
||||
|
||||
&:focus {
|
||||
box-shadow: 0 0 0 2px $oc-blue-2;
|
||||
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $oc-gray-4;
|
||||
background-color: var(--button-gray-2);
|
||||
}
|
||||
|
||||
&:active {
|
||||
background-color: $oc-gray-4;
|
||||
background-color: var(--button-gray-2);
|
||||
}
|
||||
&.dropdown-select--floating {
|
||||
position: absolute;
|
||||
|
@ -419,6 +417,7 @@ button,
|
|||
}
|
||||
|
||||
.scroll-back-to-content {
|
||||
color: var(--popup-text-color);
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
bottom: 30px;
|
||||
|
|
|
@ -1,8 +1,68 @@
|
|||
@import "open-color/open-color.scss";
|
||||
|
||||
:root {
|
||||
--text-color-primary: #343a40;
|
||||
--bg-color-main: #fff;
|
||||
--shadow-island: 0 1px 5px rgba(0, 0, 0, 0.15);
|
||||
--bg-color-island: rgba(255, 255, 255, 0.9);
|
||||
--popup-background-color: #{$oc-white};
|
||||
--border-radius-m: 4px;
|
||||
--space-factor: 0.25rem;
|
||||
--button-gray-1: #{$oc-gray-2};
|
||||
--button-gray-2: #{$oc-gray-4};
|
||||
--button-gray-3: #{$oc-gray-5};
|
||||
--input-border-color: #{$oc-gray-3};
|
||||
--input-background-color: #{$oc-white};
|
||||
--input-hover-background-color: #{$oc-gray-1};
|
||||
--input-label-color: #{$oc-gray-7};
|
||||
--icon-fill-color: #{$oc-black};
|
||||
--icon-green-fill-color: #{$oc-green-9};
|
||||
--keybinding-color: #{$oc-gray-5};
|
||||
--color-overlay-text-color: #ccc;
|
||||
--sat: env(safe-area-inset-top);
|
||||
--sab: env(safe-area-inset-bottom);
|
||||
--sal: env(safe-area-inset-left);
|
||||
--sar: env(safe-area-inset-right);
|
||||
--text-color-primary: #{$oc-gray-8};
|
||||
--shadow-island: 0 1px 5px #{transparentize($oc-black, 0.85)};
|
||||
--overlay-background-color: #{transparentize($oc-white, 0.12)};
|
||||
--border-radius-m: 4px;
|
||||
--space-factor: 0.25rem;
|
||||
--dropdown-icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>');
|
||||
--focus-highlight-color: #{$oc-blue-2};
|
||||
--select-highlight-color: #{$oc-blue-5};
|
||||
--appearance-filter: none;
|
||||
--button-special-active-background-color: #{$oc-green-0};
|
||||
--button-destructive-color: #{$oc-red-9};
|
||||
--button-destructive-background-color: #{$oc-red-1};
|
||||
--popup-secondary-background-color: #{$oc-gray-1};
|
||||
--popup-text-color: #{$oc-black};
|
||||
--popup-text-inverted-color: #{$oc-white};
|
||||
}
|
||||
|
||||
.Appearance_dark {
|
||||
--text-color-primary: #{$oc-gray-4};
|
||||
--bg-color-island: #1e1e1e;
|
||||
--popup-background-color: #2c2c2c;
|
||||
--button-gray-1: #363636;
|
||||
--button-gray-2: #272727;
|
||||
--button-gray-3: #222;
|
||||
--input-border-color: #2e2e2e;
|
||||
--input-background-color: #121212;
|
||||
--input-hover-background-color: #181818;
|
||||
--input-label-color: #{$oc-gray-2};
|
||||
--icon-fill-color: #{$oc-gray-4};
|
||||
--icon-green-fill-color: #{$oc-green-4};
|
||||
--keybinding-color: #{$oc-gray-6};
|
||||
--color-overlay-text-color: #bbb;
|
||||
--shadow-island: 0 1px 5px #{transparentize($oc-black, 0.7)};
|
||||
--overlay-background-color: rgba(30, 30, 30, 0.88);
|
||||
// #{$oc-gray-4}; inlined
|
||||
--dropdown-icon: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="292.4" height="292.4" viewBox="0 0 292 292"><path fill="%23ced4da" d="M287 197L159 69c-4-3-8-5-13-5s-9 2-13 5L5 197c-3 4-5 8-5 13s2 9 5 13c4 4 8 5 13 5h256c5 0 9-1 13-5s5-8 5-13-1-9-5-13z"/></svg>');
|
||||
--focus-highlight-color: #{$oc-blue-6};
|
||||
--select-highlight-color: #{$oc-blue-4};
|
||||
--appearance-filter: invert(93%) hue-rotate(180deg);
|
||||
--button-special-active-background-color: #204624;
|
||||
--button-destructive-color: #{$oc-red-3};
|
||||
--button-destructive-background-color: #5a0000;
|
||||
--popup-secondary-background-color: #222;
|
||||
--popup-text-color: #{$oc-gray-4};
|
||||
--popup-text-inverted-color: #2c2c2c;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue