Fix strikethrough on hover for abandoned changes

Release-Notes: skip
Google-Bug-Id: b/305698881
Change-Id: I8310c01f86117355374f6454079649e99534b2a5
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 4feb35d..fc5760b 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 @@
         .container {
           position: relative;
         }
-        .strikethrough {
-          color: var(--deemphasized-text-color);
-          text-decoration: line-through;
-        }
         .content {
           overflow: hidden;
           position: absolute;
@@ -285,11 +281,18 @@
           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 {