Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Be nice to get a big feature into the 6.0 release, and was thinking the ability to add primary navigation items from the plugin config.
Unfortunately, it’s thrown up a few upstream issues with the prototype components:
Item padding
We’ve adjusted the spacing between items, and no longer have selected items bleed outside the confines of the container, however the items don’t line up with other content on the page, and have too much space between them:
Proposed solution
I think this can be resolved by removing the left and right padding from navigation items:
.x-govuk-primary-navigation__item { box-sizing: border-box; display: block; float: left; line-height: 55px; height: 55px; - padding: 0 govuk-spacing(3); position: relative; margin-right: govuk-spacing(6) }
Masthead component is too opinionated
The masthead component has a top margin of -10px to account for the blue border below the header. However, this means if anything else appears before it, it gets partially obscured:
If you remove the top margin, and don’t have an adaptation to the header to add a full-width bottom border, you get this:
These components are all frustratingly dependent on each other in different ways.
Proposed solution
The negative margin seems like a code smell, so should probably be removed from the masthead component.
Then, in this plugin’s layouts, we need to programmatically decide when to add a header modifying class to give it a full border width.