123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- :root {
- --button-gray-1: #e9ecef;
- --button-gray-2: #ced4da;
- --button-gray-3: #adb5bd;
- --button-blue: #a5d8ff;
- }
- .ToolIcon {
- display: inline-flex;
- align-items: center;
- position: relative;
- font-family: Cascadia;
- cursor: pointer;
- background-color: var(--button-gray-1);
- -webkit-tap-highlight-color: transparent;
- border-radius: var(--space-factor);
- }
- .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 {
- margin-left: 0;
- }
- }
- .ToolIcon__label {
- font-family: var(--ui-font);
- margin: 0 0.8em;
- }
- .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: var(--button-gray-1);
- }
- &:active {
- background-color: var(--button-gray-2);
- }
- &:focus {
- box-shadow: 0 0 0 2px var(--button-blue);
- }
- &.ToolIcon--selected {
- background-color: var(--button-gray-2);
- &:active {
- background-color: var(--button-gray-3);
- }
- }
- }
- .ToolIcon_type_radio,
- .ToolIcon_type_checkbox {
- position: absolute;
- opacity: 0;
- pointer-events: none;
- &:checked + .ToolIcon__icon {
- background-color: var(--button-gray-2);
- }
- &:focus + .ToolIcon__icon {
- box-shadow: 0 0 0 2px var(--button-blue);
- }
- &:active + .ToolIcon__icon {
- background-color: var(--button-gray-3);
- }
- }
- .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: var(--button-gray-3); // OC GRAY 5
- font-family: var(--ui-font);
- user-select: none;
- }
|