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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iris Alpha Slider not aligning properly (in Firefox) #36

Closed
maddisondesigns opened this issue Aug 4, 2020 · 4 comments
Closed

Iris Alpha Slider not aligning properly (in Firefox) #36

maddisondesigns opened this issue Aug 4, 2020 · 4 comments
Labels

Comments

@maddisondesigns
Copy link

Hi,

First up, thanks heaps for your work on adding alpha color to this WP Color Picker 馃檹

An issue that has just started happening in the last week is that the Alpha Color Slider is no longer sitting properly within the control.

screenshot_451

My Customizer controls were displaying fine last week and I haven't made any code changes in that time, but I have updated Firefox (macOS) to the latest version (79.0), so I think it's related to that. The control displays fine in Chrome and Safari.

I'm actually wondering if it's partly a Firefox bug. The .iris-alpha-slider element width appears to be rounding to 17.6333px wide even though the element is only set to 17.625px. When I view it in Chrome, the element width is rounded to 17.63 as expected.

screenshot_452

If I manually override the width of that Alpha slider in my Customizer css using the following style, the alpha slider goes back to displaying correctly.

.iris-picker-inner .iris-alpha-slider {
	width: 17.6px !important;
}

Using the above css, the alpha slider displays as expected:

screenshot_454

@neilgee
Copy link

neilgee commented Aug 4, 2020

Yes - also seeing this in Firefox 79 & Firefox Developer 80

Screen Shot 2020-08-05 at 9 40 00 am

@webaware
Copy link

I reckon this is likely a Firefox bug. Here's a quick workaround for the script itself.

On line 378, change this:

stripsWidth = ( ( emptyWidth / 2 ) - stripsMargin );

to this:

stripsWidth = ( ( emptyWidth / 2 ) - stripsMargin ) - 1;

Yes, it's a dirty hack, but it works :)

@kallookoo
Copy link
Owner

Hi,
Try the branch 3.0.0 and comment please.

@kallookoo
Copy link
Owner

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants