summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Rohlfs <brohlfs@google.com>2023-10-17 12:53:08 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-10-17 12:53:08 +0000
commit073e1d3e9d7530cc3cdcf49c7f288da308a714c0 (patch)
treeacdba21f74ca49b6ec89f67c97a713e1ea0aa8cb
parent7d61b886cf89eeebd4bef5d1b1b341df3fcb4aeb (diff)
parentf0bdcef7da1227699a529535dd01bda2e3cd83ad (diff)
Merge "Fix strikethrough on hover for abandoned changes"
-rw-r--r--polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts17
1 files changed, 10 insertions, 7 deletions
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
index 4feb35df1d..fc5760b2c4 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.ts
@@ -218,10 +218,6 @@ export class GrChangeListItem extends LitElement {
.container {
position: relative;
}
- .strikethrough {
- color: var(--deemphasized-text-color);
- text-decoration: line-through;
- }
.content {
overflow: hidden;
position: absolute;
@@ -285,11 +281,18 @@ export class GrChangeListItem extends LitElement {
cursor: pointer;
text-decoration: none;
}
- a:hover {
+ /* The subject cell needs a separate rule for these reasons:
+ 1. :hover does not propagate to absolutely positioned children.
+ 2. .strikethrough for abandoned changes must be respected.
+ 3. We don't want the "spacer" and the &nbsp; to be underlined.
+ */
+ .cell:not(.subject) a:hover,
+ .cell.subject a:hover .content:not(.strikethrough) {
text-decoration: underline;
}
- .subject:hover .content {
- text-decoration: underline;
+ .strikethrough {
+ color: var(--deemphasized-text-color);
+ text-decoration: line-through;
}
.comma,
.placeholder {