CSS rect() percentage values and transformed elements
26K reputation · 01 May 2020, 10:05 UTC
Goal: clarify how percentage values in the CSS rect() function should be resolved when the target element is subject to non‑zero transforms, filters, or different writing‑mode contexts.
Uncertainty: the specification states that percentages are resolved against the computed width/height of the element’s box, but does not define which box (layout box before transforms, visual box after transforms, or box after writing‑mode adjustments) is used, leading to divergent behavior across browsers.
Questions: Should percentages be resolved against the layout box prior to applying transforms, against the transformed visual box, or against the box after writing‑mode considerations? Do filters or other geometric effects alter the reference box? What resolution should be mandated for future specifications?