@@ -1847,7 +1847,6 @@ but non-experimental implementation is not recommended.
18471847
18481848 <div class=example>
18491849 This example exercises all the additional values of the 'scrollbar-gutter' property:
1850- * ''scrollbar-gutter: always force'' on the header/toolbar
18511850 * ''scrollbar-gutter: always'' on the scroll container
18521851 * ''scrollbar-gutter: match-parent'' on each row inside the scroll container
18531852
@@ -1863,7 +1862,7 @@ but non-experimental implementation is not recommended.
18631862
18641863<pre class="propdef partial">
18651864Name : scrollbar-gutter
1866- New Values : auto | [ [ stable | always ] && both-edges? && force? ] || match-parent
1865+ New Values : auto | [ [ stable | always ] && both-edges? ] || match-parent
18671866Applies to : all elements
18681867</pre>
18691868
@@ -1977,92 +1976,6 @@ The new values of this property have the following meaning:
19771976 and using <code> scrollbar-avoid: self</code> or <code> scrollbar-avoid: content</code> on the relevant children.
19781977 </div>
19791978
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-
20661979 <dt> <dfn>match-parent</dfn>
20671980 <dd>
20681981 On a [=block-level=] box whose parent has a [=scrollbar gutter=] (or gutters on both edges),
@@ -2231,6 +2144,8 @@ Recent Changes</h3>
22312144 (<a href="https://github.com/w3c/csswg-drafts/issues/7245">Issue 7245</a> )
22322145 <li> Change the 'line-clamp' shorthand syntax to allow omitting the 'max-lines' value
22332146 (<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> )
22342149 </ul>
22352150
22362151<h3 id="changes-l3">
0 commit comments