Skip to content

[css-view-transitions-1] What's the point of position: fixed in ::view-transition? #12116

Closed

Description

@emilio

https://drafts.csswg.org/css-view-transitions-1/#snapshot-containing-block-concept says:

The snapshot containing block is considered to be an absolute positioning containing block and a fixed positioning containing block for ::view-transition and its descendants.

Then https://drafts.csswg.org/css-view-transitions-1/#ua-styles:

:root::view-transition {
  position: fixed;
  inset: 0;
}

but afaict that position: fixed is just confusing, and behaving exactly the same as position: absolute, since the snapshot CB is a position: fixed containing block, right?

Should we change it just for clarity? Is it just an historical artifact?

cc @noamr @BorisChiou @vmpstr

Activity

  1. moved this from Regular agenda to Tuesday Afternoon in CSSWG August 2025 meeting agendaon Aug 18, 2025
  2. css-meeting-bot commented on Aug 19, 2025

    @css-meeting-bot
    Member

    The CSS Working Group just discussed [css-view-transitions-1] What's the point of position: fixed in `::view-transition`?, and agreed to the following:

    • RESOLVED: `::view-transition` pseudo-element uses `position: absolute` instead `position: fixed` in the UA stylesheet
    The full IRC log of that discussion <ntim> emilio: basically the UA stylesheet has a rule where the VT pseudo is position: fixed
    <ntim> emilio: a bit odd because the snapshot containing block per-spec is a fixedpos CB as well
    <ntim> emilio: so that means abspos and fixpos are identical
    <ntim> ...Is there anything I'm missing or should it be abspos?
    <ntim> flackr: how does it work with scroll?
    <ntim> emilio: it's the same because snapshot CB is fixed as well
    <ntim> noamr: I don't have context
    <ntim> noamr/flackr: probably no reason
    <ntim> emilio: should we resolve to make it abspos?
    <ntim> noamr: lets do it
    <ntim> RESOLVED: `::view-transition` pseudo-element uses `position: absolute` instead `position: fixed` in the UA stylesheet
    <ntim> flackr: might have to be `!important` for scoped VT
    <flackr> s/`!important`/important
  3. added a commit that references this issue on Aug 19, 2025
    03fa01a
  4. added a commit that references this issue on Sep 10, 2025
    65c2d5f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions