Re: [csswg-drafts] [css-overflow-5][css-scroll-snap-2] Snapping and generating scroll-marker pseudo-elements from fragments (#10715)

> > 1. Note that the current spec uses [::nth-fragment](https://drafts.csswg.org/css-overflow-5/#selectordef-nth-fragment), however having a single element [inherit different styles per fragment](https://drafts.csswg.org/css-overflow-5/#selectordef-nth-fragment:~:text=This%20means%20that%20elements%20split%20between%20fragment%20boxes%20may%20have%20different%20styles%20for%20different%20parts%20of%20the%20element) introduces significant implementation complexity. As such, we would propose initially resolving to go with a single ::fragment style (i.e. the syntax mentioned in the [inline issue](https://drafts.csswg.org/css-overflow-5/#issue-978c73c1)) [↩](#user-content-fnref-1-ebc26bcde0bfad8bbc5de65798fe150b)
> 
> That would be pretty similar to `::first-line`, yes.

I guess unlike `::first-line` all content inherits from `::fragment` since it is all in one of the fragments.

> For the single `::fragment` case, would you then do inheritance from `::fragment` into the elements laid out into fragments at style recalc time, reflected in getComputedStyle(), or keep a separate set of styles for layout like is done for `::first-line`?

I suspect we'd do inheritance from `::fragment` into the elements at style recalc time, but I'm not sure I understand the differences and would welcome guidance here. @bfgeek had concerns with the original nth-fragment as an individual element would have one fragment inherit from one rule and a different one from a different rule, perhaps they can add more detail here?

-- 
GitHub Notification of comment by flackr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10715#issuecomment-2315749558 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 28 August 2024 16:04:06 UTC