mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-08-31 22:27:34 +02:00

* Disable text selection * Set content-editable=plaintext-only to disable Touch Bar formatting buttons * Enlarge resize handle tap targets for pen/touch * Make the lock button a button in mobile mode * Use icons instead of Unicode characters; add an alternate toolbar for creating multipoint lines * Allow buttons to hide themselves * Fix heuristic for showing shape actions * Refactor icons * Fix label for edit button * Switch edit button icon * Remove lock button on mobile * Add language selector on mobile * Fix showing edit button on mobile * Fix showing edit button on mobile, part 2 * Fix handle touch regions * Fix scroll-back button position * Allow using the text tool on a text object to start editing it * Fix deletion of last point in line
111 lines
1.7 KiB
SCSS
111 lines
1.7 KiB
SCSS
.ToolIcon {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
position: relative;
|
|
font-family: Cascadia;
|
|
cursor: pointer;
|
|
background-color: #e9ecef;
|
|
-webkit-tap-highlight-color: transparent;
|
|
}
|
|
|
|
.ToolIcon__icon {
|
|
width: 2.5rem;
|
|
height: 2.5rem;
|
|
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
border-radius: var(--space-factor);
|
|
|
|
svg {
|
|
position: relative;
|
|
height: 1em;
|
|
}
|
|
}
|
|
|
|
.ToolIcon__label {
|
|
font-family: var(--ui-font);
|
|
}
|
|
|
|
.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: #e9ecef;
|
|
}
|
|
&:active {
|
|
background-color: #ced4da;
|
|
}
|
|
&:focus {
|
|
box-shadow: 0 0 0 2px #a5d8ff;
|
|
}
|
|
}
|
|
|
|
.ToolIcon_type_radio,
|
|
.ToolIcon_type_checkbox {
|
|
position: absolute;
|
|
opacity: 0;
|
|
|
|
&:hover + .ToolIcon__icon {
|
|
background-color: #e9ecef;
|
|
}
|
|
&:checked + .ToolIcon__icon {
|
|
background-color: #ced4da;
|
|
}
|
|
&:focus + .ToolIcon__icon {
|
|
box-shadow: 0 0 0 2px #a5d8ff;
|
|
}
|
|
&:active + .ToolIcon__icon {
|
|
background-color: #adb5bd;
|
|
}
|
|
}
|
|
|
|
.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_button {
|
|
border-radius: 4px;
|
|
svg {
|
|
position: static;
|
|
}
|
|
}
|
|
&.ToolIcon_type_floating {
|
|
margin-left: 0.1rem;
|
|
}
|
|
}
|
|
|
|
.ToolIcon__keybinding {
|
|
position: absolute;
|
|
bottom: 2px;
|
|
right: 3px;
|
|
font-size: 0.5em;
|
|
color: #adb5bd; // OC GRAY 5
|
|
font-family: var(--ui-font);
|
|
user-select: none;
|
|
}
|