Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
css: Fix selector for user-pill-container so that it isn't overridden.
Pratik Chanda9a283d0641e1
diff --git a/web/styles/search.css b/web/styles/search.cssindex 1f1eb4786c5..14940825d5f 100644--- a/web/styles/search.css+++ b/web/styles/search.css@@ -259,73 +259,73 @@&.focused .user-pill-container {flex-flow: row wrap;}- }-- .user-pill-container {- gap: 2px 5px;- /* Don't enforce a height, as user-pill containers- can contain multiple user pills that wrap onto- new lines. */- height: unset;- border: 1px solid transparent;- /* Not focus-visible, because we want to support mouse+backpace- to delete pills */- &:focus {- /* Unlike regular `.pill` this multi-user pill has a border,- so we use border instead of box-shadow on focus. */- box-shadow: none;- border-color: var(--color-focus-outline-input-pill);- }+ .user-pill-container {+ gap: 2px 5px;+ /* Don't enforce a height, as user-pill containers+ can contain multiple user pills that wrap onto+ new lines. */+ height: unset;+ border: 1px solid transparent;- > .pill-label {- min-width: fit-content;- white-space: nowrap;- width: fit-content;- /* Replaced by the 5px gap. */- margin-right: 0;- /* Don't inherit large line-height for user pill labels. */- line-height: 1.1;- }+ /* Not focus-visible, because we want to support mouse+backpace+ to delete pills */+ &:focus {+ /* Unlike regular `.pill` this multi-user pill has a border,+ so we use border instead of box-shadow on focus. */+ box-shadow: none;+ border-color: var(--color-focus-outline-input-pill);+ }- .pill {- /* Reduce user pill height by 2px to- preserve an apparent border around- them even under `box-sizing: border-box`- in the area. */- height: calc(var(--height-input-pill) - 2px);- border: none;- /* Match border radius to image */- border-radius: 4px;- max-width: none;- /* Set the minimum width on the pill container;- this accommodates the avatar, a minimum- two-character username, and the closing X.- 90px at 20px/1em.-- TODO: This would ideally be reworked, as we need to- override it for search suggestion pills (with no X) below.- */- min-width: 4.5em;- display: grid;- grid-template-columns:- var(--length-search-input-pill-image) minmax(0, 1fr)- var(--length-input-pill-exit);- align-content: center;- /* Don't inherit large line-height for user pills themselves, either. */- line-height: 1.1;-- .pill-image {- height: var(--length-search-input-pill-image);- width: var(--length-search-input-pill-image);+ > .pill-label {+ min-width: fit-content;+ white-space: nowrap;+ width: fit-content;+ /* Replaced by the 5px gap. */+ margin-right: 0;+ /* Don't inherit large line-height for user pill labels. */+ line-height: 1.1;}- .pill-image-border {+ .pill {+ /* Reduce user pill height by 2px to+ preserve an apparent border around+ them even under `box-sizing: border-box`+ in the area. */+ height: calc(var(--height-input-pill) - 2px);border: none;- }+ /* Match border radius to image */+ border-radius: 4px;+ max-width: none;+ /* Set the minimum width on the pill container;+ this accommodates the avatar, a minimum+ two-character username, and the closing X.+ 90px at 20px/1em.++ TODO: This would ideally be reworked, as we need to+ override it for search suggestion pills (with no X) below.+ */+ min-width: 4.5em;+ display: grid;+ grid-template-columns:+ var(--length-search-input-pill-image) minmax(0, 1fr)+ var(--length-input-pill-exit);+ align-content: center;+ /* Don't inherit large line-height for user pills themselves, either. */+ line-height: 1.1;++ .pill-image {+ height: var(--length-search-input-pill-image);+ width: var(--length-search-input-pill-image);+ }++ .pill-image-border {+ border: none;+ }- &:not(.deactivated-pill) {- background-color: var(--color-background-user-pill);+ &:not(.deactivated-pill) {+ background-color: var(--color-background-user-pill);+ }}}}