@@ -290,3 +290,58 @@ select[s-input] {
290290 }
291291 }
292292}
293+
294+ /* =============================================================================
295+ STYLE QUERIES - Depth-Aware Adaptation
296+ Inputs automatically adapt when nested inside surfaces of different depths.
297+ ============================================================================= */
298+
299+ @supports (container-type : inline-size) {
300+ /**
301+ * Inside raised surface (depth: 1)
302+ * Use sunken background to create visual depth contrast
303+ */
304+ @container surface style (--_surface-depth: 1 ) {
305+ : where ([s-input ]) {
306+ --_input-bg : var (--s-surface-sunken );
307+ }
308+
309+ : where ([s-checkbox ]) input ,
310+ : where ([s-radio ]) input {
311+ background-color : var (--s-surface-sunken );
312+ }
313+ }
314+
315+ /**
316+ * Inside floating surface (depth: 2)
317+ * Stronger sunken appearance with visible border
318+ */
319+ @container surface style (--_surface-depth: 2 ) {
320+ : where ([s-input ]) {
321+ --_input-bg : var (--s-surface-sunken );
322+ --_input-border : var (--s-border-strong );
323+ }
324+
325+ : where ([s-checkbox ]) input ,
326+ : where ([s-radio ]) input {
327+ background-color : var (--s-surface-sunken );
328+ border-color : var (--s-border-strong );
329+ }
330+ }
331+
332+ /**
333+ * Inside sunken surface (depth: -1)
334+ * Use base background to stand out from recessed area
335+ */
336+ @container surface style (--_surface-depth: -1 ) {
337+ : where ([s-input ]) {
338+ --_input-bg : var (--s-surface-raised );
339+ --_input-border : var (--s-border-muted );
340+ }
341+
342+ : where ([s-checkbox ]) input ,
343+ : where ([s-radio ]) input {
344+ background-color : var (--s-surface-raised );
345+ }
346+ }
347+ }
0 commit comments