signal-desktop/stylesheets/components/ContextMenu.scss

138 lines
2.7 KiB
SCSS
Raw Normal View History

2021-12-01 02:14:25 +00:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
2024-11-15 23:09:31 +00:00
@use '../mixins';
@use '../variables';
2021-12-01 02:14:25 +00:00
.ContextMenu {
2022-08-03 20:54:02 +00:00
&__container {
align-items: center;
display: flex;
justify-content: center;
}
2021-12-01 02:14:25 +00:00
&__popper {
2024-11-15 23:09:31 +00:00
@include mixins.module-composition-popper;
& {
margin: 0;
padding-block: 6px;
padding-inline: 0px;
width: auto;
}
&--single-item {
padding: 0;
}
2021-12-01 02:14:25 +00:00
}
&__title {
2024-11-15 23:09:31 +00:00
@include mixins.font-body-1-bold;
2021-12-01 02:14:25 +00:00
margin-bottom: 12px;
}
&__button {
2024-11-15 23:09:31 +00:00
@include mixins.button-reset();
2021-12-01 02:14:25 +00:00
}
&__option {
2024-11-15 23:09:31 +00:00
@include mixins.button-reset();
& {
@include mixins.font-body-2;
@include mixins.dark-theme {
color: variables.$color-gray-05;
}
2021-12-01 02:14:25 +00:00
2024-11-15 23:09:31 +00:00
align-items: center;
display: flex;
justify-content: space-between;
min-width: 150px;
width: 100%;
}
2021-12-01 02:14:25 +00:00
&--container {
display: flex;
2023-05-04 18:04:22 +00:00
align-items: center;
padding-block: 7px;
padding-inline: 12px;
&--with-selection {
padding-inline-start: 8px;
padding-inline-end: 24px;
&::before {
content: '';
width: 16px;
height: 16px;
margin-inline-end: 8px;
}
}
&--selected::before {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
@include mixins.color-svg(
'../images/icons/v3/check/check.svg',
2024-11-15 23:09:31 +00:00
variables.$color-black
);
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
@include mixins.color-svg(
'../images/icons/v3/check/check.svg',
2024-11-15 23:09:31 +00:00
variables.$color-white
);
}
}
2021-12-01 02:14:25 +00:00
}
&--icon {
height: 16px;
2023-04-20 17:03:43 +00:00
margin-inline-end: 8px;
2021-12-01 02:14:25 +00:00
width: 16px;
}
&--container--with-selection &--icon {
margin-inline-end: 12px;
2021-12-01 02:14:25 +00:00
}
&--title {
2024-11-15 23:09:31 +00:00
@include mixins.font-body-2;
2021-12-01 02:14:25 +00:00
}
&--description {
2024-11-15 23:09:31 +00:00
@include mixins.font-subtitle;
2021-12-01 02:14:25 +00:00
}
&:hover {
2024-11-15 23:09:31 +00:00
@include mixins.light-theme() {
background-color: variables.$color-gray-05;
2021-12-01 02:14:25 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme() {
background-color: variables.$color-gray-65;
2021-12-01 02:14:25 +00:00
}
}
&--focused,
&:focus,
&:active {
2024-11-15 23:09:31 +00:00
@include mixins.keyboard-mode {
box-shadow: 0 0 1px 1px variables.$color-ultramarine;
outline: none;
}
2021-12-01 02:14:25 +00:00
}
}
&__popper--single-item &__option--container {
2023-04-20 17:03:43 +00:00
padding-block: 12px;
}
&__popper--single-item &__divider {
2022-10-18 17:12:02 +00:00
border-style: solid;
border-width: 0 0 1px 0;
margin-top: 2px;
margin-bottom: 2px;
2024-11-15 23:09:31 +00:00
@include mixins.light-theme {
border-color: variables.$color-gray-15;
2022-10-18 17:12:02 +00:00
}
2024-11-15 23:09:31 +00:00
@include mixins.dark-theme {
border-color: variables.$color-gray-65;
2022-10-18 17:12:02 +00:00
}
}
2021-12-01 02:14:25 +00:00
}