Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-overflow-5] ::scroll-marker should determine inherited interactivity from ::scroll-marker-group #11746

Open
flackr opened this issue Feb 19, 2025 · 1 comment

Comments

@flackr
Copy link
Contributor

flackr commented Feb 19, 2025

It's common practice to make the offscreen pages in a carousel inert, however, the ::scroll-marker pseudo-elements generated for them should not be. In general, it would make sense for them to inherit their interactivity from the ::scroll-marker-group as this is the control into which they are placed.

E.g. in the following example, only the current page is interactive, but the markers to go to the other pages are expected to be interactive.

<style>
.scroller {
  scroll-marker-group: after;
  overflow: auto;
  scroll-snap-type: x mandatory;
}
.page {
  interactivity: inert;
  @container scroll-state(snapped: inline) {
    interactivity: auto;
  }
}
.page::scroll-marker {
  counter-increment: page;
  content: counter(page);
}
</style>
<div class=scroller>
  <div class=page></div>
  <div class=page></div>
  <div class=page></div>
  <div class=page></div>
</div>
@flackr
Copy link
Contributor Author

flackr commented Feb 19, 2025

If actually inheriting from the scroll marker group is difficult, we could disallow interactivity on ::scroll-marker and have its used interactivity be that of the containing ::scroll-marker-group. This would mean that authors couldn't individually control the interactivity of the scroll markers, only the entire group, which doesn't seem like there's much of a need for. I suspect we could revisit this.

@flackr flackr added the Agenda+ label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant