W3C home > Mailing lists > Public > www-style@w3.org > January 2016

Re: [css-snappoints][css-scroll-snap] Does scroll-snap-align applies to pseudo-elements?

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 25 Jan 2016 11:20:50 -0800
Message-ID: <CAAWBYDDfHW_v1X2TZeKGpraNjGmw04GKm9TcJt=OsytJaSRAfg@mail.gmail.com>
To: Florian Rivoal <florian@rivoal.net>
Cc: CSS public list <www-style@w3.org>
On Sun, Jan 24, 2016 at 4:59 AM, Florian Rivoal <florian@rivoal.net> wrote:
> The spec(s) do not explicitly allow scroll-snap-align and related properties on pseudo-elements, but I see no particular difficulty in allowing them, and it seems useful.
>
> I think they should at least work on the generated content ::before and ::after pseudos,

Yes, ::before/::after automatically work with all properties unless
explicitly specified otherwise.  (Pseudo should make this clearer.)

> but I'd also be in favor of making it apply to all pseudo elements. As long as something has a box, we should have all we need to make things work.

Yeah, but it has to be tree-abiding, or else it's unpredictable *how
many* snap-points it generates.  This rules out ::first-letter and
::first-line, as well as all the highlight pseudos like
::spelling-error.  This is the same reasoning that rules out
background-image and friends - it's unpredictable how many boxes the
pseudo-element will generate, as it depends intimately on the markup
it's applying to, and so we avoid any property that depends on or
visually exposes the number of boxes.

~TJ
Received on Monday, 25 January 2016 19:21:38 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:56 UTC