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
In AutoLayout on iOS there is an issue with ambigous intrinsic size for multiline text. There is an ugly workaround using preferredMaxLayoutWidth which lives beside the constraint solver, as it cannot deal with this kind of problem.
How does GSS tackle this?
For GSS multiline text is the same as single line. We remeasure intrinsic values and update the system until we find that system is solved. In complex situations it may take 2-3 reflows to get it right (a lot of nested centering).
GSS (ab)uses the fact that absolutely positioned multiline elements collapse their width. Indeed there's certain non-determenism in undersconstrained systems, e.g. when both height and width is intrinsic. We try to avoid it by leaving one axis constrained, while another is left intrinsic. Due to how CSS text flow works, in 99% we constrain width and measure height.
Activity
Inviz commentedon Jun 8, 2015
For GSS multiline text is the same as single line. We remeasure intrinsic values and update the system until we find that system is solved. In complex situations it may take 2-3 reflows to get it right (a lot of nested centering).
GSS (ab)uses the fact that absolutely positioned multiline elements collapse their width. Indeed there's certain non-determenism in undersconstrained systems, e.g. when both height and width is intrinsic. We try to avoid it by leaving one axis constrained, while another is left intrinsic. Due to how CSS text flow works, in 99% we constrain width and measure height.