[css-position] Confusing conditions in "§4.1. Automatic Sizes of Absolutely-Positioned Boxes" (original) (raw)
https://drafts.csswg.org/css-position/#abspos-auto-size
↪ If its self-alignment property in the relevant axis is stretch
↪ If it is normal and the box is non-replaced and has no auto inset in the relevant axis
Its automatic size is its stretch-fit size.
↪ If its self-alignment property in the relevant axis is not stretch
↪ If it is normal and the box is replaced
↪ If it is normal and has at least one auto inset in the relevant axis
Its automatic size is its fit-content size.
The 3 last conditions are confusing, because:
- "If its self-alignment property in the relevant axis is not stretch" overlaps with the previous "If it is normal and the box is non-replaced and has no auto inset in the relevant axis" which has a different definition.
- "If it is normal and the box is replaced" and "If it is normal and has at least one auto inset in the relevant axis" are a subset of "If its self-alignment property in the relevant axis is not stretch" so they seem useless.
Seems it should just be
↪ If its self-alignment property in the relevant axis is stretch
↪ If it is normal and the box is non-replaced and has no auto inset in the relevant axis
Its automatic size is its stretch-fit size.
↪ Otherwise
Its automatic size is its fit-content size.