Fix missing top border in dashboard view
Needed to show a border on top of the first gr-change-list-item when a
groupHeader exists. Cannot use + selector because of dom-repeats
existing in the DOM tree.
Change-Id: I77209d90061c1d7f2a7dae3d8c8ee179f1cb47e2
diff --git a/polygerrit-ui/app/styles/gr-change-list-styles.html b/polygerrit-ui/app/styles/gr-change-list-styles.html
index 3f6399f..847a572 100644
--- a/polygerrit-ui/app/styles/gr-change-list-styles.html
+++ b/polygerrit-ui/app/styles/gr-change-list-styles.html
@@ -28,10 +28,20 @@
gr-change-list-item:focus {
background-color: var(--selection-background-color);
}
+ /* The border-collapse attribute only works on sibling elements, not
+ cousin elements. So, if we want the table to have a sticky header and
+ have borders between each row, we must disable the border-top on the
+ elements directly below a .topHeader. */
.topHeader ~ gr-change-list-item:first-of-type,
.topHeader + .groupHeader {
border-top: none;
}
+ /* Needed to show a border on top of the first gr-change-list-item when a
+ groupHeader exists. Cannot use + selector because of dom-repeats
+ existing in the DOM tree. */
+ .topHeader ~ .groupHeader ~ gr-change-list-item {
+ border-top: 1px solid var(--border-color);
+ }
tbody {
border-bottom: 1px solid var(--border-color);
}