Skip to content

feat(nav): add high-contrast border - #7721

Merged
mcoker merged 5 commits into
patternfly:high-contrast-q3from
srambach:7621-nav-hi-c
Aug 20, 2025
Merged

mcoker merged 5 commits into
patternfly:high-contrast-q3from
srambach:7621-nav-hi-c

Conversation

@srambach

@srambach srambach commented Aug 4, 2025 •

Copy link
Copy Markdown
Member

Fixes #7621

Adds a border on the ::after of the __link element, because the border width changes when selected.
Adds a border directly on the horizontal secondary nav.

Full backstop report only showed 6 failures that appear to be the noise on the mobile view.

Figma design

Used Cursor autocomplete.

@patternfly-build

patternfly-build commented Aug 4, 2025 •

Copy link
Copy Markdown
Collaborator

@srambach srambach linked an issue Aug 4, 2025 that may be closed by this pull request
@srambach
srambach requested a review from mcoker August 18, 2025 14:04
@mcoker
mcoker requested a review from lboehling August 18, 2025 20:37

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a couple o' things

Comment thread src/patternfly/components/Nav/nav.scss Outdated
inset: 0;
pointer-events: none;
content: "";
border: var(--#{$nav}__link--after--BorderWidth) solid var(--#{$nav}__link--after--BorderColor);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason to have --after in them?

Suggested change
border: var(--#{$nav}__link--after--BorderWidth) solid var(--#{$nav}__link--after--BorderColor);
border: var(--#{$nav}__link--BorderWidth) solid var(--#{$nav}__link--BorderColor);

Comment thread src/patternfly/components/Nav/nav.scss Outdated
Comment on lines +120 to +121
--#{$nav}--m-horizontal--m-subnav--BorderWidth: var(--pf-t--global--border--width--divider--default);
--#{$nav}--m-horizontal--m-subnav--BorderColor: var(--pf-t--global--border--color--high-contrast--default);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Typo in the color var, it isn't showing up currently.

Also can you use a HC border width here? Towards the end of development, we can investigate if there is a pattern for boxes like this that need a border in HC and propose a semantic token if it makes sense (like with the plain action tokens)

Suggested change
--#{$nav}--m-horizontal--m-subnav--BorderWidth: var(--pf-t--global--border--width--divider--default);
--#{$nav}--m-horizontal--m-subnav--BorderColor: var(--pf-t--global--border--color--high-contrast--default);
--#{$nav}--m-horizontal--m-subnav--BorderWidth: var(--pf-t--global--border--width--high-contrast--regular);
--#{$nav}--m-horizontal--m-subnav--BorderColor: var(--pf-t--global--border--color--high-contrast);

@lboehling lboehling left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks good! I think the horizontal subnav pill bkg shape still needs HC border tokens added, also the vertical nav with drilldown examples look like they haven't had the HC tokens applied.

@srambach

Copy link
Copy Markdown
Member Author

This looks good! I think the horizontal subnav pill bkg shape still needs HC border tokens added, also the vertical nav with drilldown examples look like they haven't had the HC tokens applied.

The nav with drilldown examples come along with the menu PR because those are implemented as menus rather than nav!

@mcoker mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fab!

@mcoker
mcoker merged commit 328b57d into patternfly:high-contrast-q3 Aug 20, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High contrast borders - Navigation

4 participants