From 2d3e1e6132faac6eca846164f060b8f97de7d377 Mon Sep 17 00:00:00 2001 From: Zarino Zappia Date: Mon, 4 Sep 2023 13:11:30 +0100 Subject: [PATCH] Fix :first-child() / :last-child() CSS typos 29957e57149c1a14bfe6e78f81caf46c2162aa5a introduced a CSS typo in twins.scss, where the first and last child pseudo-selectors were followed by empty brackets. This worked at the time I wrote it (perhaps the version of Sass we were using at that point handled the mistake gracefully?) but our upcoming scorecards-2023 branches use a new Sass compiler, which treats this as invalid CSS and causes django pipeline to raise an exception. Same goes for the :first-child() in the 2021 scorecards methodology. --- caps/static/caps/scss/twins.scss | 4 ++-- scoring/static/scoring/scss/methodology.scss | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/caps/static/caps/scss/twins.scss b/caps/static/caps/scss/twins.scss index ddec7f19a..4c3571f0d 100644 --- a/caps/static/caps/scss/twins.scss +++ b/caps/static/caps/scss/twins.scss @@ -37,11 +37,11 @@ background: rgba(255, 255, 255, 0.3); } - thead > tr:first-child() > :nth-child(2) { + thead > tr:first-child > :nth-child(2) { border-top: $table-border-width solid $table-border-color; } - tbody > tr:last-child() > :nth-child(2) { + tbody > tr:last-child > :nth-child(2) { border-bottom: $table-border-width solid $table-border-color; } diff --git a/scoring/static/scoring/scss/methodology.scss b/scoring/static/scoring/scss/methodology.scss index 655dd0867..ee74b2c66 100644 --- a/scoring/static/scoring/scss/methodology.scss +++ b/scoring/static/scoring/scss/methodology.scss @@ -47,7 +47,7 @@ } tbody tr td, thead tr th { - &:first-child() { + &:first-child { text-align: left; } }