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

repeating gradient slices not equal #22

Open
ghost opened this issue Mar 30, 2017 · 4 comments
Open

repeating gradient slices not equal #22

ghost opened this issue Mar 30, 2017 · 4 comments

Comments

@ghost
Copy link

ghost commented Mar 30, 2017

My code looks like this:

$a: 4%;

background: repeating-conic-gradient(#000 0 .5*$a, transparent 0 $a);

Expected result: all slices, whether they're black or transparent should be equal (to 2% of 360deg, which is 7.2deg).

Actual result: they're different (test) and the issue is particularly obvious in the 0/ 360deg area.

@LeaVerou
Copy link
Owner

Screenshot? This is what I see:

image

@ghost
Copy link
Author

ghost commented Mar 31, 2017

Yes, that's what I see too. All slices should be equal, but the transparent one at the top is visibly smaller than the two black ones framing it (in general, the transparent slices look smaller). This causes problems if I have two different elements with such gradients one on top of the other, the top one being rotated by a slice (live test).

screenshot

@LeaVerou
Copy link
Owner

LeaVerou commented Apr 1, 2017

Ah, I see now, thanks!

@eonj
Copy link
Contributor

eonj commented Apr 7, 2017

I think this is duplicate of #4, floating point error problem.

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

No branches or pull requests

2 participants