scope css under name space excalidraw (#1983)

This commit is contained in:
Aakansha Doshi 2020-09-26 02:48:45 +05:30 committed by GitHub
parent 403576861c
commit a61b212220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 1706 additions and 1559 deletions

View File

@ -81,7 +81,6 @@
href="manifest.json" href="manifest.json"
style="--pwacompat-splash-font: 24px Virgil" style="--pwacompat-splash-font: 24px Virgil"
/> />
<% if (process.env.REACT_APP_INCLUDE_GTAG === 'true') { %> <% if (process.env.REACT_APP_INCLUDE_GTAG === 'true') { %>
<script <script
async async
@ -99,6 +98,17 @@
<!-- FIXME: remove this when we update CRA (fix SW caching) --> <!-- FIXME: remove this when we update CRA (fix SW caching) -->
<style> <style>
body {
margin: 0;
--ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI,
Roboto, Helvetica, Arial, sans-serif;
font-family: var(--ui-font);
-webkit-text-size-adjust: 100%;
user-select: none;
width: 100vw;
height: 100vh;
}
/* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */ /* http://www.eaglefonts.com/fg-virgil-ttf-131249.htm */
@font-face { @font-face {
font-family: "Virgil"; font-family: "Virgil";

View File

@ -757,10 +757,9 @@ class App extends React.Component<ExcalidrawProps, AppState> {
}); });
} }
document.documentElement.classList.toggle( document
"Appearance_dark", .querySelector(".excalidraw")
this.state.appearance === "dark", ?.classList.toggle("Appearance_dark", this.state.appearance === "dark");
);
if (this.state.isCollaborating && !this.portal.socket) { if (this.state.isCollaborating && !this.portal.socket) {
this.initializeSocketClient({ showLoadingState: true }); this.initializeSocketClient({ showLoadingState: true });

View File

@ -1,14 +1,16 @@
@import "../css/_variables"; @import "../css/_variables";
.Avatar { .excalidraw {
width: 2.5rem; .Avatar {
height: 2.5rem; width: 2.5rem;
border-radius: 1.25rem; height: 2.5rem;
display: flex; border-radius: 1.25rem;
justify-content: center; display: flex;
align-items: center; justify-content: center;
color: $oc-white; align-items: center;
cursor: pointer; color: $oc-white;
font-size: 0.8rem; cursor: pointer;
font-weight: 500; font-size: 0.8rem;
font-weight: 500;
}
} }

View File

@ -1,213 +1,241 @@
@import "open-color/open-color.scss"; @import "open-color/open-color.scss";
.color-picker { .excalidraw {
background: var(--popup-background-color); .color-picker {
border: 0px solid transparentize($oc-white, 0.75); background: var(--popup-background-color);
box-shadow: transparentize($oc-black, 0.75) 0px 1px 4px; border: 0px solid transparentize($oc-white, 0.75);
border-radius: 4px; box-shadow: transparentize($oc-black, 0.75) 0px 1px 4px;
position: absolute; border-radius: 4px;
:root[dir="ltr"] & { position: absolute;
left: -5.5px;
:root[dir="ltr"] & {
left: -5.5px;
}
:root[dir="rtl"] & {
right: -5.5px;
}
} }
:root[dir="rtl"] & {
right: -5.5px; .color-picker-control-container {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
}
.color-picker-triangle {
width: 0px;
height: 0px;
border-style: solid;
border-width: 0px 9px 10px;
border-color: transparent transparent var(--popup-background-color);
position: absolute;
top: -10px;
:root[dir="ltr"] & {
left: 12px;
}
:root[dir="rtl"] & {
right: 12px;
}
}
.color-picker-triangle-shadow {
border-color: transparent transparent transparentize($oc-black, 0.9);
top: -11px;
}
.color-picker-content {
padding: 0.5rem;
display: grid;
grid-template-columns: repeat(5, auto);
grid-gap: 0.5rem;
}
.color-picker-content .color-input-container {
grid-column: 1 / span 5;
}
.color-picker-swatch {
position: relative;
height: 1.875rem;
width: 1.875rem;
cursor: pointer;
border-radius: 4px;
margin: 0;
box-sizing: border-box;
border: 1px solid #ddd;
background-color: currentColor !important;
filter: var(--appearance-filter);
&:focus {
/* TODO: only show the border when the color is too light to see as a shadow */
box-shadow: 0 0 4px 1px currentColor;
border-color: var(--select-highlight-color);
}
}
.color-picker-transparent {
border-radius: 4px;
box-shadow: transparentize($oc-black, 0.9) 0px 0px 0px 1px inset;
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
.color-picker-transparent,
.color-picker-label-swatch {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
left center;
}
.color-picker-hash {
background: var(--input-border-color);
height: 1.875rem;
width: 1.875rem;
:root[dir="ltr"] & {
border-radius: 4px 0px 0px 4px;
}
:root[dir="rtl"] & {
border-radius: 0px 4px 4px 0px;
}
color: var(--input-label-color);
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.color-input-container:focus-within .color-picker-hash {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
.color-input-container:focus-within .color-picker-hash::before,
.color-input-container:focus-within .color-picker-hash::after {
content: "";
width: 1px;
height: 100%;
position: absolute;
top: 0;
}
.color-input-container:focus-within .color-picker-hash::before {
background: var(--input-border-color);
:root[dir="ltr"] & {
right: -1px;
}
:root[dir="rtl"] & {
left: -1px;
}
}
.color-input-container:focus-within .color-picker-hash::after {
background: var(--input-background-color);
:root[dir="ltr"] & {
right: -2px;
}
:root[dir="rtl"] & {
left: -2px;
}
}
.color-input-container {
display: flex;
}
.color-picker-input {
width: 12ch; /* length of `transparent` + 1 */
margin: 0;
font-size: 1rem;
background-color: var(--input-background-color);
color: var(--text-color-primary);
border: 0px;
outline: none;
height: 1.75em;
box-shadow: var(--input-border-color) 0px 0px 0px 1px inset;
:root[dir="ltr"] & {
border-radius: 0px 4px 4px 0px;
}
:root[dir="rtl"] & {
border-radius: 4px 0px 0px 4px;
}
float: left;
padding: 1px;
padding-inline-start: 0.5em;
appearance: none;
}
.color-picker-label-swatch {
height: 1.875rem;
width: 1.875rem;
margin-inline-end: 0.25rem;
border: 1px solid $oc-gray-3;
position: relative;
overflow: hidden;
background-color: transparent !important;
filter: var(--appearance-filter);
&:after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--swatch-color);
}
}
.color-picker-keybinding {
position: absolute;
bottom: 2px;
:root[dir="ltr"] & {
right: 2px;
}
:root[dir="rtl"] & {
left: 2px;
}
font-size: 0.7em;
}
.color-picker-type-canvasBackground .color-picker-keybinding {
color: #aaa;
}
.color-picker-type-elementBackground .color-picker-keybinding {
color: #fff;
}
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
color: #aaa;
}
.color-picker-type-elementStroke .color-picker-keybinding {
color: #d4d4d4;
}
&.Appearance_dark {
.color-picker-type-elementBackground .color-picker-keybinding {
color: #000;
}
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
color: #000;
}
} }
} }
.color-picker-control-container {
display: grid;
grid-template-columns: auto 1fr;
align-items: center;
}
.color-picker-triangle {
width: 0px;
height: 0px;
border-style: solid;
border-width: 0px 9px 10px;
border-color: transparent transparent var(--popup-background-color);
position: absolute;
top: -10px;
:root[dir="ltr"] & {
left: 12px;
}
:root[dir="rtl"] & {
right: 12px;
}
}
.color-picker-triangle-shadow {
border-color: transparent transparent transparentize($oc-black, 0.9);
top: -11px;
}
.color-picker-content {
padding: 0.5rem;
display: grid;
grid-template-columns: repeat(5, auto);
grid-gap: 0.5rem;
}
.color-picker-content .color-input-container {
grid-column: 1 / span 5;
}
.color-picker-swatch {
position: relative;
height: 1.875rem;
width: 1.875rem;
cursor: pointer;
border-radius: 4px;
margin: 0;
box-sizing: border-box;
border: 1px solid #ddd;
background-color: currentColor !important;
filter: var(--appearance-filter);
}
.color-picker-swatch:focus {
/* TODO: only show the border when the color is too light to see as a shadow */
box-shadow: 0 0 4px 1px currentColor;
border-color: var(--select-highlight-color);
}
.color-picker-transparent {
border-radius: 4px;
box-shadow: transparentize($oc-black, 0.9) 0px 0px 0px 1px inset;
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;
}
.color-picker-transparent,
.color-picker-label-swatch {
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
left center;
}
.color-picker-hash {
background: var(--input-border-color);
height: 1.875rem;
width: 1.875rem;
:root[dir="ltr"] & {
border-radius: 4px 0px 0px 4px;
}
:root[dir="rtl"] & {
border-radius: 0px 4px 4px 0px;
}
color: var(--input-label-color);
display: flex;
align-items: center;
justify-content: center;
position: relative;
}
.color-input-container:focus-within .color-picker-hash {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
.color-input-container:focus-within .color-picker-hash::before,
.color-input-container:focus-within .color-picker-hash::after {
content: "";
width: 1px;
height: 100%;
position: absolute;
top: 0;
}
.color-input-container:focus-within .color-picker-hash::before {
background: var(--input-border-color);
:root[dir="ltr"] & {
right: -1px;
}
:root[dir="rtl"] & {
left: -1px;
}
}
.color-input-container:focus-within .color-picker-hash::after {
background: var(--input-background-color);
:root[dir="ltr"] & {
right: -2px;
}
:root[dir="rtl"] & {
left: -2px;
}
}
.color-input-container {
display: flex;
}
.color-picker-input {
width: 12ch; /* length of `transparent` + 1 */
margin: 0;
font-size: 1rem;
background-color: var(--input-background-color);
color: var(--text-color-primary);
border: 0px;
outline: none;
height: 1.75em;
box-shadow: var(--input-border-color) 0px 0px 0px 1px inset;
:root[dir="ltr"] & {
border-radius: 0px 4px 4px 0px;
}
:root[dir="rtl"] & {
border-radius: 4px 0px 0px 4px;
}
float: left;
padding: 1px;
padding-inline-start: 0.5em;
appearance: none;
}
.color-picker-label-swatch {
height: 1.875rem;
width: 1.875rem;
margin-inline-end: 0.25rem;
border: 1px solid $oc-gray-3;
position: relative;
overflow: hidden;
background-color: transparent !important;
filter: var(--appearance-filter);
}
.color-picker-label-swatch::after {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: var(--swatch-color);
}
.color-picker-keybinding {
position: absolute;
bottom: 2px;
:root[dir="ltr"] & {
right: 2px;
}
:root[dir="rtl"] & {
left: 2px;
}
font-size: 0.7em;
}
.color-picker-type-canvasBackground .color-picker-keybinding {
color: #aaa;
}
.color-picker-type-elementBackground .color-picker-keybinding {
color: #fff;
.Appearance_dark & {
color: #000;
}
}
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
color: #aaa;
.Appearance_dark & {
color: #000;
}
}
.color-picker-type-elementStroke .color-picker-keybinding {
color: #d4d4d4;
}

View File

@ -1,40 +1,42 @@
@import "open-color/open-color.scss"; @import "open-color/open-color.scss";
.context-menu { .excalidraw {
position: relative; .context-menu {
border-radius: 4px; position: relative;
box-shadow: 0px 3px 10px transparentize($oc-black, 0.8); border-radius: 4px;
padding: 0; box-shadow: 0px 3px 10px transparentize($oc-black, 0.8);
list-style: none; padding: 0;
user-select: none; list-style: none;
margin: -0.25rem 0 0 0.125rem; user-select: none;
padding: 0.25rem 0; margin: -0.25rem 0 0 0.125rem;
background-color: var(--popup-secondary-background-color); padding: 0.25rem 0;
border: 1px solid var(--button-gray-3); background-color: var(--popup-secondary-background-color);
} border: 1px solid var(--button-gray-3);
}
.context-menu button { .context-menu button {
color: var(--popup-text-color); color: var(--popup-text-color);
} }
.context-menu-option { .context-menu-option {
position: relative; position: relative;
width: 100%; width: 100%;
min-width: 9.5rem; min-width: 9.5rem;
margin: 0; margin: 0;
padding: 0.25rem 1rem 0.25rem 1.25rem; padding: 0.25rem 1rem 0.25rem 1.25rem;
text-align: start; text-align: start;
border-radius: 0; border-radius: 0;
background-color: transparent; background-color: transparent;
border: none; border: none;
white-space: nowrap; white-space: nowrap;
} }
.context-menu-option:hover { .context-menu-option:hover {
color: var(--popup-background-color); color: var(--popup-background-color);
background-color: var(--select-highlight-color); background-color: var(--select-highlight-color);
} }
.context-menu-option:focus { .context-menu-option:focus {
z-index: 1; z-index: 1;
}
} }

View File

@ -16,25 +16,35 @@ type Props = {
left: number; left: number;
}; };
const ContextMenu = ({ options, onCloseRequest, top, left }: Props) => ( const ContextMenu = ({ options, onCloseRequest, top, left }: Props) => {
<Popover const isDarkTheme = !!document
onCloseRequest={onCloseRequest} .querySelector(".excalidraw")
top={top} ?.classList.contains("Appearance_dark");
left={left} const wrapperClasses = `excalidraw ${
fitInViewport={true} isDarkTheme ? "Appearance_dark Appearance_dark-background-none" : ""
> }`;
<ul return (
className="context-menu" <div className={wrapperClasses}>
onContextMenu={(event) => event.preventDefault()} <Popover
> onCloseRequest={onCloseRequest}
{options.map((option, idx) => ( top={top}
<li key={idx} onClick={onCloseRequest}> left={left}
<ContextMenuOption {...option} /> fitInViewport={true}
</li> >
))} <ul
</ul> className="context-menu"
</Popover> onContextMenu={(event) => event.preventDefault()}
); >
{options.map((option, idx) => (
<li key={idx} onClick={onCloseRequest}>
<ContextMenuOption {...option} />
</li>
))}
</ul>
</Popover>
</div>
);
};
const ContextMenuOption = ({ label, action }: ContextMenuOption) => ( const ContextMenuOption = ({ label, action }: ContextMenuOption) => (
<button className="context-menu-option" onClick={action}> <button className="context-menu-option" onClick={action}>

View File

@ -1,61 +1,66 @@
@import "../css/_variables"; @import "../css/_variables";
.Dialog__title { .excalidraw {
display: grid;
align-items: center;
margin-top: 0;
grid-template-columns: 1fr calc(var(--space-factor) * 7);
grid-gap: var(--metric);
}
.Dialog__titleContent {
flex: 1;
}
.Dialog .Modal__close {
color: var(--icon-fill-color);
margin: 0;
}
@media #{$media-query} {
.Dialog {
--metric: calc(var(--space-factor) * 4);
--inset-left: #{"max(var(--metric), var(--sal))"};
--inset-right: #{"max(var(--metric), var(--sar))"};
}
.Dialog__title { .Dialog__title {
grid-template-columns: calc(var(--space-factor) * 7) 1fr calc( display: grid;
var(--space-factor) * 7 align-items: center;
); margin-top: 0;
position: sticky; grid-template-columns: 1fr calc(var(--space-factor) * 7);
top: calc(-1 * var(--metric)); grid-gap: var(--metric);
margin: calc(-1 * var(--inset-right)); }
margin-top: calc(-1 * var(--metric));
margin-bottom: var(--metric);
padding: calc(var(--space-factor) * 2);
padding-left: var(--inset-left);
padding-right: var(--inset-right);
background: var(--bg-color-island);
font-size: 1.25em;
box-sizing: border-box;
border-bottom: 1px solid var(--button-gray-2);
z-index: 1;
}
.Dialog__titleContent { .Dialog__titleContent {
text-align: center; flex: 1;
}
.Dialog .Island {
width: 100vw;
height: 100%;
box-sizing: border-box;
overflow-y: auto;
padding-left: #{"max(calc(var(--padding) * var(--space-factor)), var(--sal))"};
padding-right: #{"max(calc(var(--padding) * var(--space-factor)), var(--sar))"};
padding-bottom: #{"max(calc(var(--padding) * var(--space-factor)), var(--sab))"};
} }
.Dialog .Modal__close { .Dialog .Modal__close {
order: -1; color: var(--icon-fill-color);
margin: 0;
}
@media #{$media-query} {
.Dialog {
--metric: calc(var(--space-factor) * 4);
--inset-left: #{"max(var(--metric), var(--sal))"};
--inset-right: #{"max(var(--metric), var(--sar))"};
}
.Dialog__title {
grid-template-columns: calc(var(--space-factor) * 7) 1fr calc(
var(--space-factor) * 7
);
position: sticky;
top: calc(-1 * var(--metric));
margin: calc(-1 * var(--inset-right));
margin-top: calc(-1 * var(--metric));
margin-bottom: var(--metric);
padding: calc(var(--space-factor) * 2);
padding-left: var(--inset-left);
padding-right: var(--inset-right);
background: var(--bg-color-island);
font-size: 1.25em;
box-sizing: border-box;
border-bottom: 1px solid var(--button-gray-2);
z-index: 1;
}
.Dialog__titleContent {
text-align: center;
}
.Dialog .Island {
width: 100vw;
height: 100%;
box-sizing: border-box;
overflow-y: auto;
padding-left: #{"max(calc(var(--padding) * var(--space-factor)), var(--sal))"};
padding-right: #{"max(calc(var(--padding) * var(--space-factor)), var(--sar))"};
padding-bottom: #{"max(calc(var(--padding) * var(--space-factor)), var(--sab))"};
}
.Dialog .Modal__close {
order: -1;
}
} }
} }

