Skip to content

Commit 88e1aa8

Browse files
committed
Move transparent border styles to header_container
Removed the `transparent-bottom-border` class and moved the styles to the `gem-c-layout-super-navigation-header__container` The bottom border is now only applied in forced colours mode, having `transparent-bottom-border` in the HTML could imply that it is set in all cases
1 parent 6b79972 commit 88e1aa8

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ $search-icon-height: 20px;
108108
.gem-c-layout-super-navigation-header__container {
109109
position: relative;
110110
background: $govuk-brand-colour;
111+
112+
// add a transparent bottom border for forced-color modes
113+
@media (forced-colors: active) {
114+
border-bottom: 1px solid transparent;
115+
}
111116
}
112117

113118
.gem-c-layout-super-navigation-header__header-logo {
@@ -703,11 +708,4 @@ $search-icon-height: 20px;
703708
}
704709
}
705710

706-
// Used to add a transparent bottom border for forced-colour modes
707-
.transparent-bottom-border {
708-
@media (forced-colors: active) {
709-
border-bottom: 1px solid transparent;
710-
}
711-
}
712-
713711
// stylelint-enable max-nesting-depth

app/views/govuk_publishing_components/components/_layout_super_navigation_header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
component_helper.add_data_attribute({ module: "ga4-event-tracker ga4-link-tracker", ga4_expandable: "" })
4141
%>
4242
<%= tag.header(**component_helper.all_attributes) do %>
43-
<div class="gem-c-layout-super-navigation-header__container govuk-width-container transparent-bottom-border">
43+
<div class="gem-c-layout-super-navigation-header__container govuk-width-container">
4444
<nav
4545
aria-labelledby="super-navigation-menu-heading"
4646
class="gem-c-layout-super-navigation-header__content"

0 commit comments

Comments
 (0)