excalidraw/src/components/ContextMenu.scss

98 lines
1.9 KiB
SCSS
Raw Normal View History

@import "../css/_variables";
2020-04-10 18:09:29 -04:00
.excalidraw {
.context-menu {
position: relative;
border-radius: 4px;
box-shadow: 0px 3px 10px transparentize($oc-black, 0.8);
padding: 0;
list-style: none;
user-select: none;
margin: -0.25rem 0 0 0.125rem;
padding: 0.5rem 0;
background-color: var(--popup-secondary-background-color);
border: 1px solid var(--button-gray-3);
cursor: default;
}
.context-menu button {
color: var(--popup-text-color);
}
2020-01-07 07:50:59 +05:00
.context-menu-option {
position: relative;
width: 100%;
min-width: 9.5rem;
margin: 0;
padding: 0.25rem 1rem 0.25rem 1.25rem;
text-align: start;
border-radius: 0;
background-color: transparent;
border: none;
white-space: nowrap;
display: grid;
grid-template-columns: 1fr 0.2fr;
2020-12-20 21:15:40 +01:00
align-items: center;
&.checkmark::before {
position: absolute;
left: 6px;
margin-bottom: 1px;
content: "\2713";
}
&.dangerous {
.context-menu-option__label {
color: $oc-red-7;
}
}
.context-menu-option__label {
justify-self: start;
margin-inline-end: 20px;
}
.context-menu-option__shortcut {
justify-self: end;
opacity: 0.6;
font-family: inherit;
font-size: 0.7rem;
}
}
2020-01-07 07:50:59 +05:00
.context-menu-option:hover {
color: var(--popup-background-color);
background-color: var(--select-highlight-color);
&.dangerous {
.context-menu-option__label {
color: var(--popup-background-color);
}
background-color: $oc-red-6;
}
}
2020-01-07 07:50:59 +05:00
.context-menu-option:focus {
z-index: 1;
}
2020-12-27 16:27:25 -05:00
@media #{$is-mobile-query} {
.context-menu-option {
display: block;
.context-menu-option__label {
margin-inline-end: 0;
}
.context-menu-option__shortcut {
display: none;
}
}
}
.context-menu-option-separator {
border: none;
border-top: 1px solid $oc-gray-5;
}
2020-01-07 07:50:59 +05:00
}