fix: prevent focus outline clipping in settings editor#304981
Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Open
fix: prevent focus outline clipping in settings editor#304981yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Change overflow: hidden to overflow: clip on settings group title labels and setting item titles. The overflow: clip property provides the same content clipping behavior needed for text-overflow: ellipsis, but unlike overflow: hidden it does not clip CSS outlines, which prevents the focus outline from being cut off at the element edges. Closes microsoft#276873
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @rzhao271Matched files:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Bug fix (CSS)
What is the current behavior?
In the Settings editor, the focus outline on setting items and group title labels is cut off at the element edges. This happens because
overflow: hiddenon these elements clips the CSS outline.Closes #276873
What is the new behavior?
Changed
overflow: hiddentooverflow: clipon:.settings-group-title-label(section headers like "Editor", "Files", etc.).setting-item-title(individual setting labels)The
overflow: clipproperty provides the same content clipping behavior needed fortext-overflow: ellipsis, but unlikeoverflow: hidden:This allows the focus outline (
outline: 1px solidwithoutline-offset: -1px) to render fully without being clipped.Additional context
overflow: clipis well-supported in all modern browsers (Chrome 90+, Firefox 81+, Safari 16+)text-overflow: ellipsisworks correctly with bothoverflow: hiddenandoverflow: clip