-1

people. I`m new to this, and I have an issue with some text flickering when I try to scale the div up. Can, please, somebody look at my case at help me with a solution to this? Thanks in advance! The pen is this https://codepen.io/alinfarcas/pen/eYXqwLM

The best solution that I came up with was

&__parc {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    backface-visibility: hidden;
    will-change: transform;
    transform-style: preserve-3d;
    transition: transform 0.3s, box-shadow 0.3s;

    &:hover {
      transform: scale(1.04);
      box-shadow: 0 24px 48px rgba(0, 0, 0, 0.14);
    }
  }

But, in this case, even if the text is not flickering anymore, it becames blurry when I hover, and remains blurry even after the hover stops. Can u help me? Thank you!

4
  • Which browser are you using? Your Codepen seems to work fine on my browser (Safari on Mac). Commented Feb 27, 2024 at 6:24
  • I`m using Chrome on Windows 10, but the issue is present also in Firefox and Edge, because I checked. Commented Feb 27, 2024 at 6:28
  • scaling text on a non 4k/retina display will cause artefacts. text rendering is a super complicated issue and the glyphs are usually optimized for the particular font-size. if you just transform-scale ist, you get a lot of aliasing etc. Commented Feb 27, 2024 at 6:32
  • I see... :) There must be a way... Commented Feb 27, 2024 at 6:36

1 Answer 1

0

I’ve had this issue many times here’s what I use

-webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale

Sign up to request clarification or add additional context in comments.

1 Comment

I tried with your fix, but it is still not working. I tried all the combinations between what I had and what you gave me. :( Thanks anyway, for the answer!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.