Re: [css-position] Vertical writing mode should be taken into account for over-constrained position relative and sticky elements.

On Thu, May 22, 2014 at 1:52 PM, Viatcheslav Ostapenko
<sl.ostapenko@samsung.com> wrote:
> Hi,
>
>   Current specification for position relative takes into account  text
> direction for horizontally over-constrained elements:
>
> "If neither ‘left’ nor ‘right’ is ‘auto’, the position is over-constrained,
> and one of them has to be ignored. If the ‘direction’ property of the
> containing block is ‘ltr’, the value of ‘left’ wins and ‘right’ becomes
> -‘left’. If ‘direction’ of the containing block is ‘rtl’, ‘right’ wins and
> ‘left’ is ignored."
>
>   Sticky positioning behavior is implemented similar to relative positioning
> and also ignores right or left edge offset on base of text direction for
> horizontally over-constrained elements.
>
>   But if element is vertically over-constrained then only bottom edge is
> always ignored:
>
> "If neither ‘top’ and ‘bottom’ is ‘auto’, ‘bottom’ is ignored (i.e., the
> used value of ‘bottom’ will be minus the value of ‘top’)."
>
>   It seems would be logical to take writing mode into account and ignore top
> edge if writing mode is " bottom-to-top" .
>
> https://codereview.chromium.org/267063007/#msg2
> https://bugzilla.mozilla.org/show_bug.cgi?id=979602#c17

True.  Rather than referring to 'direction' and its values directly,
one can simply ask which of 'left' or 'right' correspond to the start
direction in the x-axis, and define the behavior that way.  That
handles everything correctly wrt direction and writing-mode.

~TJ

Received on Friday, 23 May 2014 18:12:43 UTC