View File

@ -1,65 +1,71 @@
@import "../css/_variables"; @import "../css/_variables";
.ExportDialog__preview { .excalidraw {
--preview-padding: calc(var(--space-factor) * 4); .ExportDialog__preview {
--preview-padding: calc(var(--space-factor) * 4);
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==") background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
left center; left center;
text-align: center; text-align: center;
padding: var(--preview-padding); padding: var(--preview-padding);
margin-bottom: calc(var(--space-factor) * 3);
}
.ExportDialog__preview canvas {
max-width: calc(100% - var(--preview-padding) * 2);
max-height: 25rem;
}
.Appearance_dark .ExportDialog__preview canvas {
filter: none;
}
.ExportDialog__actions {
width: 100%;
display: flex;
grid-gap: calc(var(--space-factor) * 2);
align-items: top;
justify-content: space-between;
}
.ExportDialog__name {
grid-column: project-name;
margin: auto;
.TextInput {
height: calc(1rem - 3px);
}
}
@media (max-width: 550px) {
.ExportDialog {
display: flex;
flex-direction: column;
}
.ExportDialog__actions {
flex-direction: column;
align-items: center;
}
.ExportDialog__actions > * {
margin-bottom: calc(var(--space-factor) * 3); margin-bottom: calc(var(--space-factor) * 3);
} }
}
@media #{$media-query} {
.ExportDialog__preview canvas { .ExportDialog__preview canvas {
max-height: 30vh; max-width: calc(100% - var(--preview-padding) * 2);
max-height: 25rem;
} }
.ExportDialog__dialog,
.ExportDialog__dialog .Island { &.Appearance_dark .ExportDialog__preview canvas {
height: 100%; filter: none;
box-sizing: border-box;
} }
.ExportDialog__dialog .Island {
overflow-y: auto; .ExportDialog__actions {
width: 100%;
display: flex;
grid-gap: calc(var(--space-factor) * 2);
align-items: top;
justify-content: space-between;
}
.ExportDialog__name {
grid-column: project-name;
margin: auto;
.TextInput {
height: calc(1rem - 3px);
}
}
@media (max-width: 550px) {
.ExportDialog {
display: flex;
flex-direction: column;
}
.ExportDialog__actions {
flex-direction: column;
align-items: center;
}
.ExportDialog__actions > * {
margin-bottom: calc(var(--space-factor) * 3);
}
}
@media #{$media-query} {
.ExportDialog__preview canvas {
max-height: 30vh;
}
.ExportDialog__dialog,
.ExportDialog__dialog .Island {
height: 100%;
box-sizing: border-box;
}
.ExportDialog__dialog .Island {
overflow-y: auto;
}
} }
} }

