@@ -558,6 +558,7 @@ export async function runRendererRuntimeTest(assetRoot) {
558558 { accent : "#fff0" , lightInk : "rgb(0 0 0)" , darkInk : "rgb(255 255 255)" } ,
559559 { accent : "#00000000" , lightInk : "rgb(0 0 0)" , darkInk : "rgb(255 255 255)" } ,
560560 { accent : "rgba(255, 255, 255, 0.05)" , lightInk : "rgb(0 0 0)" , darkInk : "rgb(255 255 255)" } ,
561+ { accent : "rgba(999, 999, 999, 0.1)" , lightInk : "rgb(0 0 0)" , darkInk : "rgb(255 255 255)" } ,
561562 ] ;
562563 for ( const nativeAppearance of [ "light" , "dark" ] ) {
563564 for ( const { accent, lightInk, darkInk } of contrastCases ) {
@@ -577,6 +578,25 @@ export async function runRendererRuntimeTest(assetRoot) {
577578 }
578579 }
579580
581+ for ( const nativeAppearance of [ "light" , "dark" ] ) {
582+ const transparentSurfaces = makeFixture ( { nativeAppearance } ) ;
583+ vm . runInNewContext ( transparentSurfaces . payloadFor ( {
584+ appearance : "auto" ,
585+ colorMode : "explicit" ,
586+ explicitColorKeys : [ "background" , "panel" , "accent" ] ,
587+ colors : {
588+ background : "rgba(255, 255, 255, 0)" ,
589+ panel : "#0000" ,
590+ accent : "rgba(0, 0, 0, 0)" ,
591+ } ,
592+ } ) , transparentSurfaces . context ) ;
593+ assert . equal (
594+ transparentSurfaces . rootStyle . values . get ( "--ds-on-accent" ) ,
595+ nativeAppearance === "light" ? "rgb(0 0 0)" : "rgb(255 255 255)" ,
596+ `Transparent theme surfaces must fall back to the ${ nativeAppearance } shell canvas` ,
597+ ) ;
598+ }
599+
580600 const adaptiveAccent = makeFixture ( { nativeAppearance : "dark" } ) ;
581601 vm . runInNewContext ( adaptiveAccent . payloadFor ( {
582602 colorMode : "explicit" ,
0 commit comments