Skip to content

Commit 7f346bb

Browse files
committed
Refactor scss files to remove code duplication
1 parent 5601c3e commit 7f346bb

6 files changed

Lines changed: 8 additions & 118 deletions

File tree

app/assets/stylesheets/components/_complaints-scores.scss

Lines changed: 0 additions & 53 deletions
This file was deleted.

app/assets/stylesheets/components/_index.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@
99
@import "./supplier-table-row";
1010
@import "./unranked-supplier";
1111
@import "./score-summary";
12-
@import "./other-scores";
13-
@import "./complaints-scores";
14-
@import "./billing-scores";
12+
@import "./section-scores";

app/assets/stylesheets/components/_other-scores.scss

Lines changed: 0 additions & 53 deletions
This file was deleted.

app/assets/stylesheets/components/_billing-scores.scss renamed to app/assets/stylesheets/components/_section-scores.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.billing-scores {
1+
.section-scores, .other-scores {
22
margin-bottom: $cads-spacing-7;
33

44
h2 {
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
.cads-grid-row
22
.cads-grid-col-md-9
3-
.billing-scores
3+
.section-scores
44
%h2 Billing and metering
55
.cads-prose
66
%p
77
We measure billing accuracy by looking at how many bills are based on a meter reading, rather than an estimate.
8-
.billing-scores__descriptions
9-
= render CsrTable::DescriptionListComponent.new do |c|
10-
- c.with_descriptions(descriptions)
8+
= render CsrTable::DescriptionListComponent.new do |c|
9+
- c.with_descriptions(descriptions)
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
.cads-grid-row
22
.cads-grid-col-md-9
3-
.complaints-scores
3+
.section-scores
44
%h2 Complaints received
55
.cads-prose
66
%p
77
If a supplier gets a low number of complaints, we give them a higher star rating.
8-
.complaints-scores__descriptions
9-
= render CsrTable::DescriptionListComponent.new do |c|
10-
- c.with_descriptions(descriptions)
8+
= render CsrTable::DescriptionListComponent.new do |c|
9+
- c.with_descriptions(descriptions)

0 commit comments

Comments
 (0)