excalidraw/src/components/ToolIcon.scss
Jilles Soeters a72a143c84 Introduce Shapelock (#480)
* Introduce shape lock

* Format code with prettier

* Do not reset elementLocked on selection change

* Don't set isSelected to true if element is locked

* Don't reset the cursor

* Move reset cursor call to better spot

* Run prettier + lint
2020-01-20 15:52:19 -08:00

61 lines
953 B
SCSS

.ToolIcon {
display: inline-block;
position: relative;
}
.ToolIcon__icon {
background-color: #e9ecef;
width: 2.5rem;
height: 2.5rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: var(--space-factor);
svg {
height: 1em;
}
}
.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 .ToolIcon__icon {
background-color: #e9ecef;
}
&:active .ToolIcon__icon {
background-color: #ced4da;
}
&:focus .ToolIcon__icon {
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;
}
}