Skip to content

[css-overflow] scrollLeft and scrollTop as CSS properties? #9956

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

Closed
ByteEater-pl opened this issue Feb 14, 2024 · 1 comment
Closed

[css-overflow] scrollLeft and scrollTop as CSS properties? #9956

ByteEater-pl opened this issue Feb 14, 2024 · 1 comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered.

Comments

@ByteEater-pl
Copy link

Why aren't scrollLeft and scrollTop CSS properties? They're about presentation in interactive visual media, so it seems appropriate. And declarative animation with CSS would be possible, in a way that's uniform (and often needs to be combined) with other properties, without resorting to requestAnimationFrame, as currently (and that only for a few years; there was no good, widely implemented way before).

@tabatkins
Copy link
Member

Because they're controlled directly by the user. This would put them, at best, in the same awkward spot that resize is, where it has to reflect the user's actions by writing them into inline style, which will usually win in the cascade.

Affecting the initial scroll position is a different thing, and generally fine - see the 'scroll-start' property proposal.

@tabatkins tabatkins added the Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. label Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered.
Projects
None yet
Development

No branches or pull requests

2 participants