diff options
author | Ben Rohlfs <brohlfs@google.com> | 2023-10-17 12:53:08 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-10-17 12:53:08 +0000 |
commit | 073e1d3e9d7530cc3cdcf49c7f288da308a714c0 (patch) | |
tree | acdba21f74ca49b6ec89f67c97a713e1ea0aa8cb | |
parent | 7d61b886cf89eeebd4bef5d1b1b341df3fcb4aeb (diff) | |
parent | f0bdcef7da1227699a529535dd01bda2e3cd83ad (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.ts | 17 |
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 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 { |