Intent to ship: CSS Anchor Positioning

711 views
Skip to first unread message

Jonathan Watt

unread,
Dec 2, 2025, 4:45:31 PM (8 days ago) Dec 2
to dev-pl...@mozilla.org
As of today (2025-12-02) I intend to turn CSS Anchor Positioning on by default.
It has been developed behind the layout.css.anchor-positioning.enabled
preference. This feature has shipped in other WebKit/Blink-based browsers.

Bug to turn on by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1988225

Standard: https://drafts.csswg.org/css-anchor-position-1/

This feature was previously discussed in this "Intent to prototype" thread:
https://groups.google.com/a/mozilla.org/g/dev-platform/c/4cbytMKbHtg/m/dUfWuHB0AAAJ

一丝

unread,
Dec 3, 2025, 1:33:51 AM (8 days ago) Dec 3
to dev-pl...@mozilla.org, Jonathan Watt

It's great to see Firefox shipping CSS anchors, but I hope they can reduce some compatibility issues before shipping.

Is position-try-fallbacks included in this release? https://bugzilla.mozilla.org/show_bug.cgi?id=1987954
It appears many features remain unimplemented in Firefox; it would be helpful to have a list detailing them.

Chrome 144 introduced a series of updates to anchor behavior; Firefox should also have a roadmap.
https://chromium-review.googlesource.com/c/chromium/src/+/7076551

Additionally, I believe ship should provide full support for pseudo-elements beforehand, as this is a common use case for CSS anchors.

https://bugzilla.mozilla.org/show_bug.cgi?id=1993698#c2
- Compatibility issues with the `position-anchor` and `anchor-center` keywords.
```html
data:text/html;charset=UTF-8,<!DOCTYPE html>
<style>
.anchor {
  anchor-name: --a;
  background: pink;
  width: 50px;
  height: 50px;
}
.tooltip {
  font-family: arial, sans-serif;
  background: green;
  border: 2px solid red;
  margin: 0;
  position: fixed;
  position-area: bottom;
  position-anchor: --a;
  justify-self: anchor-center;
}
</style>
<div class="anchor"></div>
<div class="tooltip">
  tooltips tooltips
</div>
```



Emilio Cobos Álvarez

unread,
Dec 3, 2025, 7:07:40 AM (7 days ago) Dec 3
to 一丝, dev-pl...@mozilla.org, Jonathan Watt
This is only the initial release (think of it as an MVP), so yeah, expect further updates to follow soon.

Not a fully detailed list (Jonathan may be able to give a more comprehensive summary), but regarding your questions:
  • position-try-fallbacks are supported.
  • anchor-center alignment is going to be supported in the initial release (patch is in bug 1909339).
  • Similarly there are a couple bugs regarding position-area shrink-wrapping and such that we're dealing with and plan to include in the initial release.
  • Something that is not supported is the style/layout interleaving behavior (which allows you to transition between anchor() values). That is tracked in bug 1924226.
  • Similarly, position-try-order is not supported for now, tracked in bug 1989059.
  • Pseudo-elements can be anchored, is that what you mean? Implicit anchoring is changing a bit (see this CSSWG issue), so we don't think implicit anchoring blocks the initial release.
Thanks,
 -- Emilio

--
You received this message because you are subscribed to the Google Groups "dev-pl...@mozilla.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dev-platform...@mozilla.org.
To view this discussion visit https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/4c108f6b-7db8-44ce-9c58-17193ca027a7n%40mozilla.org.
Reply all
Reply to author
Forward
0 new messages