2020-04-10 18:09:29 -04:00
|
|
|
@import "open-color/open-color.scss";
|
2021-01-28 12:58:35 +01:00
|
|
|
@import "../css/variables.module";
|
2020-12-14 18:54:54 +05:30
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.excalidraw {
|
|
|
|
.ToolIcon {
|
|
|
|
display: inline-flex;
|
|
|
|
align-items: center;
|
|
|
|
position: relative;
|
|
|
|
font-family: Cascadia;
|
|
|
|
cursor: pointer;
|
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
|
border-radius: var(--space-factor);
|
2021-05-25 21:37:14 +02:00
|
|
|
user-select: none;
|
2021-06-11 23:13:05 +02:00
|
|
|
|
|
|
|
background-color: var(--button-gray-1);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--button-gray-2);
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background-color: var(--button-gray-3);
|
|
|
|
}
|
2021-05-25 21:37:14 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.ToolIcon--plain {
|
|
|
|
background-color: transparent;
|
|
|
|
.ToolIcon__icon {
|
|
|
|
width: 2rem;
|
|
|
|
height: 2rem;
|
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
2020-04-10 18:09:29 -04:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.ToolIcon__icon {
|
|
|
|
width: 2.5rem;
|
|
|
|
height: 2.5rem;
|
|
|
|
color: var(--icon-fill-color);
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
border-radius: var(--space-factor);
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
svg {
|
|
|
|
position: relative;
|
|
|
|
height: 1em;
|
|
|
|
fill: var(--icon-fill-color);
|
|
|
|
color: var(--icon-fill-color);
|
|
|
|
}
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
& + .ToolIcon__label {
|
|
|
|
margin-inline-start: 0;
|
|
|
|
}
|
2020-01-15 20:42:02 +05:00
|
|
|
}
|
2020-03-11 19:42:18 +01:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.ToolIcon__label {
|
|
|
|
color: var(--icon-fill-color);
|
|
|
|
font-family: var(--ui-font);
|
|
|
|
margin: 0 0.8em;
|
|
|
|
text-overflow: ellipsis;
|
2020-03-11 19:42:18 +01:00
|
|
|
}
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.ToolIcon_size_s .ToolIcon__icon {
|
|
|
|
width: 1.4rem;
|
|
|
|
height: 1.4rem;
|
|
|
|
font-size: 0.8em;
|
|
|
|
}
|
2020-02-20 18:44:38 -05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.excalidraw .ToolIcon_type_button,
|
|
|
|
.Modal .ToolIcon_type_button,
|
|
|
|
.ToolIcon_type_button {
|
|
|
|
padding: 0;
|
|
|
|
border: none;
|
|
|
|
margin: 0;
|
|
|
|
font-size: inherit;
|
2020-01-17 15:43:24 +01:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&:focus {
|
|
|
|
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
|
|
|
}
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&.ToolIcon--selected {
|
|
|
|
background-color: var(--button-gray-2);
|
2020-01-15 20:42:02 +05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&:active {
|
|
|
|
background-color: var(--button-gray-3);
|
|
|
|
}
|
|
|
|
}
|
2020-01-26 19:01:56 +00:00
|
|
|
|
2021-06-11 23:13:05 +02:00
|
|
|
&:hover {
|
|
|
|
background-color: var(--button-gray-2);
|
|
|
|
}
|
|
|
|
|
|
|
|
&:active {
|
|
|
|
background-color: var(--button-gray-3);
|
|
|
|
}
|
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&--show {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
2020-02-21 14:34:18 -05:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&--hide {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2020-02-21 14:34:18 -05:00
|
|
|
}
|
2020-02-01 17:31:28 +00:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.ToolIcon_type_radio,
|
|
|
|
.ToolIcon_type_checkbox {
|
|
|
|
position: absolute;
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
2020-03-24 19:51:49 +09:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&:not(.ToolIcon_toggle_opaque):checked + .ToolIcon__icon {
|
|
|
|
background-color: var(--button-gray-2);
|
2021-06-11 23:13:05 +02:00
|
|
|
&:active {
|
|
|
|
background-color: var(--button-gray-3);
|
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
2020-07-20 00:12:56 +03:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&:focus + .ToolIcon__icon {
|
|
|
|
box-shadow: 0 0 0 2px var(--focus-highlight-color);
|
2020-07-20 00:12:56 +03:00
|
|
|
}
|
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
&:active + .ToolIcon__icon {
|
|
|
|
background-color: var(--button-gray-3);
|
|
|
|
}
|
|
|
|
}
|
2020-03-24 19:51:49 +09:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.ToolIcon_type_floating {
|
|
|
|
background-color: transparent;
|
2020-03-24 19:51:49 +09:00
|
|
|
|
|
|
|
&:hover {
|
2020-09-26 02:48:45 +05:30
|
|
|
background-color: transparent;
|
2020-03-24 19:51:49 +09:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
2020-03-24 19:51:49 +09:00
|
|
|
&:active {
|
2020-09-26 02:48:45 +05:30
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:focus {
|
|
|
|
box-shadow: none;
|
2020-03-24 19:51:49 +09:00
|
|
|
}
|
|
|
|
|
|
|
|
.ToolIcon__icon {
|
2021-06-11 23:13:05 +02:00
|
|
|
background-color: var(--button-gray-1);
|
|
|
|
&:hover {
|
|
|
|
background-color: var(--button-gray-2);
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background-color: var(--button-gray-3);
|
|
|
|
}
|
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
width: 2rem;
|
|
|
|
height: 2em;
|
2020-03-24 19:51:49 +09:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.ToolIcon.ToolIcon__lock {
|
2021-06-11 23:13:05 +02:00
|
|
|
margin-inline-end: var(--space-factor);
|
2020-09-26 02:48:45 +05:30
|
|
|
&.ToolIcon_type_floating {
|
|
|
|
margin-left: 0.1rem;
|
2020-03-24 19:51:49 +09:00
|
|
|
}
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
|
2020-09-26 02:48:45 +05:30
|
|
|
.ToolIcon__keybinding {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 2px;
|
|
|
|
right: 3px;
|
|
|
|
font-size: 0.5em;
|
|
|
|
color: var(--keybinding-color);
|
|
|
|
font-family: var(--ui-font);
|
|
|
|
user-select: none;
|
|
|
|
}
|
|
|
|
|
2020-12-27 16:27:25 -05:00
|
|
|
// shrink shape icons on small viewports to make them fit
|
2020-09-26 02:48:45 +05:30
|
|
|
@media (max-width: 425px) {
|
|
|
|
.Shape .ToolIcon__icon {
|
|
|
|
width: 2rem;
|
|
|
|
height: 2rem;
|
|
|
|
|
|
|
|
svg {
|
|
|
|
height: 0.8em;
|
|
|
|
}
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
|
2020-12-27 16:27:25 -05:00
|
|
|
// move the lock button out of the way on small viewports
|
|
|
|
// it begins to collide with the GitHub icon before we switch to mobile mode
|
2020-12-06 12:40:11 +01:00
|
|
|
@media (max-width: 760px) {
|
2021-06-11 23:13:05 +02:00
|
|
|
.ToolIcon.ToolIcon_type_floating {
|
2020-09-26 02:48:45 +05:30
|
|
|
display: inline-block;
|
|
|
|
position: absolute;
|
|
|
|
right: -8px;
|
|
|
|
|
|
|
|
margin-left: 0;
|
|
|
|
border-radius: 20px 0 0 20px;
|
2020-12-27 16:27:25 -05:00
|
|
|
z-index: 1;
|
2020-09-26 02:48:45 +05:30
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
2021-06-11 23:13:05 +02:00
|
|
|
.ToolIcon.ToolIcon__library {
|
|
|
|
top: 100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.ToolIcon.ToolIcon__lock {
|
|
|
|
margin-inline-end: 0;
|
|
|
|
top: 60px;
|
|
|
|
}
|
2020-09-26 02:48:45 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
.unlocked-icon {
|
|
|
|
:root[dir="ltr"] & {
|
|
|
|
left: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:root[dir="rtl"] & {
|
|
|
|
right: 2px;
|
|
|
|
}
|
2020-04-02 12:21:19 -04:00
|
|
|
}
|
|
|
|
}
|