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

Transformed elements look blurry in Chrome #418

Closed
xaviarnl opened this issue Nov 28, 2019 · 5 comments
Closed

Transformed elements look blurry in Chrome #418

xaviarnl opened this issue Nov 28, 2019 · 5 comments
Labels

Comments

@xaviarnl
Copy link

Describe the bug

Elements in the slider which are transformed, such as the dot handle and a tooltip, are rendered blurry specifically in newer Chrome versions (I am using version 78):
image
You can get to a state like this, but showing a dot in the slider (possibly combined with showing tooltips). After moving the dot, the dot itself as well as any shown tooltip, are blurry.

This is caused by a bug in the "will-change" property which Chrome has introduced. See https://greensock.com/will-change for more information about this.

For now, the best option - I think - would be to not use this attribute.

I fixed it in my application by adding "will-change: auto" to the .vue-slider-dot class in my CSS. This wasn't perfect, however, as then a tiny gap of 1 pixel appeared between the tooltip text bubble and the tooltip handle. So I fixed that too (for now) with the following CSS:
@supports (will-change: transform) {
.vue-slider-dot {
will-change: auto;
}
.vue-slider-dot-tooltip-inner-top:after {
transform: translate(-50%, -1px);
}
}

@xaviarnl xaviarnl added the bug label Nov 28, 2019
@NightCatSama
Copy link
Owner

Can removing will-change: transform fix the problem of blurred fonts?

@xaviarnl
Copy link
Author

It most likely will. With the information I mentioned above, you should be able to reproduce this bug quite easily. And then check if removing the "will-change" solves the issue.
Even though, of course, it is actually Chrome which should fix this bug, but we do not know when they will do this.

@NightCatSama
Copy link
Owner

As far as I know, using transform in chrome may cause blur.

But I don't know if will-change might increase the degree of blur.

I can reproduce the blur effect (with or without will-change), but not as serious as your picture.

If the problem is with the transform, I can't think of any way that can replace it.

But if will-change will make the blur worse, I can remove it.

@xaviarnl
Copy link
Author

I noticed that when I, in the Chrome Developer Tools, unchecked the "transform" property in the CSS, the tooltip was completely sharp & not blurred (of course, it was also misplaced now, but it proved that the transform was the problem).

@NightCatSama
Copy link
Owner

Thanks for your feedback, will-change was removed in 3.0.44

@xaviarnl xaviarnl closed this as completed Dec 9, 2019
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

2 participants