Treat align-self: normal as stretch on flex items (#33314)

According to https://drafts.csswg.org/css-align/#align-flex
It was being treated as `auto` instead.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2024-09-05 13:15:41 +02:00 committed by GitHub
parent 8263fe5495
commit 37e1c3385e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 39 additions and 1 deletions

View file

@ -247,7 +247,8 @@ impl FlexContainerConfig {
fn align_for(&self, align_self: AlignSelf) -> AlignItems {
let value = align_self.0 .0.value();
let mapped_value = match value {
AlignFlags::AUTO | AlignFlags::NORMAL => self.align_items.0,
AlignFlags::AUTO => self.align_items.0,
AlignFlags::NORMAL => AlignFlags::STRETCH,
_ => value,
};
AlignItems(mapped_value)