-
Notifications
You must be signed in to change notification settings - Fork 51
AppSideNav::List:Link
- Fix background issue
#3032
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
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
26ac866
updated showcase for status of `AppSideNav::List:Link` to make the prβ¦
didoo a204e75
set transparent background color for `.hds-app-side-nav__list-item-link`
didoo 116fd5a
changeset
didoo c40b28a
updated showcase for status of `AppSideNav::List:Link` for focus befoβ¦
didoo 09cb98f
added toggle for showing interactive states to mock app-side-nav
didoo 9e68039
possible fix to the issue of the focus ring being cut out from siblinβ¦
didoo 48f098d
Update .changeset/fuzzy-pumpkins-fix.md
didoo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
"@hashicorp/design-system-components": patch | ||
--- | ||
|
||
<!-- START components/app-side-nav--> | ||
`AppSideNav::List::Link` - Applied transparent background to the element to avoid ovelapping with previous item's focus ring | ||
<!-- END --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,7 +70,6 @@ | |
|
||
// <li> element | ||
.hds-app-side-nav__list-item { | ||
position: relative; // for the "active" state indicator | ||
list-style-type: none; | ||
|
||
& + & { | ||
|
@@ -89,8 +88,8 @@ | |
var(--token-app-side-nav-body-list-item-padding-horizontal); | ||
color: var(--token-app-side-nav-color-foreground-primary); | ||
text-decoration: none; | ||
background: var(--token-app-side-nav-color-surface-primary); | ||
// "Link" could render as an HTML button element so this overrides the default border style in that case: | ||
// "Link" could render as an HTML button element so these override the default background and border styles in that case | ||
background: transparent; | ||
border-color: transparent; | ||
border-width: 0; | ||
border-radius: var(--token-app-side-nav-body-list-item-border-radius); | ||
|
@@ -99,6 +98,8 @@ | |
&:focus, | ||
&.mock-focus { | ||
@include hds-focus-ring-with-pseudo-element(); | ||
// to move the item link above the siblings elements when they have a solid background (eg. active) so that the focus ring is not cut out | ||
z-index: 1; | ||
} | ||
|
||
// :Hover | ||
|
@@ -130,6 +131,7 @@ | |
// Important: This element does not doing anything when interacted with so should not change color according to state | ||
&.active, | ||
&.active:hover:focus { | ||
position: relative; // for the "active" indicator bar to be correctly positioned | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So far, I haven't been able to uncover issues related to this change and the z-index above. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice! |
||
background: var(--token-color-surface-strong); | ||
|
||
// indicator bar | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.