Skip to content

Support @container anchored(fallback: ...) queries #462

Description

@jpzwarte

Since the polyfill already has everything wired up related to CSS Anchor Positioning, it would be "relatively easy" to add support for the anchored container queries to it?

That is part of v2 of the spec: https://www.w3.org/TR/css-anchor-position-2/#anchored-container-queries

Are there reasons why it's a bad idea to do it in this polyfill?

Something like

if (!CSS.supports('anchor-name: --a')) {
  await polyfill();                          // covers queries as part of its work
} else if (!CSS.supports('container-type', 'anchored')) {
  await polyfillAnchoredContainerQueries();  // Chromium 125–142
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions