2021-01-28 12:58:35 +01:00
|
|
|
@import "../css/variables.module";
|
2020-04-10 18:09:29 -04:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.excalidraw {
|
|
|
|
.color-picker {
|
2021-02-16 20:22:18 +02:00
|
|
|
background: var(--popup-bg-color);
|
|
|
|
border: 0 solid transparentize($oc-white, 0.75);
|
|
|
|
box-shadow: transparentize($oc-black, 0.75) 0 1px 4px;
|
2020-09-26 02:48:45 +05:30
|
|
|
border-radius: 4px;
|
|
|
|
position: absolute;
|
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
left: -5.5px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
right: -5.5px;
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-control-container {
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2020-01-19 18:27:36 -03:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-triangle {
|
2021-02-16 20:22:18 +02:00
|
|
|
width: 0;
|
|
|
|
height: 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
border-style: solid;
|
2021-02-16 20:22:18 +02:00
|
|
|
border-width: 0 9px 10px;
|
|
|
|
border-color: transparent transparent var(--popup-bg-color);
|
2020-09-26 02:48:45 +05:30
|
|
|
position: absolute;
|
|
|
|
top: -10px;
|
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
left: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
right: 12px;
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
.color-picker-triangle-shadow {
|
|
|
|
border-color: transparent transparent transparentize($oc-black, 0.9);
|
|
|
|
top: -11px;
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-content {
|
|
|
|
padding: 0.5rem;
|
|
|
|
display: grid;
|
|
|
|
grid-template-columns: repeat(5, auto);
|
|
|
|
grid-gap: 0.5rem;
|
2020-10-27 03:01:57 -07:00
|
|
|
border-radius: 4px;
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
outline: none;
|
|
|
|
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
2020-03-15 13:26:52 -04:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-content .color-input-container {
|
|
|
|
grid-column: 1 / span 5;
|
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.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;
|
2021-03-13 18:58:06 +05:30
|
|
|
filter: var(--theme-filter);
|
2020-01-19 18:27:36 -03:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&: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);
|
|
|
|
}
|
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-transparent {
|
|
|
|
border-radius: 4px;
|
2021-02-16 20:22:18 +02:00
|
|
|
box-shadow: transparentize($oc-black, 0.9) 0 0 0 1px inset;
|
2020-09-26 02:48:45 +05:30
|
|
|
position: absolute;
|
2021-02-16 20:22:18 +02:00
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-transparent,
|
|
|
|
.color-picker-label-swatch {
|
|
|
|
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
|
|
|
|
left center;
|
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-hash {
|
|
|
|
background: var(--input-border-color);
|
|
|
|
height: 1.875rem;
|
|
|
|
width: 1.875rem;
|
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
2021-02-16 20:22:18 +02:00
|
|
|
border-radius: 4px 0 0 4px;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
2021-02-16 20:22:18 +02:00
|
|
|
border-radius: 0 4px 4px 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
color: var(--input-label-color);
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
position: relative;
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
.color-input-container:focus-within .color-picker-hash {
|
|
|
|
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
.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;
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
.color-input-container:focus-within .color-picker-hash::before {
|
|
|
|
background: var(--input-border-color);
|
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
right: -1px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
left: -1px;
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-input-container:focus-within .color-picker-hash::after {
|
2021-02-16 20:22:18 +02:00
|
|
|
background: var(--input-bg-color);
|
2020-01-19 18:27:36 -03:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
:root[dir="ltr"] & {
|
|
|
|
right: -2px;
|
|
|
|
}
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
:root[dir="rtl"] & {
|
|
|
|
left: -2px;
|
|
|
|
}
|
|
|
|
}
|
2020-03-15 13:26:52 -04:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-input-container {
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
|
|
|
|
.color-picker-input {
|
|
|
|
width: 12ch; /* length of `transparent` + 1 */
|
|
|
|
margin: 0;
|
|
|
|
font-size: 1rem;
|
2021-02-16 20:22:18 +02:00
|
|
|
background-color: var(--input-bg-color);
|
|
|
|
color: var(--text-primary-color);
|
|
|
|
border: 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
outline: none;
|
|
|
|
height: 1.75em;
|
2021-02-16 20:22:18 +02:00
|
|
|
box-shadow: var(--input-border-color) 0 0 0 1px inset;
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
2021-02-16 20:22:18 +02:00
|
|
|
border-radius: 0 4px 4px 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
2021-02-16 20:22:18 +02:00
|
|
|
border-radius: 4px 0 0 4px;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
float: left;
|
|
|
|
padding: 1px;
|
|
|
|
padding-inline-start: 0.5em;
|
|
|
|
appearance: none;
|
|
|
|
}
|
2020-02-01 12:56:15 +00:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.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;
|
2021-03-13 18:58:06 +05:30
|
|
|
filter: var(--theme-filter);
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
background: var(--swatch-color);
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
.color-picker-keybinding {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 2px;
|
2020-12-11 21:41:54 +02:00
|
|
|
font-size: 0.7em;
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
right: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
left: 2px;
|
|
|
|
}
|
|
|
|
|
2021-04-08 19:54:50 +02:00
|
|
|
@include isMobile {
|
2020-12-11 21:41:54 +02:00
|
|
|
display: none;
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-08-13 04:35:31 -07:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-type-canvasBackground .color-picker-keybinding {
|
|
|
|
color: #aaa;
|
|
|
|
}
|
2020-08-13 04:35:31 -07:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-type-elementBackground .color-picker-keybinding {
|
2021-02-16 20:22:18 +02:00
|
|
|
color: $oc-white;
|
2020-08-13 04:35:31 -07:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
|
|
|
|
color: #aaa;
|
2020-08-13 04:35:31 -07:00
|
|
|
}
|
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-type-elementStroke .color-picker-keybinding {
|
|
|
|
color: #d4d4d4;
|
|
|
|
}
|
|
|
|
|
2021-03-13 18:58:06 +05:30
|
|
|
&.theme--dark {
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-type-elementBackground .color-picker-keybinding {
|
2021-02-16 20:22:18 +02:00
|
|
|
color: $oc-black;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
.color-picker-swatch[aria-label="transparent"] .color-picker-keybinding {
|
2021-02-16 20:22:18 +02:00
|
|
|
color: $oc-black;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
}
|
2020-02-01 12:56:15 +00:00
|
|
|
}
|