Skip to content

[css-spatial] Should position: fixed and postition: sticky support inset-back? #149

Open

Description

@khufu-dev

If so, should they keep their normal behaviors while remaining at their specified depth while scrolling?

.header {
  position: sticky;
  top: 0;
  inset-back: 1cm;
}

.help {
  position: fixed;
  bottom: 20px;
  inset-back: 1cm;
}

Related

Spec: https://webkit.github.io/explainers/css-spatial/

Activity

  1. fantasai commented on Oct 27, 2026

    @fantasai
    Contributor

    I don't know what it would mean for them to be sticky, since the z-axis is not a possible scrolling axis...

  2. parthpatelsj commented on Oct 27, 2026

    @parthpatelsj

    Thanks for the response! I think our original question was a little unclear. I wasn't suggesting sticky positioning along the Z-axis.

    a) position: sticky
    Can an element retain its normal sticky behavior along the Y-axis while also having a constant inset-back offset? I would assume yes?

    b) position: fixed

    Can inset-back apply to a fixed element when its containing block is within a spatial context?

    My assumption is that existing CSS rules for fixed positioning remain unchanged (normally relative to the viewport, or to an ancestor that establishes a fixed-position containing block, such as one with a transform). Spatial CSS would simply add the Z offset. Is that the intended behavior?

  3. fantasai commented on Nov 2, 2026

    @fantasai
    Contributor

    Can an element retain its normal sticky behavior along the Y-axis while also having a constant inset-back offset? I would assume yes?

    Yes, y-axis positioning is not affected by z-axis positioning, they are independent controls. =

    Can inset-back apply to a fixed element when its containing block is within a spatial context?

    Yes, although the way fixed elements attach to containing blocks is still an open area of discussion in the CSSWG (outside of spatial considerations).

    My assumption is that existing CSS rules for fixed positioning remain unchanged (normally relative to the viewport, or to an ancestor that establishes a fixed-position containing block, such as one with a transform). Spatial CSS would simply add the Z offset. Is that the intended behavior?

    Yes, exactly. Just keep in mind that the containing block is not necessarily the parent. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions