Skip to content

Commit 78e02f9

Browse files
committed
Add focus-visible outline to HighlightedCode
1 parent 830adbe commit 78e02f9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ui/src/components/HighlightedCode/HighlightedCode.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function HighlightedCodeComponent({
138138
<div
139139
tabIndex={0}
140140
className={cn(
141-
"overflow-x-auto [&_pre]:!m-0 [&_pre]:overflow-x-auto [&_code]:!font-mono",
141+
"overflow-x-auto [&_pre]:!m-0 [&_pre]:overflow-x-auto [&_code]:!font-mono focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
142142
compact
143143
? "[&_pre]:!px-2.5 [&_pre]:!py-1.5 [&_pre]:!text-[11px] [&_pre]:!leading-relaxed"
144144
: "[&_pre]:!p-4 [&_pre]:!text-sm",
@@ -152,7 +152,7 @@ function HighlightedCodeComponent({
152152
<pre
153153
tabIndex={0}
154154
className={cn(
155-
"overflow-x-auto bg-muted/50 text-foreground font-mono",
155+
"overflow-x-auto bg-muted/50 text-foreground font-mono focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
156156
compact ? "px-2.5 py-1.5 text-[11px] leading-relaxed" : "p-4 text-sm",
157157
showLanguage && language && !compact && "pt-8",
158158
maxHeight && "overflow-y-auto"

0 commit comments

Comments
 (0)