Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion for primary navigation component #161

Closed
adamsilver opened this issue Nov 4, 2023 · 5 comments
Closed

Suggestion for primary navigation component #161

adamsilver opened this issue Nov 4, 2023 · 5 comments
Labels
question Further information is requested
Milestone

Comments

@adamsilver
Copy link

The component margin-top: -1px when it comes after the phase banner.

I remove the border bottom from the phase banner when including primary navigation directly under it so the negative margin style is unnecessary/wrong.

I don’t think the primary nav component should be this opinionated (and interact with stuff outside of it).

What do you reckon?

@frankieroberto
Copy link
Contributor

I’ve also removed the border from the bottom of the phase banner. I didn't spot the negative margin on the primary nav though, as I had to wrap the phase banner in a <div class="govuk-width-container"></div>, so the negative margin didn't apply.

I’d be happy to remove the negative margin, but perhaps @paulrobertlloyd can remember why it was originally added?

@paulrobertlloyd
Copy link
Contributor

Opinionated maybe (though that opinion is fairly well scoped, only applying when the primary navigation directly follows a phase banner), but this does mean that there is not an odd clash of borders when using components together ‘out of the box’. If an author is customising components, then they are on their own separate path already.

The alternative would be to provide documentation recommending removal of the bottom border on the phase banner, if used directly before this component. Are there any examples of this in the Design System? I wonder what approach they would take? I agree that one component shouldn’t create side effects on another, but what's the best way of avoiding the border clash?

@adamsilver
Copy link
Author

Yeah, I would have guidance at most to get peeps to remove the border on the phase banner.

@frankieroberto
Copy link
Contributor

Ah, I forgot the negative margin was to cover-up the border at the bottom of the phase banner!

@paulrobertlloyd
Copy link
Contributor

Fixed in #192.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants