@@ -242,10 +242,7 @@ export function BrowserDeviceToolbar({
242242 onChange = { ( event ) => updateCustomDimension ( "width" , event . target . value ) }
243243 aria-label = "Viewport width"
244244 aria-invalid = { ! customValid }
245- className = { cn (
246- "text-center [&_[data-slot=input]::-webkit-inner-spin-button]:appearance-none [&_[data-slot=input]]:[appearance:textfield]" ,
247- width >= 360 ? "w-14" : "w-13" ,
248- ) }
245+ className = { width >= 360 ? "w-14" : "w-13" }
249246 />
250247 < span className = "text-xs text-muted-foreground" > ×</ span >
251248 < Input
@@ -270,25 +267,21 @@ export function BrowserDeviceToolbar({
270267 onChange = { ( event ) => updateCustomDimension ( "height" , event . target . value ) }
271268 aria-label = "Viewport height"
272269 aria-invalid = { ! customValid }
273- className = { cn (
274- "text-center [&_[data-slot=input]::-webkit-inner-spin-button]:appearance-none [&_[data-slot=input]]:[appearance:textfield]" ,
275- width >= 360 ? "w-14" : "w-13" ,
276- ) }
270+ className = { width >= 360 ? "w-14" : "w-13" }
277271 />
278272 </ form >
279273
280274 < Tooltip >
281275 < TooltipTrigger
282276 render = {
283277 < Button
284- variant = "ghost"
278+ variant = { aspectRatio === null ? "ghost" : "secondary" }
285279 size = "icon-xs"
286280 type = "button"
287281 aria-label = {
288282 aspectRatio === null ? "Lock viewport aspect ratio" : "Unlock viewport aspect ratio"
289283 }
290284 aria-pressed = { aspectRatio !== null }
291- className = { cn ( aspectRatio !== null && "bg-accent text-foreground" ) }
292285 disabled = { pending || ! customValid }
293286 onPointerDown = { ( event ) => event . preventDefault ( ) }
294287 onClick = { toggleAspectRatio }
@@ -315,19 +308,21 @@ export function BrowserDeviceToolbar({
315308 >
316309 < ScreenRotationIcon />
317310 </ Button >
318- < Button
319- variant = "ghost"
320- size = "icon-xs"
321- type = "button"
322- aria-label = "Close device toolbar"
323- className = "sticky right-0 ml-auto bg-background/95"
324- disabled = { pending }
325- onClick = { ( ) => {
326- apply ( { _tag : "fill" } , null ) ;
327- } }
328- >
329- < X />
330- </ Button >
311+ { /* Sticky backing so scrolled controls do not show through the close action. */ }
312+ < span className = "sticky right-0 ml-auto flex bg-background/95" >
313+ < Button
314+ variant = "ghost"
315+ size = "icon-xs"
316+ type = "button"
317+ aria-label = "Close device toolbar"
318+ disabled = { pending }
319+ onClick = { ( ) => {
320+ apply ( { _tag : "fill" } , null ) ;
321+ } }
322+ >
323+ < X />
324+ </ Button >
325+ </ span >
331326 </ div >
332327 ) ;
333328}
0 commit comments