Browse Source

refactor(AdvancedTable): Row styling improvements

Owen Diffey 2 years ago
parent
commit
782c0b3c8a
1 changed files with 11 additions and 36 deletions
  1. 11 36
      frontend/src/components/AdvancedTable.vue

+ 11 - 36
frontend/src/components/AdvancedTable.vue

@@ -2018,17 +2018,11 @@ export default {
 				th,
 				td {
 					border-color: var(--dark-grey) !important;
-
-					&:first-child {
-						background-color: var(--dark-grey-3) !important;
-					}
+					background-color: var(--dark-grey-3) !important;
 				}
 
-				&:nth-child(even) {
-					&,
-					td:first-child {
-						background-color: var(--dark-grey-2) !important;
-					}
+				&:nth-child(even) td {
+					background-color: var(--dark-grey-2) !important;
 				}
 
 				&:hover,
@@ -2036,10 +2030,7 @@ export default {
 				&.highlighted {
 					th,
 					td {
-						&,
-						&:first-child {
-							background-color: var(--dark-grey-4) !important;
-						}
+						background-color: var(--dark-grey-4) !important;
 					}
 				}
 
@@ -2180,7 +2171,7 @@ export default {
 
 			tbody {
 				tr {
-					&.highlighted {
+					&.highlighted td {
 						background-color: var(--light-grey);
 					}
 
@@ -2190,6 +2181,10 @@ export default {
 						}
 					}
 
+					&:nth-child(even) td {
+						background-color: #fafafa;
+					}
+
 					td {
 						border: 1px solid var(--light-grey-2);
 						border-width: 0 1px 1px 0;
@@ -2236,12 +2231,12 @@ export default {
 					white-space: nowrap;
 					text-overflow: ellipsis;
 					overflow: hidden;
+					background-color: var(--white);
 
 					&:first-child {
 						display: table-cell;
 						position: sticky;
 						left: 0;
-						background-color: var(--white);
 						z-index: 2;
 
 						& > .updated-tooltip {
@@ -2264,19 +2259,12 @@ export default {
 					}
 				}
 
-				&:nth-child(even) td:first-child {
-					background-color: #fafafa;
-				}
-
 				&:hover,
 				&:focus,
 				&.highlighted {
 					th,
 					td {
-						&,
-						&:first-child {
-							background-color: var(--light-grey);
-						}
+						background-color: var(--light-grey);
 					}
 				}
 			}
@@ -2291,22 +2279,9 @@ export default {
 								display: table-cell;
 								position: sticky;
 								left: 5px;
-								background-color: var(--white);
 								z-index: 2;
 							}
 						}
-
-						&:hover,
-						&:focus,
-						&.highlighted {
-							th,
-							td {
-								&:nth-child(2) {
-									background-color: var(--light-grey);
-								}
-							}
-						}
-
 						&.updated td:first-child {
 							background-color: var(--primary-color);
 						}