w3c / w3c/csswg-drafts

[css-align] align-self / justify-self on abspos elements isn't back compatible?

Open
#7,599 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Closed Accepted by CSSWG Resolution Commenter Response Pending css-align-3
Dominant language
Bikeshed
Stars
4.9k
Forks
816
PR merge metrics
PR metrics pending

Description

Consider:

<div style="direction: ltr; width: 100px; border: solid lime 3px; position: relative;">
  <div style="direction: rtl; margin: 20px; border: solid hotpink 3px;">
    <img style="position: absolute; width: 10px; height: 10px; background: cornflowerblue;">
  </div>
</div>

https://drafts.csswg.org/css-align-3/#justify-abspos

justify-self Axis | The block’s containing block’s inline axis.

Today the static-pos of will be on the right - however I think what the current spec text is suggesting is that it'd be on the left? I.e. justify-self:auto -> justify-self:normal -> justify-self:start

I suspect this isn't intentional - likely "normal" needs to be interpreted as what the natural alignment of the static-pos rect is.

cc/ @tabatkins @fantasai

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked CSS Align section on justify-self for absolutely positioned elements, then compare its static-position wording with the supplied direction, margin, and positioning example. Done means the intended back-compatibility behavior is resolved and the specification text clearly describes how auto/normal alignment applies.

Written by the indexing model from the issue text.

Assessment

Tech stack
css
Domain
frontend
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.