Skip to content

Commit

Permalink
Fix :first-child() / :last-child() CSS typos
Browse files Browse the repository at this point in the history
29957e5 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.
  • Loading branch information
zarino committed Sep 4, 2023
1 parent eb147c5 commit 2d3e1e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions caps/static/caps/scss/twins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion scoring/static/scoring/scss/methodology.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
}

tbody tr td, thead tr th {
&:first-child() {
&:first-child {
text-align: left;
}
}
Expand Down

0 comments on commit 2d3e1e6

Please sign in to comment.