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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix button width in mobile nav #4455

Merged

Conversation

bethcollins92
Copy link
Contributor

@bethcollins92 bethcollins92 commented May 5, 2022

Done

  • Add styles to fix p-navigation__link when used on a button element

Fixes #4444

QA

  • Open demo
  • Go to the default Navigation example
  • Inspect the list of links, and add another p-navigation__link on a button element, wrapped in a <li class="p-navigation__item"></li>
  • Check the button is full width, compared to on live or here

Check if PR is ready for release

If this PR contains Vanilla SCSS code changes, it should contain the following changes to make sure it's ready for the release:

  • PR should have one of the following labels to automatically categorise it in release notes:
    • Feature 馃巵, Breaking Change 馃挘, Bug 馃悰, Documentation 馃摑, Maintenance 馃敤.
  • Vanilla version in package.json should be updated relative to the most recent release, following semver convention:
    • if CSS class names are not changed it can be bugfix relesase (x.x.X)
    • if CSS class names are changed/added/removed it should be minor version (x.X.0)
    • see the wiki for more details
  • Any changes to component class names (new patterns, variants, removed or added features) should be listed on the what's new page.
  • Documentation side navigation should be updated with the relevant labels.

@webteam-app
Copy link

Demo starting at https://vanilla-framework-4455.demos.haus

@bethcollins92 bethcollins92 force-pushed the 4444-navigation-buttons-bug branch 2 times, most recently from e487fa1 to 3fbd6a2 Compare May 5, 2022 13:22
@bartaz
Copy link
Contributor

bartaz commented May 6, 2022

@bethcollins92 thanks, looks good - but I think we should have an example in Vanilla to make sure we don't break it in future.
I guess just changing dropdowns here to buttons would work:

image

BTW, I noticed that when you use button on a navigation dropdown it has misaligned icon, I guess because of additional margin. Maybe we can fix that as well here.

@bethcollins92
Copy link
Contributor Author

Thanks @bartaz - I've swapped the links out for buttons in the example and fixed the misaligned button

Co-authored-by: Bartek Szopka <83575+bartaz@users.noreply.github.com>
Copy link
Contributor

@bartaz bartaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@bethcollins92 bethcollins92 merged commit 7833d0a into canonical:main May 6, 2022
@bethcollins92 bethcollins92 deleted the 4444-navigation-buttons-bug branch May 6, 2022 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation buttons aren't full width in mobile menu
3 participants