View File

@ -1,36 +0,0 @@
.FixedSideContainer {
--margin: 0.25rem;
position: absolute;
pointer-events: none;
}
.FixedSideContainer > * {
pointer-events: all;
}
.FixedSideContainer_side_top {
left: var(--margin);
top: var(--margin);
right: var(--margin);
z-index: 2;
}
.FixedSideContainer_side_top.zen-mode {
right: 42px;
}
/* TODO: if these are used, make sure to implement RTL support
.FixedSideContainer_side_left {
left: var(--margin);
top: var(--margin);
bottom: var(--margin);
z-index: 1;
}
.FixedSideContainer_side_right {
right: var(--margin);
top: var(--margin);
bottom: var(--margin);
z-index: 3;
}
*/

View File

@ -0,0 +1,38 @@
.excalidraw {
.FixedSideContainer {
--margin: 0.25rem;
position: absolute;
pointer-events: none;
}
.FixedSideContainer > * {
pointer-events: all;
}
.FixedSideContainer_side_top {
left: var(--margin);
top: var(--margin);
right: var(--margin);
z-index: 2;
}
.FixedSideContainer_side_top.zen-mode {
right: 42px;
}
}
/* TODO: if these are used, make sure to implement RTL support
.FixedSideContainer_side_left {
left: var(--margin);
top: var(--margin);
bottom: var(--margin);
z-index: 1;
}
.FixedSideContainer_side_right {
right: var(--margin);
top: var(--margin);
bottom: var(--margin);
z-index: 3;
}
*/

View File

@ -1,4 +1,4 @@
import "./FixedSideContainer.css"; import "./FixedSideContainer.scss";
import React from "react"; import React from "react";

View File

@ -1,31 +1,33 @@
@import "../css/_variables"; @import "../css/_variables";
.HintViewer { .excalidraw {
pointer-events: none; .HintViewer {
box-sizing: border-box; pointer-events: none;
position: absolute; box-sizing: border-box;
display: flex; position: absolute;
justify-content: center; display: flex;
left: 0; justify-content: center;
top: 100%; left: 0;
max-width: 100%; top: 100%;
width: 100%; max-width: 100%;
margin-top: 6px; width: 100%;
text-align: center; margin-top: 6px;
color: $oc-gray-6; text-align: center;
font-size: 0.8rem; color: $oc-gray-6;
font-size: 0.8rem;
@media (min-width: 1200px) { @media (min-width: 1200px) {
white-space: pre; white-space: pre;
} }
@media #{$media-query} { @media #{$media-query} {
position: static; position: static;
} }
> span { > span {
padding: 0.2rem 0.4rem; padding: 0.2rem 0.4rem;
background-color: var(--overlay-background-color); background-color: var(--overlay-background-color);
border-radius: 4px; border-radius: 4px;
}
} }
} }

View File

@ -1,14 +1,16 @@
.Island { .excalidraw {
--padding: 0; .Island {
background-color: var(--bg-color-island); --padding: 0;
backdrop-filter: saturate(100%) blur(10px); background-color: var(--bg-color-island);
box-shadow: var(--shadow-island); backdrop-filter: saturate(100%) blur(10px);
border-radius: var(--border-radius-m); box-shadow: var(--shadow-island);
padding: calc(var(--padding) * var(--space-factor)); border-radius: var(--border-radius-m);
position: relative; padding: calc(var(--padding) * var(--space-factor));
transition: box-shadow 0.5s ease-in-out; position: relative;
transition: box-shadow 0.5s ease-in-out;
&.zen-mode { &.zen-mode {
box-shadow: none; box-shadow: none;
}
} }
} }

View File

