You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Per the spec definition of translate, we resolve its percentage by containing block:
relative to the width of the containing block (for the first value) or the height (for the second value)
Here, we use containing block. However, for transform property, we use its reference box to resolve the percentage:
refer to the size of reference box
The containing block has a special meaning, I think, based on the spec of visual formatting model. It may refer to the content edge or padding edge, based on its position value. I checked the implmentation of Blink and Gecko, and it seems both use transform-box (default: view-box) as the reference box for both transform and translate. So my suggestion is to update how we resolve the percentage for translate. i.e. Use reference box, instead of containing block.
The text was updated successfully, but these errors were encountered:
Thanks for the PR. Yes we should be consistent with transform.
BorisChiou
changed the title
[css-transforms-2] the reference box for resolving percentage on translate
[css-transforms-2] The reference box for resolving percentage on translate
Aug 13, 2019
Per the spec definition of
translate
, we resolve its percentage by containing block:Here, we use containing block. However, for
transform
property, we use its reference box to resolve the percentage:The containing block has a special meaning, I think, based on the spec of visual formatting model. It may refer to the content edge or padding edge, based on its
position
value. I checked the implmentation of Blink and Gecko, and it seems both usetransform-box
(default: view-box) as the reference box for bothtransform
andtranslate
. So my suggestion is to update how we resolve the percentage fortranslate
. i.e. Use reference box, instead of containing block.The text was updated successfully, but these errors were encountered: