anchor() allows specifying percentage values, which interpolates between start and end.
This seems like something that can be simplified, since I think the basis of that will always be positive, since it depends on the anchor element's size in that axis. OTOH, WPT test anchor-parse-valid.html expect the min(50%, 100%) value to round trip.