-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebKit export of https://bugs.webkit.org/show_bug.cgi?id=244494
- Loading branch information
1 parent
7b682ab
commit 520314b
Showing
4 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
css/css-scrollbars/scrollbar-color-scheme-dynamic-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,34 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
color-scheme: dark; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-gutter: stable; | ||
flex: 0 0; | ||
overflow: auto; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
|
||
<div id="one" class="container"> | ||
<div class="content"></div> | ||
</div> |
23 changes: 23 additions & 0 deletions
23
css/css-scrollbars/scrollbar-color-scheme-dynamic-scroll-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,23 @@ | ||
<!doctype html> | ||
<style> | ||
:root { | ||
color-scheme: dark; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
overflow: scroll; | ||
} | ||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: scroll; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
</style> | ||
<div class="container"></div> |
35 changes: 35 additions & 0 deletions
35
css/css-scrollbars/scrollbar-color-scheme-dynamic-scroll.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,35 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<title>Dynamically set color-scheme and ensure scrollbars update when overflow scroll</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="match" href="scrollbar-color-scheme-dynamic-scroll-ref.html" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
:root { | ||
color-scheme: light; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
overflow: scroll; | ||
} | ||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: scroll; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
</style> | ||
<div class="container"></div> | ||
<script> | ||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
document.documentElement.style.colorScheme = 'dark'; | ||
|
||
takeScreenshot(); | ||
})); | ||
</script> |
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,45 @@ | ||
<!doctype html> | ||
<html class="reftest-wait"> | ||
<title>Dynamically set color-scheme and ensure scrollbars update</title> | ||
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" /> | ||
<link rel="match" href="scrollbar-color-scheme-dynamic-ref.html" /> | ||
<script src="/common/reftest-wait.js"></script> | ||
<style> | ||
:root { | ||
color-scheme: light; | ||
} | ||
body { | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 200vw; | ||
height: 200vh; | ||
} | ||
|
||
.container { | ||
scrollbar-gutter: stable; | ||
overflow: auto; | ||
flex: 0 0; | ||
height: 200px; | ||
min-width: 200px; | ||
margin: 1px; | ||
padding: 0px; | ||
border: none; | ||
background: deepskyblue; | ||
} | ||
|
||
.content { | ||
height: 300px; | ||
width: 300px; | ||
background: red; | ||
} | ||
</style> | ||
<div id="one" class="container"> | ||
<div class="content"></div> | ||
</div> | ||
<script> | ||
requestAnimationFrame(() => requestAnimationFrame(() => { | ||
document.documentElement.style.colorScheme = 'dark'; | ||
|
||
takeScreenshot(); | ||
})); | ||
</script> |