Skip to content
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

basicui: rgb color selector css improvements #934

Closed
1 task
ako-3004 opened this issue Mar 3, 2021 · 1 comment · Fixed by #1139
Closed
1 task

basicui: rgb color selector css improvements #934

ako-3004 opened this issue Mar 3, 2021 · 1 comment · Fixed by #1139
Labels
basic ui Basic UI enhancement New feature or request

Comments

@ako-3004
Copy link

ako-3004 commented Mar 3, 2021

Which UI are you reporting an issue for?

  • Basic UI

The problem

RGB Color selector dot is not exactly placed, reason is the css styling

Your suggestion

Change color picker handle css class ".colorpicker__handle" like following:

  • remove current margin setting "margin: -12px 0 -12px;" which is also wrong (top and bottom are set here, not top and left)
  • add "transform: translate(-50%, -50%);" what makes the px value irrelevant. works on all modern browsers.

you instantly see a correct placement exactly in the middle for rgb 100% or on the outer cicle line for a single color 100%

SharedScreenshot

support for older browsers which is not realy relevant today, but possible:

-moz-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
@ako-3004 ako-3004 added the enhancement New feature or request label Mar 3, 2021
@lolodomo lolodomo added the basic ui Basic UI label Aug 7, 2021
@lolodomo
Copy link
Contributor

lolodomo commented Aug 9, 2021

I just tested and you're right the selector is apparently not well placed.
I am going to test your proposed changes in Firefox/Chrome/Edge.

lolodomo added a commit to lolodomo/openhab-webui that referenced this issue Aug 9, 2021
kaikreuzer pushed a commit that referenced this issue Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
basic ui Basic UI enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants