-
Notifications
You must be signed in to change notification settings - Fork 690
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-scrollbars] Add mechanism for disabling scrollbars #419
Comments
Note that the two discussions may still need to influence eachother, as if we end up wanting both, they may (or not) end up in the same property, and influence its name and the name of its values. |
Note that we have that value; it's called |
I don't agree this proposal amounts to a "convenient shorthand". We need this property to have a rational layered platform. There are two completely distinct underlying primitives, hiding the scrollbar UI and disabling user panning. "overflow: hidden" opinionatedly conflates them. As I said, the only two ways to change the look/functionality of the scrolling UI otherwise are A) small-clip-box-containing-larger-scroll-viewport madness, or B) reinvent touch gesture handlers in JS. That's a sign this is not simply a "convenience". |
When you get down to primitives, plenty of things aren't convenient anymore; you often have to reinvent bits that you've lost along the way. The reason I'm arguing that this isn't a "primitive" is because it gets rid of some of the methods for users to scroll the box, but not all of them. It's halfway down the stack. But arguing over which is more primitive isn't a fruitful exercise; if we can agree, great, but if we can't, belaboring the point doesn't get us anywhere (we're just slicing things differently). I'm still stuck on the fundamental usability issue I raised earlier - when you remove scrollbars, how are people supposed to scroll on devices without panning functionality? This is why I've been pushing back against this - it looks very easy for this to be very user-hostile when naively used on "mobile-first" designs without being usability-tested on desktops (particularly ones without a mousewheel, which at least allows vertical "panning").
Thus my earlier suggestion of having the value only hide scrollbars on devices where the UA knows that panning is a primary scrolling mechanism - phones and tablets, maybe some touch-focused laptops. Then maybe we can also have a less-conveniently-named value that actually turns off scrollbars all the time, which makes it clearer what the author's responsibilities are. |
The problem is OSes in general do not necessarily provide a hook to tell us whether a touchscreen, mousewheel or touchpad is present. We can confirm one exists once we get an input event, but prior to that we have no real idea (and we can never prove the negative). We'd be forced to rely on crude heuristics.
The main use I have in mind is precisely developers who want to manually provide an alternate scrollbar affordance (e.g. contact list big-letter scrollbar). Your proposal raises the risk of double-scrollbar glitches, then. You'd be forcing webdevs to detect whether the UA scrollbar is present or not in order to disable their superior bespoke scrollbar...
Well, that seems a bit complicated, but I guess I could tolerate that outcome if that's what can get consensus. |
In the event that we decide to go with the 2 different disabling values, it raises a new bikeshed. In naming these, we should keep in mind the primary use cases we each have in mind, to pick names that will appeal to each type of dev:
|
So now that #92 is resolved, is there a plan for hiding scrollbars completely? This is one of the main use cases for -webkit scrollbar styling in blink (it's possible we'd be willing to drop that feature if we had a standard solution to disabling UA scrollbars). |
So what we want is:
Right? I don't think this belongs in the From there, we could:
|
No, if you're providing an alternate scrollbar you'd just use Unless you want an alternate scroller for everyone, and allow panning-friendly devices to scroll in their normal way with UA-provided scrolling? With, I suppose, a passive scroll listener to update the alternate scroller as well? I could get down with this, I guess. Naming something like |
I think this would be really bad UX even on desktop. Mousewheel, trackpad, keyboard, selection autoscroll, drag-and-drop autoscroll, middle-click autoscroll and scroll-position historyitem restore ought to continue working as normal even if the scrollbar looks different, and each of those is very fined-tuned and basically intractable to reimplement identically in JS. IMO, the best practice is that every element supporting some variation on scrolling ought to be marked
Right, this is what I have in mind (panning, and every other non-scrollbar modality should keep working). I'm fine with the name |
How to implement a single line text editing |
The new CSS Scrollbars 'scrollbar-width' property with a value of 0 (or 'none' if we go that route), has the requested effect for this issue. <https://drafts.csswg.org/css-scrollbars-1/#scrollbar-width> That is, hidden scrollbars, but content remaining scrollable. label: #css-scrollbars-1 (Originally published at: http://tantek.com/2018/190/t2/) |
@Yaffle, here is a specified way to achieve the desired result: el {
white-space: nowrap;
overflow-inline: scroll;
scrollbar-width: none;
} But afaict from the title/op, this issue can be closed. Then we can move other panning/style scrollbar ui discussions for other/new filings. |
This functionality has been added through |
Split from the discussion of overflay scrollbars. Key bits of the argument:
I said:
@tabatkins said:
I said:
@tabatkins said:
@alexelias added:
I'd add that the concerns about misuse apply to all the extensible-web things we're doing (Houdini etc.). If we're every going to have a rational layered platform (eg. where scrollbars can be explained as a feature built on top of lower-level primitives), then we need to have knobs that let developers disable built-in behavior if favor of their own custom behavior. To minimize the risk we should just do our absolute best to ensure that all the common use cases are best solved by the built-in behavior.
The text was updated successfully, but these errors were encountered: