Skip to content

fix(material/radio): rendering artifacts at some zoom levels #31612

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

Merged
merged 1 commit into from
Jul 29, 2025

Conversation

crisbeto
Copy link
Member

Currently the circle inside the radio button is rendered out as an element with a solid border. Presumably MDC did it this way, because it allows more CSS rules to be combined and it handles high contrast mode automatically. The problem with this approach is that depending on the user's screen and zoom level, there can be rendering artifacts on Windows like a dot in the middle of the radio button.

These changes resolve the rendering artifacts by using a background color for the circle and which is overridden to CanvasText for high contrast mode.

Fixes #31466.

@crisbeto crisbeto requested a review from a team as a code owner July 29, 2025 07:02
@crisbeto crisbeto requested review from adolgachev and ok7sai and removed request for a team July 29, 2025 07:02
@crisbeto crisbeto added the target: patch This PR is targeted for the next patch release label Jul 29, 2025
Currently the circle inside the radio button is rendered out as an element with a solid border. Presumably MDC did it this way, because it allows more CSS rules to be combined and it handles high contrast mode automatically. The problem with this approach is that depending on the user's screen and zoom level, there can be rendering artifacts on Windows like a dot in the middle of the radio button.

These changes resolve the rendering artifacts by using a background color for the circle and which is overridden to `CanvasText` for high contrast mode.

Fixes angular#31466.
@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Jul 29, 2025
@crisbeto crisbeto removed request for adolgachev and ok7sai July 29, 2025 20:22
@crisbeto crisbeto merged commit 471d323 into angular:main Jul 29, 2025
24 of 25 checks passed
@crisbeto
Copy link
Member Author

The changes were merged into the following branches: main, 20.1.x

crisbeto added a commit that referenced this pull request Jul 29, 2025
Currently the circle inside the radio button is rendered out as an element with a solid border. Presumably MDC did it this way, because it allows more CSS rules to be combined and it handles high contrast mode automatically. The problem with this approach is that depending on the user's screen and zoom level, there can be rendering artifacts on Windows like a dot in the middle of the radio button.

These changes resolve the rendering artifacts by using a background color for the circle and which is overridden to `CanvasText` for high contrast mode.

Fixes #31466.

(cherry picked from commit 471d323)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: material/radio target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(radio): White dot in the middle of the active radio button
2 participants