Chromium Code Reviews| Index: LayoutTests/scrollbars/custom-scrollbar-changing-style.html |
| diff --git a/LayoutTests/scrollbars/custom-scrollbar-changing-style.html b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e3fd4e83a4af8f5c618e4cfa8613d91beb74e9e2 |
| --- /dev/null |
| +++ b/LayoutTests/scrollbars/custom-scrollbar-changing-style.html |
| @@ -0,0 +1,26 @@ |
| +<!DOCTYPE html> |
| +<style> |
| +::-webkit-scrollbar { |
| + height: 10px; |
| + width: 10px |
| +} |
| +::-webkit-scrollbar-thumb { |
| + background: rgba(255,0,0,0.8); |
|
skobes
2014/11/07 17:54:41
Fix indentation.
MuVen
2014/11/07 18:31:19
Done.
|
| +} |
| +html { |
| + overflow-y: scroll; |
| +} |
| +</style> |
| +<div style="height:700px"></div> |
| +<script> |
| +var styleElement = document.createElement("style"); |
| +var sheet = document.head.appendChild(styleElement).sheet; |
| +function addRule(selector, css){ |
| + var propText = Object.keys(css).map(function(p){ |
| + return p+":"+css[p] |
| + }).join(";"); |
| + sheet.insertRule(selector + "{" + propText + "}", sheet.cssRules.length); |
| +}; |
| +document.body.offsetTop; |
| +addRule("::-webkit-scrollbar-thumb", {background: "rgba(13,53,178,0.8)",}); |
| +</script> |