W3C home > Mailing lists > Public > www-style@w3.org > May 2014

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

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 23 May 2014 11:11:56 -0700
Message-ID: <CAAWBYDDCGp-+B_yttViEwSDBNwTt4uu6Zd+o6Do34jn-maFyNQ@mail.gmail.com>
To: Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
Cc: www-style list <www-style@w3.org>
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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:51:27 UTC