question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Controls: Inconsistent focus ring rendering

See original GitHub issue
Screen Shot 2020-11-14 at 11 46 10 AM

Recently, we’ve made the focus “ring” a 0.5px box-shadow for the controls. Today, I noticed some strange/inconsistent rendering with these new styles (see screenshot above). Some of the sides appear to be “cut off”.

Demo link: https://g2-components.xyz/?path=/story/designtools-typographytools--bordered-color-panel-expand

It doesn’t seem to be affecting the components here: https://g2-components.xyz/?path=/story/designtools-presentation-components--input-text-field

I’m not entirely sure what may be causing it. There doesn’t seem to be any overflow based cropping in the UI that’s being affected - at least, not from what I can tell.


This may be something to keep an eye on.

If this continues to be a problem, and we’re adamant on having 1.5px sub-pixel value borders, an alternative solution may be to render the box-shadow as inset. From my tests, this seems to resolve the issue. However, this does affect the “roundness” of the corners ever so slightly.


cc’ing @jasmussen

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jasmussencommented, Nov 18, 2020

A roller coaster! But this is probably better for it.

We can still revisit the focus style in the future, but now it’ll be because we want to 😅

0reactions
ItsJonQcommented, Nov 18, 2020

Got it. <Slider /> component. Styles. will-change: transform;. Removing this fixes it 🙈 .

What a wild ride.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keyboard-Only Focus Styles | CSS-Tricks
I handled a ticket just today where a missing focus style was harming a user who relies on visual focus styles to navigate...
Read more >
Different focus ring behavior in Firefox and Chrome #3146
It's about inconsistent focus indicitator in Firefox. It is displayed correctly for an AnchorButton and not correctly for a Button, hence this ...
Read more >
Why does my Nikkor AF-S DX VR 18-200mm's focus ring stop ...
So, I vigorously worked the focus ring back and forth between infinity and where the lens stopped focusing. Slowly but surely after about...
Read more >
How to fix the ugly focus ring and not break accessibility in React
A Story of a React Re-Rendering Bug​​ After clicking any button, the default styling in the browser displays a focus outline. This ugly...
Read more >
409912 - Aqua focus rings on buttons are clipped - Bugzilla@Mozilla
Note that the ring thickness is completely inconsistent (which I think might be "normal"), but the bottom and right side look to have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found