Hi all

Last night I committed a tweak to resolve percentages for line-height early, when parsed. This became possible after a previous change in which I made sure that percentages for font-size are also resolved early.

The benefit, as mentioned in the commit message: a reduction of the amount of non-cacheable PercentLength instances, replaced by cached FixedLengths. A small tweak, since I don't think it saves all that much. Then again, every little bit helps...

Now while going over it again, and trying to do the same for background-position, I noticed that there is currently a testcase -- IIRC, one I added myself when implementing the background-position shorthand-- where a specified value of "0.5" is expected to yield a percentage... After my changes, it yields an absolute value of 500mpt. So I re-read the Rec on this one, and it seems the first interpretation is wrong. If I take the spec literally, then a value of "0.5" would actually be a length (and thus equal to "0.5px"), so the 500mpt is correct (when using the default source resolution of 72dpi).

Before I commit, I thought I'd check to see if anyone disagrees with the above behavior.



Cheers

Andreas

Reply via email to