From 980964d8f34226ecb44f4f578a2c72b14af34f14 Mon Sep 17 00:00:00 2001 From: MacDue Date: Fri, 22 Jul 2022 16:10:47 +0100 Subject: [PATCH] LibWeb: Add a default style for primitive progress bars This style is the same as what is used in WebKit/Blink, it is a bit ugly, but you're expected to override it. Adding more than a background color here could cause some issues, as sites don't expect to have to unset the styles. --- Userland/Libraries/LibWeb/CSS/Default.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Userland/Libraries/LibWeb/CSS/Default.css b/Userland/Libraries/LibWeb/CSS/Default.css index 149223e714..9c18409980 100644 --- a/Userland/Libraries/LibWeb/CSS/Default.css +++ b/Userland/Libraries/LibWeb/CSS/Default.css @@ -315,3 +315,24 @@ iframe { border: 2px inset; } filter: invert(100%); } } + +/* This is the same as default intrinsic size of a element */ +progress { + width: 300px; + height: 12px; +} + +/* The default progress-value/bar CSS below is the same as Blink/WebKit. + * Note: Setting any more than the backgrond-color may have unintended consequences, as sites don't expect to unset more than that. + */ + +progress::-webkit-progress-bar { + width: inherit; + height: inherit; + background-color: #808080; +} + +progress::-webkit-progress-value { + height: inherit; + background: #008000; +}