-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
UI Theme Add: select-box(drop downs) selection and hover colors #25965
Comments
I'm only guessing, but trying to mimicking the native look perfectly for all platforms could be difficult. |
Need to investigate in May what to do here, I think there are duplicates. |
@aeschli @bpasero Useful ? |
@cleidigh can you share the code how you made the currently selected element in the dropdown have a different color? I am talking about the blue thing here: |
@bpasero if you tip me off on how to get around that I can finish up the prototype and VSC - can you do that for my education anyway? I could not get a relative for absolutely positioned div for the second select I will post the electron code, for easy multiplatform test, I couldn't package and OS X version HTML snippet from app: two selects make the second visible on selection the first CSS: it's just one line, the inset box shadow color, but it only works on the select with this size greater than one attribute (already expanded) it has no effect on the first select (collapsed dropDown) select { } option:checked { a hover pseudo- attribute will also work on the second select , not the first |
@aeschli https://github.com/cleidigh/electron-select-example Now if I can just get the overflow to work... |
@cleidigh does not seem to work on Windows 10 unfortunately: Maybe for accessibility reasons it is not possible to color the selected item anymore in Win10? |
@bpasero can you give me an idea of dealing with the overflow issue for my understanding? if I can't find anything for Windows ten, I think using the combination above would most closely agree? |
@bpasero |
I used the keyboard to move up and down the selection. It is unlikely that we would introduce a custom dropdown list only to get the styling right I think. Maybe there is another CSS property we can set to get the selection color changed? |
I updated the electron project to have a standalone select box eliminating event issues there's got to be some way, I hate giving up on these types of things !! and there are several |
@bpasero I got a Windows ten virtual machine on another computer made sure it was fully updated I can try out a Linux VM unless it's quick for you , is Debian what you usually use? |
@cleidigh I fear we cannot use the trick of expanding the dropdown in-place, this would push all other elements down. Thanks for trying :) |
@bpasero |
I'm pretty pleased, 98% complete, straightforward solution:
Platforms Tested (snapshots follow):
ToDo:
|
* SelectBox drop-down-contextv-list WIP 1 * Merge 2 * Selectbox Themed drop-down * Added ARIA labels, color cleanup * Restored Space and Enter select activation * Fix list colors, CSS, Scrollbar, hover before separation * SelectBox separation, clean 1 * SelectBox separation cleanup 2 * SelectBox fix var, superfluous listener * some final polish * actually import the CSS
Currently all widgets using 'select-box' cannot theme
the selected or hover item colors (foreground/background)
The the color is controlled by the platform. That overrides
normal CSS approaches/selectors.
After a bunch of research, I did figure out one solution
and made a prototype in a small electron app.
There appear to be three options:
1 - Some CSS guru knows of a better trick
2 - Use an input box on top of the current list widget
3 - Use something like I came up with:
one select box that is the normal drop-down with current selection
automatically includes the drop-down arrow
a second select box which can be made hidden/visible depending
on the first lightbox focus/selection
The second select box can be styled with option:checked and box shadow
option:checked {
color: #ffffff;
box-shadow: 0 0 10px 100px #905000 inset;
}
I think option two is more complicated and inherits the unneeded list properties
if there is no option one , I would go ahead and prototype within VSC and do a PR
Thoughts ?
The text was updated successfully, but these errors were encountered: