Skip to content

Commit 349d7af

Browse files
committed
Remove blue border header class
The header is already blue by default, so adding a blue border doesn't make a noticeable visual difference. This commit removes the app-header--blue CSS class and tweaks the component logic to stop it being added.
1 parent ed37ce5 commit 349d7af

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

app/components/header_component/_index.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,4 @@
2323
&.app-header--yellow {
2424
border-bottom: 10px solid govuk-colour("yellow");
2525
}
26-
27-
&.app-header--blue {
28-
border-bottom: 10px solid govuk-colour("blue");
29-
}
3026
}

app/components/header_component/view.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def environment_name
1414
end
1515

1616
def app_header_class_for_environment
17+
return nil if colour_for_environment == "blue"
18+
1719
"app-header--#{colour_for_environment}"
1820
end
1921

spec/components/header_component/view_spec.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@
6060
{ colour: "pink" },
6161
{ colour: "green" },
6262
{ colour: "yellow" },
63-
{ colour: "blue" },
6463
].each do |scenario|
6564
context "when colour_for_environment is #{scenario[:colour]}" do
6665
before do
@@ -72,6 +71,16 @@
7271
end
7372
end
7473
end
74+
75+
context "when colour_for_environment is blue" do
76+
before do
77+
allow(header_component).to receive(:colour_for_environment).and_return("blue")
78+
end
79+
80+
it "returns nil because the header is already blue" do
81+
expect(header_component.app_header_class_for_environment).to be_nil
82+
end
83+
end
7584
end
7685

7786
describe "#colour_for_environment" do

0 commit comments

Comments
 (0)