@@ -1847,7 +1847,6 @@ but non-experimental implementation is not recommended.
1847
1847
1848
1848
<div class=example>
1849
1849
This example exercises all the additional values of the 'scrollbar-gutter' property:
1850
- * ''scrollbar-gutter: always force'' on the header/toolbar
1851
1850
* ''scrollbar-gutter: always'' on the scroll container
1852
1851
* ''scrollbar-gutter: match-parent'' on each row inside the scroll container
1853
1852
@@ -1863,7 +1862,7 @@ but non-experimental implementation is not recommended.
1863
1862
1864
1863
<pre class="propdef partial">
1865
1864
Name : scrollbar-gutter
1866
- New Values : auto | [ [ stable | always ] && both-edges? && force? ] || match-parent
1865
+ New Values : auto | [ [ stable | always ] && both-edges? ] || match-parent
1867
1866
Applies to : all elements
1868
1867
</pre>
1869
1868
@@ -1977,92 +1976,6 @@ The new values of this property have the following meaning:
1977
1976
and using <code> scrollbar-avoid: self</code> or <code> scrollbar-avoid: content</code> on the relevant children.
1978
1977
</div>
1979
1978
1980
- <dt> <dfn>force</dfn>
1981
- <dd>
1982
- When the ''scrollbar-gutter/force'' keyword is present
1983
- ''scrollbar-gutter/stable'' and ''scrollbar-gutter/always'' take effect
1984
- when 'overflow' is ''overflow/visible'' , ''overflow/hidden'' or ''overflow/clip''
1985
- in addition ''overflow/auto'' or ''overflow/scroll'' .
1986
- This does not cause a scrollbar to be displayed, only a <a>scrollbar gutter</a> .
1987
-
1988
- <div class=example>
1989
- This value enables authors to reserve
1990
- the same amount of space on the edges of an element that is adjacent to a scroller
1991
- as is being reserved in the scroller itself,
1992
- so that their content would visually line up.
1993
- The same effect could be achieved by adding padding for classic scrollbars and none for overlay scrollbars,
1994
- but without this there is no reliable way for authors to know if they should be adding that padding,
1995
- and if so how much.
1996
-
1997
- A concrete example can be seen (at the time of writing) in the UI of Gmail:
1998
- it attempts, not always successfully,
1999
- to line up the controls in the toolbar above the list of mails with those in the list of mails.
2000
- Here are two screenshots,
2001
- one with classic scrollbars turned on (at the OS level),
2002
- where Gmail correctly guesses how much padding it should be adding to the toolbar above the list,
2003
- and one with overlay scrollbars turned on,
2004
- where Gmail incorrectly adds padding,
2005
- throwing things out of alignment
2006
- (orange dotted line added manually to highlight the point under discussion).
2007
-
2008
- <figure>
2009
- <figcaption> The Gmail UI with classic scrollbars</figcaption>
2010
- <img srcset="images/gmail-classic.png 2x"
2011
- alt="
2012
- Icons in and out of the scroller are properly aligned:
2013
- those in the scroller are shifted left from the right edge of their container due to the scrollbar
2014
- while those outside of it are shifted left by the same amount through padding.">
2015
- </figure>
2016
-
2017
- <figure>
2018
- <figcaption> The Gmail UI with overlay scrollbars</figcaption>
2019
- <img srcset="images/gmail-overlay.png 2x"
2020
- alt="
2021
- Icons in and out of the scroller are not aligned:
2022
- those in the scroller are flush to the right edge of the container
2023
- while those outside of it are shifted left due to unnecessary padding.">
2024
- </figure>
2025
-
2026
- Creating this spacing in the toolbar
2027
- using ''scrollbar-gutter: stable force'' rather than padding
2028
- would keep icons in alignment in both cases,
2029
- as well as on systems where the scrollbar has an atypical size.
2030
- </div>
2031
-
2032
- Issue: It is because of this value that the property has been be made to apply to all elements,
2033
- rather than merely to [=scroll containers=] ,
2034
- so that it can apply to ''overflow: visible'' elements as shown in the example.
2035
- This could pause implementations difficulties,
2036
- as user agents cannot just rely on existing code to place the gutter,
2037
- since they may have to do so on elements which previously could not have one.
2038
- Restricting it to all elements where 'overflow' applies
2039
- would probably have no negative effect on use cases
2040
- and could make implementation easier;
2041
- however, even that may still be more difficult
2042
- that limiting it to [=scroll containers=] .
2043
-
2044
- Issue: In addition to the implementation challenges mentioned above,
2045
- it is not clear that this value solves the problem as reliably as it intends to.
2046
- As the size and side of the scrollbar and its gutter are UA defined,
2047
- they may vary between different elements.
2048
- Since the appearance and position of scrollbars are up to the user agent,
2049
- there is no limit to the list of properties that might influence them.
2050
- It is probable that setting properties such as 'direction' (via setting the HTML <a for=HTMLElement attribute>dir</a> attribute)
2051
- or 'scrollbar-width'
2052
- could give enough context to the user agent to know how it would create a scrollbar on that element
2053
- if it were scrollable,
2054
- and therefore to create a gutter of the same size at the right place,
2055
- but it cannot be guaranteed.
2056
-
2057
- Issue: In early iterations of the specification,
2058
- this value was the only way to achieve the effect described in the example.
2059
- However, since then, ''scrollbar-gutter: stable'' has been made to apply to ''overflow: hidden'' elements.
2060
- While applying ''overflow: hidden'' has other effects which may be undesirable in that context,
2061
- the combination of ''scrollbar-gutter: stable'' and ''overflow: hidden''
2062
- does add spacing in the same way as ''scrollbar-gutter: stable force'' ,
2063
- and may prove to be a sufficient workaround,
2064
- particularly considering the other issues described above.
2065
-
2066
1979
<dt> <dfn>match-parent</dfn>
2067
1980
<dd>
2068
1981
On a [=block-level=] box whose parent has a [=scrollbar gutter=] (or gutters on both edges),
@@ -2231,6 +2144,8 @@ Recent Changes</h3>
2231
2144
(<a href="https://github.com/w3c/csswg-drafts/issues/7245">Issue 7245</a> )
2232
2145
<li> Change the 'line-clamp' shorthand syntax to allow omitting the 'max-lines' value
2233
2146
(<a href="https://github.com/w3c/csswg-drafts/issues/9368">Issue 9368</a> )
2147
+ <li> Dropped the tentative <code> force</code> value for the 'scrollbar-gutter' property.
2148
+ (<a href="https://github.com/w3c/csswg-drafts/issues/9815">Issue 9815</a> )
2234
2149
</ul>
2235
2150
2236
2151
<h3 id="changes-l3">
0 commit comments