heydon,
@heydon@front-end.social avatar

CSS sense check: there's no way to style an element, directly, based on the presence or absence of a custom property is there? Things I've tried:

  1. Style queries (only work for the custom property on a container)
  2. @scope (can style the element itself with :scope BUT targets selectors, not styles)
mia,
@mia@front-end.social avatar

@heydon Right. If we could apply styles directly, based on existing styles, we would be in a loop. So the only way to style-based-on-styles (style queries) requires nesting. That separation avoids the possibility of a loop.

heydon,
@heydon@front-end.social avatar

@mia Yes, that makes sense! Was wondering if there was some method outside of container queries, I guess.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • everett
  • osvaldo12
  • magazineikmin
  • thenastyranch
  • rosin
  • normalnudes
  • Youngstown
  • Durango
  • slotface
  • ngwrru68w68
  • kavyap
  • mdbf
  • InstantRegret
  • JUstTest
  • ethstaker
  • GTA5RPClips
  • tacticalgear
  • Leos
  • anitta
  • modclub
  • khanakhh
  • cubers
  • cisconetworking
  • megavids
  • provamag3
  • tester
  • lostlight
  • All magazines