Skip to content

Commit

Permalink
Fix notification and stopwatch empty states (#22845)
Browse files Browse the repository at this point in the history
Previous solution was relying on fomantic selector `.ui.label.hidden` to
hide the elements in their empty state, but this doesn't work any more
with the removal of the `label` class. Instead, introduce a standalone
CSS rule for the `hidden` class, which is universally usable as a single
class.

We can unfortunately not use the existing `hide` class because without
the `!important`, it does not have enough specificity to win against
fomantic's `.ui.menu:not(.vertical) .item {display: flex}` rule.

Followup and fixes regression from
#22169.

Before:

<img width="98" alt="image"
src="https://user-images.githubusercontent.com/115237/217959380-d3279ff3-526a-4ac4-9a18-3ab7c9ae91dd.png">

After:

<img width="77" alt="image"
src="https://user-images.githubusercontent.com/115237/217959463-44852716-cb25-4110-8481-668842ad4454.png">
  • Loading branch information
silverwind authored Feb 11, 2023
1 parent 2152c4e commit 8fa54d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions web_src/less/_base.less
Original file line number Diff line number Diff line change
Expand Up @@ -1803,6 +1803,7 @@ footer {
}
}

/* TODO: remove in favor of .hidden helper */
.hide {
display: none;

Expand Down
1 change: 1 addition & 0 deletions web_src/less/helpers.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
/* below class names match Tailwind CSS */
.pointer-events-none { pointer-events: none !important; }
.relative { position: relative !important; }
.hidden { display: none !important; }

.mono {
font-family: var(--fonts-monospace) !important;
Expand Down

0 comments on commit 8fa54d0

Please sign in to comment.