Bug 240103 - flex-basis wont transition if a value is percentage
Summary: flex-basis wont transition if a value is percentage
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Animations (show other bugs)
Version: Safari 15
Hardware: Unspecified macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-04 17:53 PDT by rhys
Modified: 2022-05-11 06:12 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description rhys 2022-05-04 17:53:50 PDT
MacOs 12.2.1 (safari 15.3) / iPad OS 15.0

Percentages in flex-basis cause transition to stop working.

The following used to work and still does on other browsers:

```
div {
  flex-basis: min(200px, 33%);
  transition: all ease-out .25s;
}
div:hover {
  flex-basis: 300px;
}
```

The problem isn't with using min because:

The following also doesnt work:

```
div {
  flex-basis: 33%;
  transition: all ease-out .25s;
}
div:hover {
  flex-basis: 300px;
}
```

While this does:

```
div {
  flex-basis: flex-basis: min(200px,500px);
  transition: all ease-out .25s;
}
div:hover {
  flex-basis: 300px;
}
```

Also using the 1st example and width instead of flex-basis transitions fine even tho the min contains a percentage
Comment 1 Antoine Quint 2022-05-11 05:06:22 PDT
Thanks for filing this report. Could you write a complete testcase that shows the regression here?
Comment 2 Radar WebKit Bug Importer 2022-05-11 05:06:38 PDT
<rdar://problem/93090931>
Comment 3 Antoine Quint 2022-05-11 06:12:08 PDT
Could you also check with Safari Technology Preview if you can still reproduce the issue?

I've attempted to write a simple demo that transitions flex-basis from a percentage value to a px value and it worked fine for me.