@ -1,151 +1,170 @@
@import "open-color/open-color"; @import "open-color/open-color";
.layer-ui__library { .excalidraw {
margin: auto; .layer-ui__library {
display: flex; margin: auto;
align-items: center;
justify-content: center;
}
.layer-ui__library-message {
padding: 10px 20px;
max-width: 200px;
}
.layer-ui__library-items {
max-height: 50vh;
overflow: auto;
}
.layer-ui__wrapper {
.encrypted-icon {
position: relative;
margin-inline-start: 15px;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
border-radius: var(--space-factor); justify-content: center;
color: $oc-green-9; }
svg { .layer-ui__library-message {
width: 1.2rem; padding: 10px 20px;
height: 1.2rem; max-width: 200px;
} }
&.tooltip .tooltip-text { .layer-ui__library-items {
visibility: hidden; max-height: 50vh;
width: 20rem; overflow: auto;
bottom: calc(50% + 0.8rem + 6px); }
:root[dir="ltr"] & {
left: -5px; .layer-ui__wrapper {
.encrypted-icon {
position: relative;
margin-inline-start: 15px;
display: flex;
justify-content: center;
align-items: center;
border-radius: var(--space-factor);
color: $oc-green-9;
svg {
width: 1.2rem;
height: 1.2rem;
} }
:root[dir="rtl"] & {
right: -5px;
}
background-color: $oc-black;
color: $oc-white;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 10;
font-size: 13px;
line-height: 1.5;
white-space: pre-wrap;
&::after { &.tooltip .tooltip-text {
--size: 6px; visibility: hidden;
content: ""; width: 20rem;
border: var(--size) solid transparent; bottom: calc(50% + 0.8rem + 6px);
border-top-color: $oc-black;
position: absolute;
bottom: calc(-2 * var(--size));
:root[dir="ltr"] & { :root[dir="ltr"] & {
left: calc(5px + var(--size) / 2); left: -5px;
} }
:root[dir="rtl"] & { :root[dir="rtl"] & {
right: calc(5px + var(--size) / 2); right: -5px;
} }
background-color: $oc-black;
color: $oc-white;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 10;
font-size: 13px;
line-height: 1.5;
white-space: pre-wrap;
&::after {
--size: 6px;
content: "";
border: var(--size) solid transparent;
border-top-color: $oc-black;
position: absolute;
bottom: calc(-2 * var(--size));
:root[dir="ltr"] & {
left: calc(5px + var(--size) / 2);
}
:root[dir="rtl"] & {
right: calc(5px + var(--size) / 2);
}
}
}
// the following 3 rules ensure that the tooltip doesn't show (nor affect
// the cursor) when you drag over when you draw on canvas, but at the same
// time it still works when clicking on the link/shield
body:active &.tooltip:not(:hover) {
pointer-events: none;
}
body:not(:active) &.tooltip:hover .tooltip-text {
visibility: visible;
}
.tooltip-text:hover {
visibility: visible;
} }
} }
// the following 3 rules ensure that the tooltip doesn't show (nor affect &__github-corner {
// the cursor) when you drag over when you draw on canvas, but at the same top: 0;
// time it still works when clicking on the link/shield
body:active &.tooltip:not(:hover) { :root[dir="ltr"] & {
pointer-events: none; right: 0;
} }
body:not(:active) &.tooltip:hover .tooltip-text {
visibility: visible;
}
.tooltip-text:hover {
visibility: visible;
}
}
&__github-corner { :root[dir="rtl"] & {
top: 0; left: 0;
:root[dir="ltr"] & { }
right: 0;
}
:root[dir="rtl"] & {
left: 0;
}
position: absolute;
width: 40px;
}
&__footer { position: absolute;
position: absolute; width: 40px;
z-index: 100;
bottom: 0px;
:root[dir="ltr"] & {
right: 0;
}
:root[dir="rtl"] & {
left: 0;
}
width: 190px;
}
.zen-mode-transition {
transition: transform 0.5s ease-in-out;
:root[dir="ltr"] &.transition-left {
transform: translate(-999px, 0);
}
:root[dir="ltr"] &.transition-right {
transform: translate(999px, 0px);
}
:root[dir="rtl"] &.transition-left {
transform: translate(999px, 0);
}
:root[dir="rtl"] &.transition-right {
transform: translate(-999px, 0);
} }
&.App-menu_bottom--transition-left { &__footer {
transform: translate(-92px, 0); position: absolute;
z-index: 100;
bottom: 0px;
:root[dir="ltr"] & {
right: 0;
}
:root[dir="rtl"] & {
left: 0;
}
width: 190px;
} }
}
.disable-zen-mode { .zen-mode-transition {
height: 30px; transition: transform 0.5s ease-in-out;
position: absolute;
bottom: 10px;
right: 15px;
font-size: 10px;
padding: 10px;
font-weight: 500;
opacity: 0;
visibility: hidden;
transition: visibility 0s linear 0s, opacity 0.5s;
&--visible { :root[dir="ltr"] &.transition-left {
opacity: 1; transform: translate(-999px, 0);
visibility: visible; }
transition: visibility 0s linear 300ms, opacity 0.5s;
transition-delay: 0.8s; :root[dir="ltr"] &.transition-right {
transform: translate(999px, 0px);
}
:root[dir="rtl"] &.transition-left {
transform: translate(999px, 0);
}
:root[dir="rtl"] &.transition-right {
transform: translate(-999px, 0);
}
&.App-menu_bottom--transition-left {
transform: translate(-92px, 0);
}
}
.disable-zen-mode {
height: 30px;
position: absolute;
bottom: 10px;
right: 15px;
font-size: 10px;
padding: 10px;
font-weight: 500;
opacity: 0;
visibility: hidden;
transition: visibility 0s linear 0s, opacity 0.5s;
&--visible {
opacity: 1;
visibility: visible;
transition: visibility 0s linear 300ms, opacity 0.5s;
transition-delay: 0.8s;
}
} }
} }
} }

View File

@ -1,77 +1,79 @@
.library-unit { .excalidraw {
align-items: center; .library-unit {
border: 1px solid var(--button-gray-2); align-items: center;
display: flex; border: 1px solid var(--button-gray-2);
justify-content: center; display: flex;
position: relative; justify-content: center;
width: 63px; position: relative;
height: 63px; // match width width: 63px;
} height: 63px; // match width
.library-unit__dragger {
display: flex;
height: 100%;
width: 100%;
}
.library-unit__dragger > svg {
filter: var(--appearance-filter);
flex-grow: 1;
max-height: 100%;
max-width: 100%;
}
.library-unit__removeFromLibrary,
.library-unit__removeFromLibrary:hover,
.library-unit__removeFromLibrary:active {
align-items: center;
background: none;
border: none;
color: var(--icon-fill-color);
display: flex;
justify-content: center;
margin: 0;
padding: 0;
position: absolute;
right: 5px;
top: 5px;
}
.library-unit__removeFromLibrary > svg {
height: 16px;
width: 16px;
}
.library-unit__pulse {
transform: scale(1);
animation: library-unit__pulse-animation 1s ease-in infinite;
}
.library-unit__adder {
position: absolute;
left: 50%;
top: 50%;
width: 20px;
height: 20px;
margin-left: -10px;
margin-top: -10px;
pointer-events: none;
}
.library-unit__active {
cursor: pointer;
}
@keyframes library-unit__pulse-animation {
0% {
transform: scale(0.95);
} }
50% { .library-unit__dragger {
display: flex;
height: 100%;
width: 100%;
}
.library-unit__dragger > svg {
filter: var(--appearance-filter);
flex-grow: 1;
max-height: 100%;
max-width: 100%;
}
.library-unit__removeFromLibrary,
.library-unit__removeFromLibrary:hover,
.library-unit__removeFromLibrary:active {
align-items: center;
background: none;
border: none;
color: var(--icon-fill-color);
display: flex;
justify-content: center;
margin: 0;
padding: 0;
position: absolute;
right: 5px;
top: 5px;
}
.library-unit__removeFromLibrary > svg {
height: 16px;
width: 16px;
}
.library-unit__pulse {
transform: scale(1); transform: scale(1);
animation: library-unit__pulse-animation 1s ease-in infinite;
} }
100% { .library-unit__adder {
transform: scale(0.95); position: absolute;
left: 50%;
top: 50%;
width: 20px;
height: 20px;
margin-left: -10px;
margin-top: -10px;
pointer-events: none;
}
.library-unit__active {
cursor: pointer;
}
@keyframes library-unit__pulse-animation {
0% {
transform: scale(0.95);
}
50% {
transform: scale(1);
}
100% {
transform: scale(0.95);
}
} }
} }

View File

@ -1,84 +1,90 @@
@import "../css/_variables"; @import "../css/_variables";
.Modal { .excalidraw {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
padding: calc(var(--space-factor) * 10);
}
.Modal__background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
background-color: transparentize($oc-black, 0.7);
backdrop-filter: blur(2px);
}
.Modal__content {
position: relative;
z-index: 2;
width: 100%;
max-width: var(--max-width);
opacity: 0;
transform: translateY(10px);
animation: Modal__content_fade-in 0.1s ease-out 0.05s forwards;
position: relative;
// for modals, reset blurry bg
background: var(--bg-color-island);
backdrop-filter: none;
@media #{$media-query} {
max-width: 100%;
}
}
@keyframes Modal__content_fade-in {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.Modal__close {
width: calc(var(--space-factor) * 7);
height: calc(var(--space-factor) * 7);
display: flex;
align-items: center;
justify-content: center;
svg {
height: calc(var(--space-factor) * 5);
}
}
.Modal__close--floating {
position: absolute;
right: calc(var(--space-factor) * 5);
top: calc(var(--space-factor) * 5);
}
@media #{$media-query} {
.Modal { .Modal {
padding: 0;
}
.Modal__content {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
display: flex;
align-items: center;
justify-content: center;
overflow: auto;
padding: calc(var(--space-factor) * 10);
}
.Modal__background {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1;
background-color: transparentize($oc-black, 0.7);
backdrop-filter: blur(2px);
}
.Modal__content {
position: relative;
z-index: 2;
width: 100%;
max-width: var(--max-width);
opacity: 0;
transform: translateY(10px);
animation: Modal__content_fade-in 0.1s ease-out 0.05s forwards;
position: relative;
// for modals, reset blurry bg
background: var(--bg-color-island);
backdrop-filter: none;
@media #{$media-query} {
max-width: 100%;
}
}
@keyframes Modal__content_fade-in {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.Modal__close {
width: calc(var(--space-factor) * 7);
height: calc(var(--space-factor) * 7);
display: flex;
align-items: center;
justify-content: center;
svg {
height: calc(var(--space-factor) * 5);
}
}
.Modal__close--floating {
position: absolute;
right: calc(var(--space-factor) * 5);
top: calc(var(--space-factor) * 5);
}
@media #{$media-query} {
.Modal {
padding: 0;
}
.Modal__content {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
} }
} }

View File

