-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add support for inline, stack label in autocomplete #1994
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
Changes from 10 commits
f8da19f
23e68dc
8777521
3dbcbb3
0e3cbeb
f61c13c
01c7e0e
e888974
221c8f7
e71e6d7
bcb73f8
6c6c209
b33feda
fb64cb8
1080797
5e8985b
98c7aab
6a7a2d5
13c8488
e635a37
ac647c0
08bd89c
2aeb876
94cd787
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 |
---|---|---|
@@ -1,8 +1,40 @@ | ||
// Stacked label (default) | ||
.autocomplete-label-stacked { | ||
display: block; | ||
khiga8 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
// Inline label (non-default) | ||
.autocomplete-label-inline { | ||
display: inline; | ||
|
||
khiga8 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@media (max-width: $width-sm) { | ||
display: block; | ||
khiga8 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} | ||
|
||
// Wrapper for the input and result elements to ensure alignment | ||
.autocomplete-body { | ||
position: relative; | ||
} | ||
|
||
// Embedded icon | ||
.autocomplete-embedded-icon { | ||
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. I'd like to avoid absolute positioning things. This kind of design requires a bit more finagling and modification to In the markup, wrap the icon and input in a
We'll need to strip the
From here, you'll need to remove the
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. cc: @lindseywild <3 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. This has been updated! The only thing we still need to address is the Firefox styling (you can see this in the screenshot in the below comment). I will ping again once it's ready! |
||
position: absolute; | ||
top: 15%; | ||
left: 5%; | ||
|
||
+ .form-control { | ||
padding-left: $spacer-5; | ||
} | ||
} | ||
|
||
// A pop up list of items used to show autocompleted results | ||
.autocomplete-results { | ||
position: absolute; | ||
left: 0; | ||
z-index: 99; | ||
width: 100%; | ||
width: max-content; | ||
min-width: 100%; | ||
max-height: 20em; | ||
overflow-y: auto; | ||
// stylelint-disable-next-line primer/typography | ||
|
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.
A lot of this was just my local Prettier restyling the code - no actual code changes!