Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: LayoutTests/scrollbars/custom-scrollbar-changing-style.html

Issue 702913002: Updating custom scrollbar style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review comments by rune Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698