-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[layout] Consider stable scrollbars for container queries.
This implements the resolution at: w3c/csswg-drafts#10043 (comment) Basically we zero out scrollbars from the fragment-geometry if they are auto. Fixed: 346975763 Change-Id: Ic77b2a39f4830ff6dbbd080c7cc4f20734597821 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5727150 Reviewed-by: David Grogan <[email protected]> Commit-Queue: David Grogan <[email protected]> Cr-Commit-Position: refs/heads/main@{#1331243}
- Loading branch information
1 parent
0f052a7
commit cbf74ff
Showing
5 changed files
with
148 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
css/css-conditional/container-queries/scrollbar-container-units-block-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.container { | ||
display: inline-block; | ||
border: solid 3px cornflowerblue; | ||
width: 100px; | ||
height: 100px; | ||
container-type: size; | ||
} | ||
div > div { | ||
box-sizing: border-box; | ||
width: 200px; | ||
height: 100%; | ||
border: solid 10px orange; | ||
} | ||
</style> | ||
<div class="container" style="overflow-x: scroll;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-x: auto;"> | ||
<div style="height: 100px;"></div> | ||
</div> |
24 changes: 24 additions & 0 deletions
24
css/css-conditional/container-queries/scrollbar-container-units-block.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10043#issuecomment-2165291421"> | ||
<link rel="match" href="scrollbar-container-units-block-ref.html"> | ||
<style> | ||
.container { | ||
display: inline-block; | ||
border: solid 3px cornflowerblue; | ||
width: 100px; | ||
height: 100px; | ||
container-type: size; | ||
} | ||
div > div { | ||
box-sizing: border-box; | ||
width: 200px; | ||
height: 100cqh; | ||
border: solid 10px orange; | ||
} | ||
</style> | ||
<div class="container" style="overflow-x: scroll;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-x: auto;"> | ||
<div></div> | ||
</div> |
28 changes: 28 additions & 0 deletions
28
css/css-conditional/container-queries/scrollbar-container-units-inline-ref.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!DOCTYPE html> | ||
<style> | ||
.container { | ||
display: inline-block; | ||
border: solid 3px cornflowerblue; | ||
width: 100px; | ||
height: 100px; | ||
container-type: inline-size; | ||
} | ||
div > div { | ||
box-sizing: border-box; | ||
width: 100%; | ||
height: 200px; | ||
border: solid 10px orange; | ||
} | ||
</style> | ||
<div class="container" style="overflow-y: scroll;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-y: auto;"> | ||
<div style="width: 100px;"></div> | ||
</div> | ||
<div class="container" style="overflow-y: auto; scrollbar-gutter: stable;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-y: auto; scrollbar-gutter: stable;"> | ||
<div style="height: 50px;"></div> | ||
</div> |
30 changes: 30 additions & 0 deletions
30
css/css-conditional/container-queries/scrollbar-container-units-inline.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!DOCTYPE html> | ||
<link rel="help" href="https://github.com/w3c/csswg-drafts/issues/10043#issuecomment-2165291421"> | ||
<link rel="match" href="scrollbar-container-units-inline-ref.html"> | ||
<style> | ||
.container { | ||
display: inline-block; | ||
border: solid 3px cornflowerblue; | ||
width: 100px; | ||
height: 100px; | ||
container-type: inline-size; | ||
} | ||
div > div { | ||
box-sizing: border-box; | ||
width: 100cqw; | ||
height: 200px; | ||
border: solid 10px orange; | ||
} | ||
</style> | ||
<div class="container" style="overflow-y: scroll;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-y: auto;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-y: auto; scrollbar-gutter: stable;"> | ||
<div></div> | ||
</div> | ||
<div class="container" style="overflow-y: auto; scrollbar-gutter: stable;"> | ||
<div style="height: 50px;"></div> | ||
</div> |