-
Notifications
You must be signed in to change notification settings - Fork 317
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
Fix More dropdown (html, aria, bootstrap classes) #1414
Changes from all commits
aedc6a2
41f3b93
1d28b04
a7f307c
10dac40
eed8141
9648d66
13761bb
00e2fae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,10 +107,21 @@ | |
border: 1px solid var(--pst-color-border); | ||
box-shadow: 0 0 0.3rem 0.1rem var(--pst-color-shadow); | ||
background-color: var(--pst-color-on-background); | ||
padding: 0.5rem 1rem; | ||
padding: 0.5rem 0; | ||
margin: 0.5rem 0; | ||
min-width: 20rem; | ||
|
||
.dropdown-item { | ||
// Give the items in the dropdown some breathing room but let the hit | ||
// and hover area of the items extend to the edges of the menu | ||
padding: 0.25rem 1.5rem; | ||
|
||
// Override Bootstrap | ||
&:focus:not(:hover):not(:active) { | ||
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. Had to add the |
||
background-color: inherit; | ||
} | ||
} | ||
|
||
// Hide the menu unless show has been clicked | ||
&:not(.show) { | ||
display: none; | ||
|
@@ -130,6 +141,9 @@ | |
.nav-link { | ||
@include link-style-hover; | ||
|
||
// Override Bootstrap | ||
transition: none; | ||
|
||
&.nav-external:after { | ||
font: var(--fa-font-solid); | ||
content: var(--pst-icon-external-link); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,10 @@ $grid-breakpoints: ( | |
lg: 960px, | ||
xl: 1200px, | ||
); | ||
|
||
$dropdown-link-hover-bg: var(--pst-color-surface); | ||
// --pst-color-surface can also be assigned to the dark variant because it is | ||
// scoped to different values depending on light/dark theme | ||
$dropdown-dark-link-hover-bg: var(--pst-color-surface); | ||
$dropdown-link-active-bg: var(--pst-color-surface); | ||
$dropdown-dark-link-active-bg: var(--pst-color-surface); | ||
Comment on lines
+19
to
+24
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. Not sure if this is the right move, but it seemed that if we want to override the default dropdown styles in this dropdown, the we'd probably want to override them in any other dropdown that we might add in the future? 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. why do we need separate light/dark variables --- oh, is it because these are preexisting bootstrap variables that we're just overriding? 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. correct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we don't need the top/bottom padding either, but feel free to ignore this suggestion if you disagree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not that I agree or disagree. It's more that this PR doesn't exactly feel like the right place to change padding or override somebody else's prior aesthetic choice. The focus of this PR is about correcting (1) the AT (assistive tech, accessibility tree) semantics and (2) interaction mechanisms. Some of that necessarily entails changing some visual aspects of the UI, but padding is not one of those aspects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But I will gladly open up a follow-up PR to put it on the table :)