Skip to content

Commit

Permalink
Remove outlines from buttons until we fix radix-ui issues (tldraw#4855)
Browse files Browse the repository at this point in the history
This PR removes focus outlines on buttons. There are persistent bugs
with menu items that look cheap and bad and which we haven't been able
to solve. If we solve them then we can bring back the outlines.

![Kapture 2024-11-05 at 09 29
41](https://github.com/user-attachments/assets/063cc2e4-032c-47b7-981a-761729b79951)

### Change type

- [x] `bugfix`

### Release notes

- Fixed a bug with focus outlines appearing in menu items at the wrong
time.
  • Loading branch information
steveruizok authored Nov 5, 2024
1 parent 8641081 commit 69503a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/editor/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
--tl-font-sans: 'tldraw_sans', sans-serif;
--tl-font-serif: 'tldraw_serif', serif;
--tl-font-mono: 'tldraw_mono', monospace;
/* fext outline */
/* text outline */
--a: calc(min(0.5, 1 / var(--tl-zoom)) * 2px);
--b: calc(min(0.5, 1 / var(--tl-zoom)) * -2px);
--tl-text-outline-reference: 0 var(--b) 0 var(--color-background),
Expand Down
4 changes: 3 additions & 1 deletion packages/tldraw/src/lib/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
}

.tlui-button:focus-visible:not(:hover) {
outline: 1px solid var(--color-selected);
/* todo: fix the indicator errors in radix dropdown menus before restoring */
/* outline: 1px solid var(--color-selected); */
outline: none;
outline-offset: -4px;
border-radius: var(--radius-3);
}
Expand Down

0 comments on commit 69503a7

Please sign in to comment.