@ -47,7 +47,17 @@ export const Modal = (props: {
const useBodyRoot = () => { const useBodyRoot = () => {
const createDiv = () => { const createDiv = () => {
const isDarkTheme = !!document
.querySelector(".excalidraw")
?.classList.contains("Appearance_dark");
const div = document.createElement("div"); const div = document.createElement("div");
div.classList.add("excalidraw");
if (isDarkTheme) {
div.classList.add("Appearance_dark");
div.classList.add("Appearance_dark-background-none");
}
document.body.appendChild(div); document.body.appendChild(div);
return div; return div;
}; };

View File

@ -1,12 +0,0 @@
.popover {
position: absolute;
z-index: 10;
}
.popover .cover {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}

View File

@ -0,0 +1,14 @@
.excalidraw {
.popover {
position: absolute;
z-index: 10;
}
.popover .cover {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
}

View File

@ -1,5 +1,5 @@
import React, { useLayoutEffect, useRef, useEffect } from "react"; import React, { useLayoutEffect, useRef, useEffect } from "react";
import "./Popover.css"; import "./Popover.scss";
import { unstable_batchedUpdates } from "react-dom"; import { unstable_batchedUpdates } from "react-dom";
type Props = { type Props = {

View File

@ -1,82 +1,84 @@
@import "../css/_variables"; @import "../css/_variables";
.RoomDialog-modalButton.is-collaborating { .excalidraw {
background-color: var(--button-special-active-background-color); .RoomDialog-modalButton.is-collaborating {
background-color: var(--button-special-active-background-color);
.ToolIcon__icon svg { .ToolIcon__icon svg {
color: var(--icon-green-fill-color); color: var(--icon-green-fill-color);
} }
} }
.RoomDialog-modalButton-collaborators { .RoomDialog-modalButton-collaborators {
min-width: 1em; min-width: 1em;
position: absolute; position: absolute;
bottom: -5px; bottom: -5px;
right: -5px; right: -5px;
padding: 3px; padding: 3px;
border-radius: 50%; border-radius: 50%;
background-color: $oc-green-6; background-color: $oc-green-6;
color: $oc-white; color: $oc-white;
font-size: 0.7em; font-size: 0.7em;
font-family: var(--ui-font); font-family: var(--ui-font);
} }
.RoomDialog-linkContainer { .RoomDialog-linkContainer {
display: flex; display: flex;
margin: 1.5em 0; margin: 1.5em 0;
} }
.RoomDialog-link { .RoomDialog-link {
color: var(--text-color-primary); color: var(--text-color-primary);
min-width: 0; min-width: 0;
flex: 1 1 auto; flex: 1 1 auto;
margin-left: 1em; margin-left: 1em;
display: inline-block; display: inline-block;
cursor: pointer; cursor: pointer;
border: none; border: none;
height: 2.5rem; height: 2.5rem;
line-height: 2.5rem; line-height: 2.5rem;
padding: 0 0.5rem; padding: 0 0.5rem;
white-space: nowrap; white-space: nowrap;
border-radius: var(--space-factor); border-radius: var(--space-factor);
background-color: var(--button-gray-1); background-color: var(--button-gray-1);
} }
.RoomDialog-emoji { .RoomDialog-emoji {
font-family: sans-serif; font-family: sans-serif;
} }
.RoomDialog-usernameContainer { .RoomDialog-usernameContainer {
display: flex; display: flex;
margin: 1.5em 0; margin: 1.5em 0;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.RoomDialog-username { .RoomDialog-username {
background-color: var(--input-background-color); background-color: var(--input-background-color);
border-color: var(--input-border-color); border-color: var(--input-border-color);
appearance: none; appearance: none;
min-width: 0; min-width: 0;
flex: 1 1 auto; flex: 1 1 auto;
margin-left: 1em; margin-left: 1em;
height: 2.5rem; height: 2.5rem;
font-size: 1em; font-size: 1em;
line-height: 1.5; line-height: 1.5;
padding: 0 0.5rem; padding: 0 0.5rem;
} }
.RoomDialog-sessionStartButtonContainer { .RoomDialog-sessionStartButtonContainer {
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.RoomDialog-stopSession { .Modal .RoomDialog-stopSession {
background-color: var(--button-destructive-background-color); background-color: var(--button-destructive-background-color);
.ToolIcon__label, .ToolIcon__label,
.ToolIcon__icon svg { .ToolIcon__icon svg {
color: var(--button-destructive-color); color: var(--button-destructive-color);
}
} }
} }

View File

@ -1,40 +1,42 @@
@import "../css/_variables"; @import "../css/_variables";
.ShortcutsDialog-island { .excalidraw {
border: 1px solid var(--button-gray-2); .ShortcutsDialog-island {
margin-bottom: 16px; border: 1px solid var(--button-gray-2);
} margin-bottom: 16px;
}
.ShortcutsDialog-island-title { .ShortcutsDialog-island-title {
margin: 0; margin: 0;
padding: 4px; padding: 4px;
background-color: var(--button-gray-1); background-color: var(--button-gray-1);
text-align: center; text-align: center;
} }
.ShorcutsDialog-shortcut { .ShorcutsDialog-shortcut {
border-top: 1px solid var(--button-gray-2); border-top: 1px solid var(--button-gray-2);
} }
.ShorcutsDialog-key { .ShorcutsDialog-key {
word-break: keep-all; word-break: keep-all;
border: 1px solid var(--button-gray-2); border: 1px solid var(--button-gray-2);
padding: 2px 8px; padding: 2px 8px;
margin: auto 4px; margin: auto 4px;
background-color: var(--button-gray-1); background-color: var(--button-gray-1);
border-radius: 2px; border-radius: 2px;
font-size: 0.8em; font-size: 0.8em;
min-height: 26px; min-height: 26px;
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ShortcutsDialog-footer { .ShortcutsDialog-footer {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-evenly; justify-content: space-evenly;
border-top: 1px solid var(--button-gray-2); border-top: 1px solid var(--button-gray-2);
margin-top: 8px; margin-top: 8px;
padding-top: 16px; padding-top: 16px;
}
} }

View File

@ -1,17 +0,0 @@
.Stack {
--gap: 0;
display: grid;
gap: calc(var(--space-factor) * var(--gap));
}
.Stack_vertical {
grid-template-columns: auto;
grid-auto-flow: row;
grid-auto-rows: min-content;
}
.Stack_horizontal {
grid-template-rows: auto;
grid-auto-flow: column;
grid-auto-columns: min-content;
}

19
src/components/Stack.scss Normal file
View File

@ -0,0 +1,19 @@
.excalidraw {
.Stack {
--gap: 0;
display: grid;
gap: calc(var(--space-factor) * var(--gap));
}
.Stack_vertical {
grid-template-columns: auto;
grid-auto-flow: row;
grid-auto-rows: min-content;
}
.Stack_horizontal {
grid-template-rows: auto;
grid-auto-flow: column;
grid-auto-columns: min-content;
}
}

View File

@ -1,4 +1,4 @@
import "./Stack.css"; import "./Stack.scss";
import React from "react"; import React from "react";

View File

@ -1,21 +1,25 @@
@import "../css/_variables.scss"; @import "../css/_variables.scss";
.TextInput { .excalidraw {
color: var(--text-color-primary); .TextInput {
display: inline-block; color: var(--text-color-primary);
border: 1.5px solid var(--button-gray-1); display: inline-block;
line-height: 1; border: 1.5px solid var(--button-gray-1);
padding: 0.75rem; line-height: 1;
white-space: nowrap; padding: 0.75rem;
border-radius: var(--space-factor); white-space: nowrap;
background-color: var(--input-background-color); border-radius: var(--space-factor);
&:not(:focus) { background-color: var(--input-background-color);
&:hover {
background-color: var(--input-hover-background-color); &:not(:focus) {
&:hover {
background-color: var(--input-hover-background-color);
}
}
&:focus {
outline: none;
box-shadow: 0 0 0 2px var(--focus-highlight-color);
} }
} }
&:focus {
outline: none;
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
} }

View File

@ -1,175 +1,193 @@
@import "open-color/open-color.scss"; @import "open-color/open-color.scss";
.excalidraw {
.ToolIcon { .ToolIcon {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
position: relative;
font-family: Cascadia;
cursor: pointer;
background-color: var(--button-gray-1);
-webkit-tap-highlight-color: transparent;
border-radius: var(--space-factor);
}
.ToolIcon__icon {
width: 2.5rem;
height: 2.5rem;
color: var(--icon-fill-color);
display: flex;
justify-content: center;
align-items: center;
border-radius: var(--space-factor);
svg {
position: relative; position: relative;
height: 1em; font-family: Cascadia;
fill: var(--icon-fill-color); cursor: pointer;
color: var(--icon-fill-color);
}
& + .ToolIcon__label {
margin-inline-start: 0;
}
}
.ToolIcon__label {
color: var(--icon-fill-color);
font-family: var(--ui-font);
margin: 0 0.8em;
text-overflow: ellipsis;
}
.ToolIcon_size_s .ToolIcon__icon {
width: 1.4rem;
height: 1.4rem;
font-size: 0.8em;
}
.ToolIcon_type_button {
padding: 0;
border: none;
margin: 0;
font-size: inherit;
&:hover {
background-color: var(--button-gray-1); background-color: var(--button-gray-1);
} -webkit-tap-highlight-color: transparent;
&:active { border-radius: var(--space-factor);
background-color: var(--button-gray-2);
}
&:focus {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
&.ToolIcon--selected {
background-color: var(--button-gray-2);
&:active {
background-color: var(--button-gray-3);
}
} }
&--show {
visibility: visible;
}
&--hide {
visibility: hidden;
}
}
.ToolIcon_type_radio,
.ToolIcon_type_checkbox {
position: absolute;
opacity: 0;
pointer-events: none;
&:not(.ToolIcon_toggle_opaque):checked + .ToolIcon__icon {
background-color: var(--button-gray-2);
}
&:focus + .ToolIcon__icon {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
&:active + .ToolIcon__icon {
background-color: var(--button-gray-3);
}
}
.ToolIcon_type_floating {
background-color: transparent;
&:hover {
background-color: transparent;
}
&:active {
background-color: transparent;
}
&:focus {
box-shadow: none;
}
.ToolIcon__icon { .ToolIcon__icon {
width: 2rem; width: 2.5rem;
height: 2em; height: 2.5rem;
} color: var(--icon-fill-color);
}
.ToolIcon.ToolIcon__lock { display: flex;
&.ToolIcon_type_floating { justify-content: center;
margin-left: 0.1rem; align-items: center;
}
}
.ToolIcon__keybinding { border-radius: var(--space-factor);
position: absolute;
bottom: 2px;
right: 3px;
font-size: 0.5em;
color: var(--keybinding-color);
font-family: var(--ui-font);
user-select: none;
}
@media (max-width: 425px) {
.Shape .ToolIcon__icon {
width: 2rem;
height: 2rem;
svg { svg {
height: 0.8em; position: relative;
height: 1em;
fill: var(--icon-fill-color);
color: var(--icon-fill-color);
}
& + .ToolIcon__label {
margin-inline-start: 0;
} }
} }
}
@media (max-width: 360px) { .ToolIcon__label {
.ToolIcon.ToolIcon__lock { color: var(--icon-fill-color);
display: inline-block; font-family: var(--ui-font);
position: absolute; margin: 0 0.8em;
top: 60px; text-overflow: ellipsis;
right: -8px; }
margin-left: 0; .ToolIcon_size_s .ToolIcon__icon {
border-radius: 20px 0 0 20px; width: 1.4rem;
height: 1.4rem;
font-size: 0.8em;
}
.excalidraw .ToolIcon_type_button,
.Modal .ToolIcon_type_button,
.ToolIcon_type_button {
padding: 0;
border: none;
margin: 0;
font-size: inherit;
background-color: var(--button-gray-1);
&:hover { &:hover {
background-color: var(--button-gray-1); background-color: var(--button-gray-1);
} }
&:active { &:active {
background-color: var(--button-gray-2); background-color: var(--button-gray-2);
} }
.ToolIcon__icon { &:focus {
border-radius: inherit; box-shadow: 0 0 0 2px var(--focus-highlight-color);
} }
svg {
position: static;
}
}
}
.unlocked-icon { &.ToolIcon--selected {
:root[dir="ltr"] & { background-color: var(--button-gray-2);
left: 2px;
&:active {
background-color: var(--button-gray-3);
}
}
&--show {
visibility: visible;
}
&--hide {
visibility: hidden;
}
} }
:root[dir="rtl"] & {
right: 2px; .ToolIcon_type_radio,
.ToolIcon_type_checkbox {
position: absolute;
opacity: 0;
pointer-events: none;
&:not(.ToolIcon_toggle_opaque):checked + .ToolIcon__icon {
background-color: var(--button-gray-2);
}
&:focus + .ToolIcon__icon {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
&:active + .ToolIcon__icon {
background-color: var(--button-gray-3);
}
}
.ToolIcon_type_floating {
background-color: transparent;
&:hover {
background-color: transparent;
}
&:active {
background-color: transparent;
}
&:focus {
box-shadow: none;
}
.ToolIcon__icon {
width: 2rem;
height: 2em;
}
}
.ToolIcon.ToolIcon__lock {
&.ToolIcon_type_floating {
margin-left: 0.1rem;
}
}
.ToolIcon__keybinding {
position: absolute;
bottom: 2px;
right: 3px;
font-size: 0.5em;
color: var(--keybinding-color);
font-family: var(--ui-font);
user-select: none;
}
@media (max-width: 425px) {
.Shape .ToolIcon__icon {
width: 2rem;
height: 2rem;
svg {
height: 0.8em;
}
}
}
@media (max-width: 360px) {
.ToolIcon.ToolIcon__lock {
display: inline-block;
position: absolute;
top: 60px;
right: -8px;
margin-left: 0;
border-radius: 20px 0 0 20px;
background-color: var(--button-gray-1);
&:hover {
background-color: var(--button-gray-1);
}
&:active {
background-color: var(--button-gray-2);
}
.ToolIcon__icon {
border-radius: inherit;
}
svg {
position: static;
}
}
}
.unlocked-icon {
:root[dir="ltr"] & {
left: 2px;
}
:root[dir="rtl"] & {
right: 2px;
}
} }
} }

View File

@ -1,48 +1,49 @@
@import "../css/_variables"; @import "../css/_variables";
.excalidraw {
.Tooltip {
position: relative;
}
.Tooltip { .Tooltip__label {
position: relative; --arrow-size: 4px;
} visibility: hidden;
width: 10ch;
.Tooltip__label { background: $oc-black;
--arrow-size: 4px; color: $oc-white;
visibility: hidden; text-align: center;
width: 10ch; border-radius: 4px;
background: $oc-black; padding: 4px;
color: $oc-white;
text-align: center;
border-radius: 4px;
padding: 4px;
position: absolute;
z-index: 10;
font-size: 0.7rem;
line-height: 1.5;
top: calc(100% + var(--arrow-size) + 3px);
// extra pixel offset for unknown reasons
left: calc(-50% + var(--arrow-size) / 2 - 1px);
word-wrap: break-word;
&::after {
content: "";
border: var(--arrow-size) solid transparent;
border-bottom-color: $oc-black;
position: absolute; position: absolute;
bottom: 100%; z-index: 10;
left: calc(50% - var(--arrow-size)); font-size: 0.7rem;
line-height: 1.5;
top: calc(100% + var(--arrow-size) + 3px);
// extra pixel offset for unknown reasons
left: calc(-50% + var(--arrow-size) / 2 - 1px);
word-wrap: break-word;
&::after {
content: "";
border: var(--arrow-size) solid transparent;
border-bottom-color: $oc-black;
position: absolute;
bottom: 100%;
left: calc(50% - var(--arrow-size));
}
}
// the following 3 rules ensure that the tooltip doesn't show (nor affect
// the cursor) when you drag over when you draw on canvas, but at the same
// time it still works when clicking on the link/shield
body:active .Tooltip:not(:hover) {
pointer-events: none;
}
body:not(:active) .Tooltip:hover .Tooltip__label {
visibility: visible;
}
.Tooltip__label:hover {
visibility: visible;
} }
} }
// the following 3 rules ensure that the tooltip doesn't show (nor affect
// the cursor) when you drag over when you draw on canvas, but at the same
// time it still works when clicking on the link/shield
body:active .Tooltip:not(:hover) {
pointer-events: none;
}
body:not(:active) .Tooltip:hover .Tooltip__label {
visibility: visible;
}
.Tooltip__label:hover {
visibility: visible;
}

View File

@ -1,22 +0,0 @@
.UserList {
pointer-events: none;
/*github corner*/
padding: var(--space-factor) 40px var(--space-factor) var(--space-factor);
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
}
.UserList > * {
pointer-events: all;
margin: 0 0 var(--space-factor) var(--space-factor);
}
.UserList_mobile {
padding: 0;
justify-content: normal;
}
.UserList_mobile > * {
margin: 0 var(--space-factor) var(--space-factor) 0;
}

View File

@ -0,0 +1,24 @@
.excalidraw {
.UserList {
pointer-events: none;
/*github corner*/
padding: var(--space-factor) 40px var(--space-factor) var(--space-factor);
display: flex;
flex-wrap: wrap;
justify-content: flex-end;
}
.UserList > * {
pointer-events: all;
margin: 0 0 var(--space-factor) var(--space-factor);
}
.UserList_mobile {
padding: 0;
justify-content: normal;
}
.UserList_mobile > * {
margin: 0 var(--space-factor) var(--space-factor) 0;
}
}

View File

@ -1,4 +1,4 @@
import "./UserList.css"; import "./UserList.scss";
import React from "react"; import React from "react";

View File

@ -1,501 +1,504 @@
@import "./_variables"; @import "./_variables";
@import "./theme"; @import "./theme";
body {
margin: 0;
--ui-font: system-ui, BlinkMacSystemFont, -apple-system, Segoe UI, Roboto,
Helvetica, Arial, sans-serif;
font-family: var(--ui-font);
color: var(--text-color-primary);
-webkit-text-size-adjust: 100%;
user-select: none;
width: 100vw;
height: 100vh;
}
[contenteditable] {
user-select: auto;
cursor: text;
}
a {
font-weight: 500;
text-decoration: none;
color: $oc-blue-7; /* OC Blue 7 */
&:hover {
text-decoration: underline;
}
}
canvas {
touch-action: none;
user-select: none;
// following props improve blurriness at certain devicePixelRatios.
// AFAIK it doesn't affect export (in fact, export seems sharp either way).
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 { .excalidraw {
color: var(--text-color-primary);
display: flex; display: flex;
position: fixed; position: fixed;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
}
.FixedSideContainer { a {
padding-top: var(--sat, 0px); font-weight: 500;
padding-right: var(--sar, 0px); text-decoration: none;
padding-bottom: var(--sab, 0px); color: $oc-blue-7; /* OC Blue 7 */
padding-left: var(--sal, 0px);
}
.panelRow { &:hover {
display: flex; text-decoration: underline;
justify-content: space-between; }
}
.panelColumn {
display: flex;
flex-direction: column;
h3,
legend,
.control-label {
margin-top: 0.333rem;
margin-bottom: 0.333rem;
font-size: 0.75rem;
color: var(--text-color-primary);
font-weight: bold;
display: block;
} }
.control-label input { canvas {
display: block; touch-action: none;
width: 100%; user-select: none;
// following props improve blurriness at certain devicePixelRatios.
// AFAIK it doesn't affect export (in fact, export seems sharp either way).
image-rendering: pixelated; // chromium
// NOTE: must be declared *after* the above
image-rendering: -moz-crisp-edges; // FF
} }
h3:first-child, &.Appearance_dark {
legend:first-child, // The percentage is inspired by
.control-label:first-child { // https://material.io/design/color/dark-theme.html#properties, which
margin-top: 0; // recommends surface color of #121212, 93% yields #111111 for #FFF
canvas {
filter: var(--appearance-filter);
}
} }
legend { .FixedSideContainer {
padding: 0; padding-top: var(--sat, 0px);
padding-right: var(--sar, 0px);
padding-bottom: var(--sab, 0px);
padding-left: var(--sal, 0px);
} }
.buttonList { .panelRow {
flex-wrap: wrap; display: flex;
justify-content: space-between;
}
label { .panelColumn {
margin-right: 0.25rem; display: flex;
flex-direction: column;
h3,
legend,
.control-label {
margin-top: 0.333rem;
margin-bottom: 0.333rem;
font-size: 0.75rem; font-size: 0.75rem;
display: inline-block; color: var(--text-color-primary);
font-weight: bold;
display: block;
} }
input[type="radio"] { .control-label input {
opacity: 0; display: block;
position: absolute; width: 100%;
pointer-events: none;
} }
.ToolIcon { h3:first-child,
margin: 0 5px; legend:first-child,
.control-label:first-child {
margin-top: 0;
} }
.ToolIcon__icon { legend {
width: 28px; padding: 0;
height: 28px; }
.buttonList {
flex-wrap: wrap;
label {
margin-right: 0.25rem;
font-size: 0.75rem;
display: inline-block;
}
input[type="radio"] {
opacity: 0;
position: absolute;
pointer-events: none;
}
.ToolIcon {
margin: 0 5px;
}
.ToolIcon__icon {
width: 28px;
height: 28px;
}
}
fieldset {
margin: 0;
margin-top: 0.333rem;
padding: 0;
border: none;
} }
} }
fieldset { .divider {
margin: 0; width: 1px;
margin-top: 0.333rem; background-color: $oc-gray-2;
padding: 0; margin: 1px;
border: none;
} }
}
.divider { .buttonList label:focus-within,
width: 1px; input:focus {
background-color: $oc-gray-2;
margin: 1px;
}
.buttonList label:focus-within,
input:focus {
outline: transparent;
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
button,
.buttonList label {
user-select: none;
background-color: var(--button-gray-1);
border: 0;
border-radius: 4px;
margin: 0.125rem 0;
padding: 0.25rem;
white-space: nowrap;
cursor: pointer;
&:focus {
outline: transparent; outline: transparent;
box-shadow: 0 0 0 2px var(--focus-highlight-color); box-shadow: 0 0 0 2px var(--focus-highlight-color);
} }
&:hover { button,
background-color: var(--button-gray-2); .buttonList label {
} user-select: none;
background-color: var(--button-gray-1);
border: 0;
border-radius: 4px;
margin: 0.125rem 0;
padding: 0.25rem;
white-space: nowrap;
&:active { cursor: pointer;
background-color: var(--button-gray-3);
}
&:disabled { &:focus {
cursor: not-allowed; outline: transparent;
} box-shadow: 0 0 0 2px var(--focus-highlight-color);
} }
.active, &:hover {
.buttonList label.active { background-color: var(--button-gray-2);
background-color: var(--button-gray-2); }
&:hover {
background-color: var(--button-gray-2);
}
&:active {
background-color: var(--button-gray-3);
}
}
.App-bottom-bar { &:active {
position: absolute; background-color: var(--button-gray-3);
top: 0; }
bottom: 0;
left: 0;
right: 0;
--bar-padding: calc(4 * var(--space-factor));
padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"};
padding-right: var(--sar, 0px);
padding-bottom: var(--sab, 0px);
padding-left: var(--sal, 0px);
z-index: 4;
display: flex;
align-items: flex-end;
pointer-events: none;
> .Island { &:disabled {
width: 100%; cursor: not-allowed;
max-width: 100%;
min-width: 100%;
box-sizing: border-box;
max-height: 100%;
display: flex;
flex-direction: column;
pointer-events: initial;
}
}
.App-toolbar {
width: 100%;
box-sizing: border-box;
}
.App-toolbar-content {
display: flex;
align-items: center;
justify-content: space-between;
}
.App-mobile-menu {
width: 100%;
overflow-x: visible;
overflow-y: auto;
box-sizing: border-box;
margin-bottom: var(--bar-padding);
}
.App-menu {
display: grid;
color: var(--icon-fill-color);
}
.App-menu_top {
grid-template-columns: 1fr auto 1fr;
grid-gap: 4px;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
}
.App-menu_top > * {
pointer-events: all;
}
.App-menu_top > *:first-child {
justify-self: flex-start;
}
.App-menu_top > *:last-child {
justify-self: flex-end;
}
.App-menu_bottom {
position: absolute;
bottom: 0;
grid-template-columns: 1fr auto 1fr;
grid-gap: 4px;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
z-index: 100;
:root[dir="ltr"] & {
left: 0.25rem;
}
:root[dir="rtl"] & {
right: 0.25rem;
}
&--transition-left {
section {
width: 185px;
} }
} }
section { .active,
display: flex; .buttonList label.active {
background-color: var(--button-gray-2);
&:hover {
background-color: var(--button-gray-2);
}
&:active {
background-color: var(--button-gray-3);
}
} }
}
.App-menu_bottom > * { .App-bottom-bar {
pointer-events: all; position: absolute;
} top: 0;
bottom: 0;
.App-menu_bottom > *:first-child { left: 0;
justify-self: flex-start; right: 0;
} --bar-padding: calc(4 * var(--space-factor));
padding-top: #{"max(var(--bar-padding), var(--sat, 0px))"};
.App-menu_bottom > *:last-child { padding-right: var(--sar, 0px);
justify-self: flex-end; padding-bottom: var(--sab, 0px);
} padding-left: var(--sal, 0px);
z-index: 4;
.App-menu_left {
grid-template-rows: 1fr auto 1fr;
height: 100%;
}
.App-menu_right {
grid-template-rows: 1fr;
height: 100%;
}
.App-menu__left {
overflow-y: auto;
max-height: calc(100vh - 236px);
}
.ErrorSplash {
min-height: 100vh;
padding: 20px 0;
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
user-select: text;
.ErrorSplash-messageContainer {
display: flex; display: flex;
flex-direction: column; align-items: flex-end;
pointer-events: none;
> .Island {
width: 100%;
max-width: 100%;
min-width: 100%;
box-sizing: border-box;
max-height: 100%;
display: flex;
flex-direction: column;
pointer-events: initial;
}
}
.App-toolbar {
width: 100%;
box-sizing: border-box;
}
.App-toolbar-content {
display: flex;
align-items: center;
justify-content: space-between;
}
.App-mobile-menu {
width: 100%;
overflow-x: visible;
overflow-y: auto;
box-sizing: border-box;
margin-bottom: var(--bar-padding);
}
.App-menu {
display: grid;
color: var(--icon-fill-color);
}
.App-menu_top {
grid-template-columns: 1fr auto 1fr;
grid-gap: 4px;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
}
.App-menu_top > * {
pointer-events: all;
}
.App-menu_top > *:first-child {
justify-self: flex-start;
}
.App-menu_top > *:last-child {
justify-self: flex-end;
}
.App-menu_bottom {
position: absolute;
bottom: 0;
grid-template-columns: 1fr auto 1fr;
grid-gap: 4px;
align-items: flex-start;
cursor: default;
pointer-events: none !important;
z-index: 100;
:root[dir="ltr"] & {
left: 0.25rem;
}
:root[dir="rtl"] & {
right: 0.25rem;
}
&--transition-left {
section {
width: 185px;
}
}
section {
display: flex;
}
}
.App-menu_bottom > * {
pointer-events: all;
}
.App-menu_bottom > *:first-child {
justify-self: flex-start;
}
.App-menu_bottom > *:last-child {
justify-self: flex-end;
}
.App-menu_left {
grid-template-rows: 1fr auto 1fr;
height: 100%;
}
.App-menu_right {
grid-template-rows: 1fr;
height: 100%;
}
.App-menu__left {
overflow-y: auto;
max-height: calc(100vh - 236px);
}
.ErrorSplash {
min-height: 100vh;
padding: 20px 0;
overflow: auto;
display: flex;
align-items: center;
justify-content: center;
user-select: text;
.ErrorSplash-messageContainer {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px;
background-color: $oc-red-1;
border: 3px solid $oc-red-9;
}
.ErrorSplash-paragraph {
margin: 15px 0;
max-width: 600px;
&.align-center {
text-align: center;
}
}
.bigger,
.bigger button {
font-size: 1.1em;
}
.smaller,
.smaller button {
font-size: 0.9em;
}
.ErrorSplash-details {
display: flex;
flex-direction: column;
align-items: flex-start;
textarea {
width: 100%;
margin: 10px 0;
font-family: "Cascadia";
font-size: 0.8em;
}
}
}
.dropdown-select {
height: 1.5rem;
padding: 0;
padding-inline-start: 0.5rem;
padding-inline-end: 1.5rem;
color: var(--icon-fill-color);
background-color: var(--button-gray-1);
border-radius: var(--space-factor);
border: 1px solid var(--button-gray-2);
font-size: 0.8rem;
outline: none;
appearance: none;
background-image: var(--dropdown-icon);
background-repeat: no-repeat;
background-position: right 0.7rem top 50%, 0 0;
:root[dir="rtl"] & {
background-position: left 0.7rem top 50%, 0 0;
}
background-size: 0.65em auto, 100%;
&:focus {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
&:hover {
background-color: var(--button-gray-2);
}
&:active {
background-color: var(--button-gray-2);
}
&.dropdown-select--floating {
position: absolute;
margin: 0.5em;
}
}
.dropdown-select__language.dropdown-select--floating {
position: absolute;
bottom: 10px;
:root[dir="ltr"] & {
right: 44px;
}
:root[dir="rtl"] & {
left: 44px;
}
}
.zIndexButton {
margin: 0 5px;
padding: 5px;
display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 40px; svg {
background-color: $oc-red-1; width: 18px;
border: 3px solid $oc-red-9; height: 18px;
}
.ErrorSplash-paragraph {
margin: 15px 0;
max-width: 600px;
&.align-center {
text-align: center;
} }
} }
.bigger,
.bigger button {
font-size: 1.1em;
}
.smaller,
.smaller button {
font-size: 0.9em;
}
.ErrorSplash-details {
display: flex;
flex-direction: column;
align-items: flex-start;
textarea {
width: 100%;
margin: 10px 0;
font-family: "Cascadia";
font-size: 0.8em;
}
}
}
.dropdown-select {
height: 1.5rem;
padding: 0;
padding-inline-start: 0.5rem;
padding-inline-end: 1.5rem;
color: var(--icon-fill-color);
background-color: var(--button-gray-1);
border-radius: var(--space-factor);
border: 1px solid var(--button-gray-2);
font-size: 0.8rem;
outline: none;
appearance: none;
background-image: var(--dropdown-icon);
background-repeat: no-repeat;
background-position: right 0.7rem top 50%, 0 0;
:root[dir="rtl"] & {
background-position: left 0.7rem top 50%, 0 0;
}
background-size: 0.65em auto, 100%;
&:focus {
box-shadow: 0 0 0 2px var(--focus-highlight-color);
}
&:hover {
background-color: var(--button-gray-2);
}
&:active {
background-color: var(--button-gray-2);
}
&.dropdown-select--floating {
position: absolute;
margin: 0.5em;
}
}
.dropdown-select__language.dropdown-select--floating {
position: absolute;
bottom: 10px;
:root[dir="ltr"] & {
right: 44px;
}
:root[dir="rtl"] & {
left: 44px;
}
}
.zIndexButton {
margin: 0 5px;
padding: 5px;
display: inline-flex;
align-items: center;
justify-content: center;
svg {
width: 18px;
height: 18px;
}
}
.scroll-back-to-content {
color: var(--popup-text-color);
position: fixed;
left: 50%;
bottom: 30px;
transform: translateX(-50%);
padding: 10px 20px;
}
.help-icon {
position: absolute;
cursor: pointer;
fill: $oc-gray-6;
bottom: 14px;
:root[dir="ltr"] & {
right: 14px;
}
:root[dir="rtl"] & {
left: 14px;
}
}
@media #{$media-query} {
aside {
display: none;
}
.scroll-back-to-content { .scroll-back-to-content {
bottom: calc(80px + var(--sab, 0px)); color: var(--popup-text-color);
z-index: -1; position: fixed;
left: 50%;
bottom: 30px;
transform: translateX(-50%);
padding: 10px 20px;
} }
}
.rtl-mirror { .help-icon {
:root[dir="rtl"] & { position: absolute;
transform: scaleX(-1); cursor: pointer;
fill: $oc-gray-6;
bottom: 14px;
:root[dir="ltr"] & {
right: 14px;
}
:root[dir="rtl"] & {
left: 14px;
}
} }
}
.github-corner { @media #{$media-query} {
position: absolute; aside {
top: 0; display: none;
z-index: 2; }
:root[dir="ltr"] & { .scroll-back-to-content {
right: 0; bottom: calc(80px + var(--sab, 0px));
z-index: -1;
}
} }
:root[dir="rtl"] & {
left: 0; .rtl-mirror {
:root[dir="rtl"] & {
transform: scaleX(-1);
}
} }
}
.zen-mode-visibility { .github-corner {
visibility: visible; position: absolute;
opacity: 1; top: 0;
height: auto; z-index: 2;
width: auto;
transition: opacity 0.5s;
&.zen-mode-visibility--hidden { :root[dir="ltr"] & {
visibility: hidden; right: 0;
opacity: 0; }
height: 0;
width: 0; :root[dir="rtl"] & {
left: 0;
}
}
.zen-mode-visibility {
visibility: visible;
opacity: 1;
height: auto;
width: auto;
transition: opacity 0.5s; transition: opacity 0.5s;
}
} &.zen-mode-visibility--hidden {
visibility: hidden;
.disable-pointerEvents { opacity: 0;
pointer-events: none !important; height: 0;
} width: 0;
transition: opacity 0.5s;
@media print { }
.App-bottom-bar, }
.FixedSideContainer,
.layer-ui__wrapper { .disable-pointerEvents {
display: none; pointer-events: none !important;
}
@media print {
.App-bottom-bar,
.FixedSideContainer,
.layer-ui__wrapper {
display: none;
}
} }
} }

View File

@ -37,36 +37,42 @@
--popup-text-inverted-color: #{$oc-white}; --popup-text-inverted-color: #{$oc-white};
} }
:root.Appearance_dark { .excalidraw {
background-color: #000; &.Appearance_dark {
} background: #000;
.Appearance_dark { &.Appearance_dark-background-none {
--text-color-primary: #{$oc-gray-4}; background: none;
--bg-color-island: #1e1e1e; }
--popup-background-color: #2c2c2c; }
--button-gray-1: #363636;
--button-gray-2: #272727; &.Appearance_dark {
--button-gray-3: #222; --text-color-primary: #{$oc-gray-4};
--input-border-color: #2e2e2e; --bg-color-island: #1e1e1e;
--input-background-color: #121212; --popup-background-color: #2c2c2c;
--input-hover-background-color: #181818; --button-gray-1: #363636;
--input-label-color: #{$oc-gray-2}; --button-gray-2: #272727;
--icon-fill-color: #{$oc-gray-4}; --button-gray-3: #222;
--icon-green-fill-color: #{$oc-green-4}; --input-border-color: #2e2e2e;
--keybinding-color: #{$oc-gray-6}; --input-background-color: #121212;
--color-overlay-text-color: #bbb; --input-hover-background-color: #181818;
--shadow-island: 0 1px 5px #{transparentize($oc-black, 0.7)}; --input-label-color: #{$oc-gray-2};
--overlay-background-color: rgba(30, 30, 30, 0.88); --icon-fill-color: #{$oc-gray-4};
// #{$oc-gray-4}; inlined --icon-green-fill-color: #{$oc-green-4};
--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>'); --keybinding-color: #{$oc-gray-6};
--focus-highlight-color: #{$oc-blue-6}; --color-overlay-text-color: #bbb;
--select-highlight-color: #{$oc-blue-4}; --shadow-island: 0 1px 5px #{transparentize($oc-black, 0.7)};
--appearance-filter: invert(93%) hue-rotate(180deg); --overlay-background-color: rgba(30, 30, 30, 0.88);
--button-special-active-background-color: #204624; // #{$oc-gray-4}; inlined
--button-destructive-color: #{$oc-red-3}; --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>');
--button-destructive-background-color: #5a0000; --focus-highlight-color: #{$oc-blue-6};
--popup-secondary-background-color: #222; --select-highlight-color: #{$oc-blue-4};
--popup-text-color: #{$oc-gray-4}; --appearance-filter: invert(93%) hue-rotate(180deg);
--popup-text-inverted-color: #2c2c2c; --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;
}
} }