excalidraw/src/components/ToolIcon.scss
Christopher Chedeau 94e18bd8e4 Untranslated lock icon (#568)
Sorry my OCD is kicking in... It's super weird that the base of the lock moves when we check / unckeck it. Instead, just the semi-circle shape should move (what this PR implements).
2020-01-26 11:34:15 +01:00

63 lines
996 B
SCSS

.ToolIcon {
display: inline-block;
position: relative;
cursor: pointer;
}
.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 {
position: relative;
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;
}
}