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;
|
2022-11-01 17:29:58 +01:00
|
|
|
column-gap: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
.color-picker-control-container + .popover {
|
|
|
|
position: static;
|
|
|
|
}
|
|
|
|
|
|
|
|
.color-picker-popover-container {
|
|
|
|
margin-top: -0.25rem;
|
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
margin-left: 0.5rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
margin-left: -3rem;
|
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
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;
|
2022-11-01 17:29:58 +01:00
|
|
|
top: 10px;
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
2022-11-01 17:29:58 +01:00
|
|
|
transform: rotate(270deg);
|
|
|
|
left: -14px;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
2022-11-01 17:29:58 +01:00
|
|
|
transform: rotate(90deg);
|
|
|
|
right: -14px;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
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);
|
2022-11-01 17:29:58 +01:00
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
left: -14px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
right: -16px;
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-01-11 19:10:41 -08:00
|
|
|
|
2022-02-28 19:04:26 +05:30
|
|
|
.color-picker-content--default {
|
2020-09-26 02:48:45 +05:30
|
|
|
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
|
|
|
|
2022-02-28 19:04:26 +05:30
|
|
|
.color-picker-content--canvas {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
padding: 0.25rem;
|
|
|
|
|
|
|
|
&-title {
|
|
|
|
color: $oc-gray-6;
|
|
|
|
font-size: 12px;
|
|
|
|
padding: 0 0.25rem;
|
|
|
|
}
|
|
|
|
|
|
|
|
&-colors {
|
|
|
|
padding: 0.5rem 0;
|
|
|
|
|
|
|
|
.color-picker-swatch {
|
|
|
|
margin: 0 0.25rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
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 {
|
2022-11-01 17:29:58 +01:00
|
|
|
height: var(--default-button-size);
|
|
|
|
flex-shrink: 0;
|
|
|
|
padding: 0.5rem 0.5rem 0.5rem 0.75rem;
|
|
|
|
border: 1px solid var(--default-border-color);
|
|
|
|
border-right: 0;
|
|
|
|
box-sizing: border-box;
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
2022-11-01 17:29:58 +01:00
|
|
|
border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
2022-11-01 17:29:58 +01:00
|
|
|
border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
|
|
|
|
border-right: 1px solid var(--default-border-color);
|
|
|
|
border-left: 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 {
|
|
|
|
display: flex;
|
2022-11-01 17:29:58 +01:00
|
|
|
|
|
|
|
&:focus-within {
|
|
|
|
box-shadow: 0 0 0 1px var(--color-primary-darkest);
|
|
|
|
border-radius: var(--border-radius-lg);
|
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.color-picker-input {
|
2022-11-01 17:29:58 +01:00
|
|
|
box-sizing: border-box;
|
|
|
|
width: 100%;
|
2020-09-26 02:48:45 +05:30
|
|
|
margin: 0;
|
2022-11-01 17:29:58 +01:00
|
|
|
font-size: 0.875rem;
|
2023-04-25 17:35:19 +05:45
|
|
|
font-family: inherit;
|
2022-11-01 17:29:58 +01:00
|
|
|
background-color: transparent;
|
2021-02-16 20:22:18 +02:00
|
|
|
color: var(--text-primary-color);
|
|
|
|
border: 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
outline: none;
|
2022-11-01 17:29:58 +01:00
|
|
|
height: var(--default-button-size);
|
|
|
|
border: 1px solid var(--default-border-color);
|
|
|
|
border-left: 0;
|
|
|
|
letter-spacing: 0.4px;
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
:root[dir="ltr"] & {
|
2022-11-01 17:29:58 +01:00
|
|
|
border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
2022-11-01 17:29:58 +01:00
|
|
|
border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
|
|
|
|
border-left: 1px solid var(--default-border-color);
|
|
|
|
border-right: 0;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
2022-11-01 17:29:58 +01:00
|
|
|
padding: 0.5rem;
|
|
|
|
padding-left: 0.25rem;
|
2020-09-26 02:48:45 +05:30
|
|
|
appearance: none;
|
2022-11-01 17:29:58 +01:00
|
|
|
|
|
|
|
&:focus-visible {
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.color-picker-label-swatch-container {
|
|
|
|
border: 1px solid var(--default-border-color);
|
|
|
|
border-radius: var(--border-radius-lg);
|
|
|
|
width: var(--default-button-size);
|
|
|
|
height: var(--default-button-size);
|
|
|
|
box-sizing: border-box;
|
|
|
|
overflow: hidden;
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
2020-02-01 12:56:15 +00:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.color-picker-label-swatch {
|
2022-11-01 17:29:58 +01:00
|
|
|
@include outlineButtonStyles;
|
|
|
|
background-color: var(--swatch-color) !important;
|
2020-09-26 02:48:45 +05:30
|
|
|
overflow: hidden;
|
2022-11-01 17:29:58 +01:00
|
|
|
position: relative;
|
2021-03-13 18:58:06 +05:30
|
|
|
filter: var(--theme-filter);
|
2022-11-01 17:29:58 +01:00
|
|
|
border: 0 !important;
|
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
|
|
|
}
|