w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.5k stars 661 forks source link

[css-scroll-snap-2] scroll-start-target: auto doesn't match general meaning of auto #11173

Open DavMila opened 7 hours ago

DavMila commented 7 hours ago

The scroll-start-target spec specifies 2 keywords for the scroll-start-target property:

The use of auto in this way is a bit of a departure from what auto means in CSS, i.e. "the UA should do what it thinks is best."

Should we change auto to a different keyword? Here are a few we could consider: on-first-appearance or align or active or visible. My preference would be align.

DavMila commented 7 hours ago

FYI @flackr, @argyleink

argyleink commented 6 hours ago

time to bikeshed! lol. I do think a different value is better.

options?

  1. first-paint
  2. page-load
  3. me
  4. scroll-ready
  5. loaded
  6. on-first-appearance
  7. align
  8. active
  9. visible
  10. init
  11. here
flackr commented 5 hours ago

Since we have ideas that we might try to include all scroll-start-targets, we could consider something like include?

Or, we could consider other values we may want to eventually support. E.g. if we wanted to eventually have options that align with / explain scrolling to a fragment, we could consider what the names might be if we want to describe the ways that this is currently different from that and/or if we eventually wanted to be able to specify a scroll that was roughly equivalent to scrolling to a fragment.

In particular, scrolling to a fragment: