- From: Alan Stearns <stearns@adobe.com>
- Date: Sat, 18 Jan 2014 01:04:05 +0000
- To: Tab Atkins Jr. <jackalmage@gmail.com>
- CC: www-style list <www-style@w3.org>
On 1/15/14, 5:00 PM, "Alan Stearns" <stearns@adobe.com> wrote: >On 1/15/14, 4:34 PM, "Alan Stearns" <stearns@adobe.com> wrote: > >> >> >>On 1/15/14, 3:26 PM, "Tab Atkins Jr." <jackalmage@gmail.com> wrote: >>> >>>Gosh, actually writing these out the serialization rules in full is >>>more complicated than I thought. > >How about this: > >1. Start with the two components from the computed value as (percentage, >length), (percentage, length) >2. Replace 0%/50%/100% percentages with their keywords For some reason I was thinking that center could take an offset. So this should actually be: 2a. Replace 0%/100% with their keywords. 2b. Replace 50% with ‘center’ if the length is zero. And then end-centric offsets change sign, as the edge they are offset from just flipped: 2c. If a component uses the ‘bottom’ or ‘right’ keyword, flip the sign on the length. >3. If a length is zero, omit this offset >4. If either component still consists of (percentage, length) convert >those components to calc(percentage + length) >5. If either component consists of (top, length) or (left, length) omit >top and/or left >6. If one component consists of (center) and the other contains a keyword, >omit one (center) component >7. Write out the values that remain as a space-separated list > >
Received on Saturday, 18 January 2014 01:04:36 UTC