excalidraw/src/components/ToolIcon.scss

112 lines
1.8 KiB
SCSS
Raw Normal View History

.ToolIcon {
display: inline-flex;
align-items: center;
position: relative;
font-family: Cascadia;
2020-01-21 23:07:09 +02:00
cursor: pointer;
background-color: #e9ecef;
-webkit-tap-highlight-color: transparent;
}
.ToolIcon__icon {
2020-01-20 19:59:00 -03:00
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 {
2020-01-20 19:59:00 -03:00
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;
pointer-events: none;
&: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;
}