Re: Var for scrollbar size

On 05/23/2016 04:02 PM, Tab Atkins Jr. wrote:
> On Mon, May 23, 2016 at 12:38 PM, Sebastian Zartner
> <sebastianzartner@gmail.com> wrote:
>> On 23 May 2016 at 19:48, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>>> Sure there is. For example, animating from 1scrollbar to 0 needs the
>>> intermediate values.
>>
>> Ok, animation could be a use case. Though is there actually a use case
>> for using the scrollbar size in animations?
>
> Of course; animating padding to/from 0 is a generic use-case.

... this seems rather contrived here.

>>> Or wanting to pad the area out a little bigger
>>> than the scrollbar width, so 1.2scrollbar or something.
>>
>> As the scrollbar size is something out of control of the author, they
>> probably would rather use a calc() expression in that case like e.g.
>> calc(scrollbar + 5px).
>
> Maybe, or maybe not.  People often use something that looks reasonable
> rather than something absolutely perfect/well-reasoned, and bumping up
> to a higher multiple of the scrollbar size can easily achieve
> reasonable results for "a little more padding there, the text is a
> little too close to the scrollbar". Same as people simply using a
> slightly higher 'em' value rather than explicitly busting out a calc()
> to add a set number of pixels to an existing length.  This is okay
> behavior!

Authors want to control spacing pretty exactly in most cases.
I can see wanting "match the scrollbar size" but not "match the scrollbar
size plus 2%". You can add on 2px or whatever seems appropriate -- I can't
think of a reason why you'd want it as a percentage of the scrollbar size.

~fantasai
who would like to see a layout that needs this, that can't otherwise be
solved with an invisible variant of 'overflow: scroll'

Received on Monday, 23 May 2016 21:10:26 UTC