Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

148 lines
4.1 KiB
Plaintext
Raw Permalink Normal View History

/*
2024-09-09 14:57:16 +01:00
Copyright 2024 New Vector Ltd.
Copyright 2020-2023 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
2024-09-09 14:57:16 +01:00
Please see LICENSE files in the repository root for full details.
*/
/* A context menu that largely fits the | [icon] [label] | format. */
.mx_IconizedContextMenu {
min-width: 146px;
2021-11-15 11:39:25 +00:00
width: max-content;
2024-01-02 18:56:39 +00:00
/* override default ul styles */
margin: 0;
padding: 0;
.mx_IconizedContextMenu_optionList {
& > * {
padding-left: 20px;
padding-right: 20px;
}
.mx_IconizedContextMenu_optionList_label {
font-size: $font-15px;
2023-06-29 11:30:25 +01:00
font-weight: var(--cpd-font-weight-semibold);
}
/* the notFirst class is for cases where the optionList might be under a header of sorts. */
&:nth-child(n + 2),
.mx_IconizedContextMenu_optionList_notFirst {
border-top: var(--cpd-border-width-1) solid var(--cpd-color-gray-400);
}
/* round the top corners of the top button for the hover effect to be bounded */
&:first-child .mx_IconizedContextMenu_item:first-child {
border-radius: 8px 8px 0 0; /* radius matches .mx_ContextualMenu */
}
/* round the bottom corners of the bottom button for the hover effect to be bounded */
&:last-child .mx_IconizedContextMenu_item:last-child {
border-radius: 0 0 8px 8px; /* radius matches .mx_ContextualMenu */
}
/* round all corners of the only button for the hover effect to be bounded */
&:first-child:last-child .mx_IconizedContextMenu_item:first-child:last-child {
border-radius: 8px; /* radius matches .mx_ContextualMenu */
}
.mx_IconizedContextMenu_item {
/* pad the inside of the button so that the hover background is padded too */
padding-top: 12px;
padding-bottom: 12px;
text-decoration: none;
2021-08-12 11:27:12 +02:00
color: $primary-content;
2023-06-29 11:30:25 +01:00
font: var(--cpd-font-body-md-regular);
/* Create a flexbox to more easily define the list items */
display: flex;
align-items: center;
&:hover,
&:focus-visible {
background-color: var(--cpd-color-bg-action-secondary-hovered);
}
&.mx_AccessibleButton_disabled {
opacity: 0.5;
cursor: not-allowed;
}
span.mx_IconizedContextMenu_label {
/* labels */
width: 100%;
flex: 1;
/* Ellipsize any text overflow */
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
2020-09-08 10:19:51 +01:00
svg {
width: 16px;
height: 16px;
display: block;
flex-shrink: 0;
& + .mx_IconizedContextMenu_label {
padding-left: 14px;
}
}
.mx_BetaCard_betaPill {
margin-left: 16px;
}
}
}
2020-08-04 17:20:17 +01:00
.mx_IconizedContextMenu_optionList_red {
.mx_IconizedContextMenu_item {
2021-11-11 14:37:29 +01:00
color: $alert !important;
2020-08-04 17:20:17 +01:00
}
svg {
color: var(--cpd-color-icon-critical-primary);
}
2020-08-04 17:20:17 +01:00
}
2021-11-15 11:39:25 +00:00
.mx_IconizedContextMenu_option_red {
color: $alert !important;
svg {
color: $alert;
}
2021-11-15 11:39:25 +00:00
}
2020-08-04 17:20:17 +01:00
.mx_IconizedContextMenu_active {
&.mx_IconizedContextMenu_item,
.mx_IconizedContextMenu_item {
2021-11-11 14:37:29 +01:00
color: $accent !important;
svg {
color: $accent;
}
2020-08-04 17:20:17 +01:00
}
}
&.mx_IconizedContextMenu_compact {
.mx_IconizedContextMenu_optionList > * {
padding: 8px 16px 8px 12px;
}
}
2020-08-04 17:20:17 +01:00
svg.mx_IconizedContextMenu_checked {
2020-08-04 17:20:17 +01:00
margin-left: 16px;
margin-right: -5px;
2021-07-28 17:39:02 +01:00
}
2020-08-04 17:20:17 +01:00
2021-11-15 11:39:25 +00:00
.mx_IconizedContextMenu_sublabel {
margin-left: 20px;
color: $tertiary-content;
}
}
.mx_IconizedContextMenu_item.mx_IconizedContextMenu_itemDestructive {
color: $alert !important;
}