Skip to content

fix: prevent focus outline clipping in settings editor#304981

Open
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/settings-editor-focus-outline-clipping
Open

fix: prevent focus outline clipping in settings editor#304981
yogeshwaran-c wants to merge 1 commit intomicrosoft:mainfrom
yogeshwaran-c:fix/settings-editor-focus-outline-clipping

Conversation

@yogeshwaran-c
Copy link

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: hidden on these elements clips the CSS outline.

Closes #276873

What is the new behavior?

Changed overflow: hidden to overflow: clip on:

  • .settings-group-title-label (section headers like "Editor", "Files", etc.)
  • .setting-item-title (individual setting labels)

The overflow: clip property provides the same content clipping behavior needed for text-overflow: ellipsis, but unlike overflow: hidden:

  • It does not create a scroll container
  • It does not clip CSS outlines rendered at the element edge

This allows the focus outline (outline: 1px solid with outline-offset: -1px) to render fully without being clipped.

Additional context

  • CSS-only change, 2 lines changed
  • overflow: clip is well-supported in all modern browsers (Chrome 90+, Firefox 81+, Safari 16+)
  • text-overflow: ellipsis works correctly with both overflow: hidden and overflow: clip

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
@vs-code-engineering
Copy link
Contributor

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@rzhao271

Matched files:

  • src/vs/workbench/contrib/preferences/browser/media/settingsEditor2.css

@vs-code-engineering vs-code-engineering bot added this to the 1.114.0 milestone Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settings editor has cut off focus outline

2 participants