excalidraw/src/components/ToolIcon.scss

63 lines
996 B
SCSS
Raw Normal View History

.ToolIcon {
display: inline-block;
position: relative;
2020-01-21 23:07:09 +02:00
cursor: pointer;
}
.ToolIcon__icon {
background-color: #e9ecef;
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_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 .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;
}
}