-
Notifications
You must be signed in to change notification settings - Fork 757
Open
Description
This was requested in csstools/postcss-plugins#671
It would be in parallel with @custom-media.
@custom-container <extension-name> <container-condition>
@custom-container --foo card (inline-size > 30em) and style(--responsive: true)
@container (--foo) {
/* styles */
}I personally do think the benefits of having this are smaller than they are with @custom-media.
The same media conditions are often re-used throughout an entire code base.
Assigning these to a named variable has obvious code quality benefits.
Container queries however are much more local.
They are more often tied to the code contained therein.
I can be wrong about this, this is purely my impression.
Maybe @mirisuzanne proposal to allow var() inside <container-condition> is all authors need?
felixfbecker, martenbjork and madogiwa0124argyleink, bleper, mdaoust-sidlee, RogierdeRuijter, elliottmangham and 1 more