Re: [css-position] sticky only along one axis

On Friday 2014-03-14 12:26 -0400, Zack Weinberg wrote:
> I just noticed that position:sticky is currently defined to make the
> box stick to the viewport along *both* axes.  For a use case I
> personally care about (http://hacks.owlfolio.org/header-survey/ -
> currently faking position:sticky with JS) only *vertical* stickiness
> is desired.  The table header should scroll horizontally with the rest
> of the table.
> 
> I think it would be consistent with other similar things (overflow,
> background-repeat) to allow "position: sticky-x" or similar.  I don't
> care how it is spelled.  Probably logical as well as physical axes
> should be allowed.

Do you not get this behavior if you specify only top or bottom and
leave both left and right auto (or vice-versa)?

I think it's worth answering this question relative both to
implementations (WebKit behind a prefix and Gecko behind a pref
that's enabled on nightly/aurora) and to the spec; I'm not sure how
solid the spec text in the css-position draft is yet.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Friday, 14 March 2014 19:30:02 UTC