CSS container style queries compare computed values rather than raw assignments. When querying a custom property like `--bg`, both sides of the query are resolved before comparison — meaning `var(--color-red)` and `red` are treated as equal if they resolve to the same computed value. This behavior applies regardless of whether the value was assigned directly or via a CSS variable reference.

3m read timeFrom matuzo.at
Post cover image