element-web-Github/res/css/views/context_menus/_IconizedContextMenu.pcss

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

179 lines
5.1 KiB
Plaintext
Raw Normal View History

/*
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
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 19:39:25 +08:00
width: max-content;
/* 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;
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 */
Tweaks to informational architecture 1.1 (#7052) * Move user avatar to Space panel * Add room list header for 'Home' or 'Space Name' to room list Add existing Space context menus to room list header * Re-add pending room join spinner * Iterate RoomListHeader plus context menu * Iterate space context menu * Iterate room list + interactions * Move DND to new iA model * Replace composer custom status management with usermenu one * Cull Quick Actions * Iterate minimized room list state * delint * Merge the RoomListNumResults into the RoomListHeader * Make the search shortcut prompt semi-bold * Iterate RoomListHeader based on design review * Iterate UserMenu based on feedback * Add name to expanded spacepanel usermenu button * i18n * Make room sub list aux button components more generic * Change left panel explore button to only refer to room directory * Iterate RoomListHeader * Fix custom user status input field width in Chrome * Bring back Notification settings button * delint * i18n * post-merge fix * iterate pr * Remove unused state * update copy * Apply suggestions from PR review * delint * Update invite iconography * Iterate Space context menu to match Figma * Fix chevron alignment * Fix edge case for RoomListHeader on metaspaces * Wire up general rageshake-driven feedback mechanism * Add IA1.1 info toast * add missing alt attribute * delint * delint * tweak ia toast priority * e2e test account for new toast * autofocus feedback field and remove old subheading * tweak copy * Iterate space panel colours to match Figma * Iterate PR * delint * Fix feedback submission with object setting values * iterate based on review * Tweak colours and update splash image * Tweaks based on review * Remove room list prompt, made redundant by the big fat `+` * Fix edge cases around User Menu positioning and dnd * Add missing import, bad merge? * Update aria label in e2e test * Fix room list space rooms context menu explore button behaviour * Tweak copy * Revert order of options in the UserMenu * Tweak copy * i18n
2021-12-01 02:08:46 +08:00
}
.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;
color: $primary-content;
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;
}
img,
.mx_IconizedContextMenu_icon {
/* icons */
width: 16px;
min-width: 16px;
max-width: 16px;
}
span.mx_IconizedContextMenu_label {
/* labels */
width: 100%;
flex: 1;
/* Ellipsize any text overflow */
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
2020-09-08 17:19:51 +08:00
.mx_IconizedContextMenu_icon + .mx_IconizedContextMenu_label {
padding-left: 14px;
}
.mx_BetaCard_betaPill {
margin-left: 16px;
}
}
}
2020-08-05 00:20:17 +08:00
.mx_IconizedContextMenu_icon {
position: relative;
width: 16px;
height: 16px;
&::before {
content: "";
width: inherit;
height: inherit;
2020-08-05 00:20:17 +08:00
position: absolute;
mask-position: center;
mask-size: contain;
mask-repeat: no-repeat;
background-color: var(--cpd-color-icon-primary);
2020-08-05 00:20:17 +08:00
}
}
.mx_IconizedContextMenu_optionList_red {
.mx_IconizedContextMenu_item {
color: $alert !important;
2020-08-05 00:20:17 +08:00
}
.mx_IconizedContextMenu_icon::before {
background-color: var(--cpd-color-icon-critical-primary);
2020-08-05 00:20:17 +08:00
}
}
2021-11-15 19:39:25 +08:00
.mx_IconizedContextMenu_option_red {
color: $alert !important;
.mx_IconizedContextMenu_icon::before {
background-color: $alert;
}
}
2020-08-05 00:20:17 +08:00
.mx_IconizedContextMenu_active {
&.mx_IconizedContextMenu_item,
.mx_IconizedContextMenu_item {
color: $accent !important;
2020-08-05 00:20:17 +08:00
}
.mx_IconizedContextMenu_icon::before {
background-color: $accent;
2020-08-05 00:20:17 +08:00
}
}
&.mx_IconizedContextMenu_compact {
.mx_IconizedContextMenu_optionList > * {
padding: 8px 16px 8px 12px;
}
}
2020-08-05 00:20:17 +08:00
2021-07-29 00:39:02 +08:00
.mx_IconizedContextMenu_checked,
.mx_IconizedContextMenu_unchecked {
2020-08-05 00:20:17 +08:00
margin-left: 16px;
margin-right: -5px;
2021-07-29 00:39:02 +08:00
}
2020-08-05 00:20:17 +08:00
.mx_IconizedContextMenu_developerTools::before {
mask-image: url("$(res)/img/element-icons/settings/flask.svg");
}
2021-07-29 00:39:02 +08:00
.mx_IconizedContextMenu_checked::before {
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
2021-07-29 00:39:02 +08:00
}
.mx_IconizedContextMenu_unchecked::before {
content: unset;
2020-08-05 00:20:17 +08:00
}
2021-11-15 19:39:25 +08:00
.mx_IconizedContextMenu_sublabel {
margin-left: 20px;
color: $tertiary-content;
}
}
.mx_IconizedContextMenu_item.mx_IconizedContextMenu_itemDestructive {
color: $alert !important;
}