From ef88386825b91d4ca910d28331f7000c08728a27 Mon Sep 17 00:00:00 2001 From: Jordan Scales Date: Sat, 18 Apr 2020 11:05:27 -0400 Subject: [PATCH] scrollbars --- ...utton-active.svg => button-down-active.svg | 0 dropdown-button.svg => button-down.svg | 0 button-left.svg | 8 ++++ button-right.svg | 8 ++++ button-up.svg | 8 ++++ docs/index.html | 9 +++- scrollbar-background.svg | 4 ++ style.css | 47 ++++++++++++++++++- 8 files changed, 81 insertions(+), 3 deletions(-) rename dropdown-button-active.svg => button-down-active.svg (100%) rename dropdown-button.svg => button-down.svg (100%) create mode 100644 button-left.svg create mode 100644 button-right.svg create mode 100644 button-up.svg create mode 100644 scrollbar-background.svg diff --git a/dropdown-button-active.svg b/button-down-active.svg similarity index 100% rename from dropdown-button-active.svg rename to button-down-active.svg diff --git a/dropdown-button.svg b/button-down.svg similarity index 100% rename from dropdown-button.svg rename to button-down.svg diff --git a/button-left.svg b/button-left.svg new file mode 100644 index 0000000..f31b886 --- /dev/null +++ b/button-left.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/button-right.svg b/button-right.svg new file mode 100644 index 0000000..ddab662 --- /dev/null +++ b/button-right.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/button-up.svg b/button-up.svg new file mode 100644 index 0000000..91f8d4f --- /dev/null +++ b/button-up.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/docs/index.html b/docs/index.html index 5bcc6ae..d7948a9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -87,7 +87,14 @@
- + +
+
+

This is some text

+

if there's enough of it

+

it should scroll

+
+
diff --git a/scrollbar-background.svg b/scrollbar-background.svg new file mode 100644 index 0000000..3770071 --- /dev/null +++ b/scrollbar-background.svg @@ -0,0 +1,4 @@ + + + + diff --git a/style.css b/style.css index b192956..eda87ab 100644 --- a/style.css +++ b/style.css @@ -317,7 +317,7 @@ select { -webkit-appearance: none; -moz-appearance: none; position: relative; - background-image: url("./dropdown-button.svg"); + background-image: url("./button-down.svg"); background-position: top 2px right 2px; background-repeat: no-repeat; } @@ -329,7 +329,7 @@ textarea:focus { } select:active { - background-image: url("./dropdown-button-active.svg"); + background-image: url("./button-down-active.svg"); } a { @@ -339,3 +339,46 @@ a { a:focus { outline: 1px dotted var(--link-blue); } + +#panel { + width: 168px; + height: 120px; + overflow-y: scroll; +} + +::-webkit-scrollbar { + width: 16px; +} + +::-webkit-scrollbar-track { + background-image: url("./scrollbar-background.svg"); +} + +::-webkit-scrollbar-thumb { + background-color: var(--button-face); + box-shadow: var(--border-raised-outer), var(--border-raised-inner); +} + +::-webkit-scrollbar-button:vertical:start { + height: 17px; + background-image: url("./button-up.svg"); +} +::-webkit-scrollbar-button:vertical:end { + height: 17px; + background-image: url("./button-down.svg"); +} +::-webkit-scrollbar-button:horizontal:start { + height: 17px; + background-image: url("./button-left.svg"); +} +::-webkit-scrollbar-button:horizontal:end { + height: 17px; + background-image: url("./button-right.svg"); +} + +/* +div::-webkit-scrollbar-thumb, +div::-webkit-scrollbar-button { + box-shadow: var(--border-raised-outer), var(--border-raised-inner); +} +*/