Created
November 18, 2016 09:56
-
-
Save rexboy7/44a90eec108fb3f665fda069b324e15e to your computer and use it in GitHub Desktop.
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
diff --git a/browser/themes/shared/commonProgressmeter.inc.css b/browser/themes/shared/commonProgressmeter.inc.css | |
new file mode 100644 | |
index 0000000..2c7a097 | |
--- /dev/null | |
+++ b/browser/themes/shared/commonProgressmeter.inc.css | |
@@ -0,0 +1,62 @@ | |
+/*** Common-styled progressmeter ***/ | |
+.downloadProgress { | |
+ height: 8px; | |
+ border-radius: 1px; | |
+ margin: 2px 4px 2px 6px; | |
+ | |
+ /* for overriding rules in progressmeter.css */ | |
+ -moz-appearance: none; | |
+ border: 0; | |
+ background-color: transparent; | |
+ min-width: 128px; | |
+ min-height: 8px; | |
+} | |
+ | |
+.downloadProgress[mode="undetermined"] { | |
+ /* for overriding rules on global.css in Linux. */ | |
+ -moz-binding: url("chrome://global/content/bindings/progressmeter.xml#progressmeter"); | |
+} | |
+ | |
+.downloadProgress > .progress-bar { | |
+ background-color: Highlight; | |
+ | |
+ /* for overriding rules in progressmeter.css */ | |
+ -moz-appearance: none; | |
+} | |
+ | |
+.downloadProgress > .progress-remainder { | |
+ border: solid #cfcfcf; | |
+ border-width: 1px 1px 1px 0; | |
+ background-color: #ebebeb; | |
+} | |
+ | |
+.downloadProgress[value="0"] > .progress-remainder { | |
+ border-width: 1px 1px 1px 1px; | |
+} | |
+ | |
+.downloadProgress > .progress-bar[mode="undetermined"] { | |
+ /* Create a gradient with 2 identical pattern, and enlarge the size to 200%. | |
+ This allows us to animate background-position with percentage. */ | |
+ background-image: linear-gradient(90deg, Highlight 0%, | |
+ #72b8fa 25%, | |
+ Highlight 50%, | |
+ #72b8fa 75%, | |
+ Highlight 100%); | |
+ | |
+ background-size: 200% 100%; | |
+ animation: slideX 5s linear infinite; | |
+ | |
+} | |
+ | |
+.downloadProgress > .progress-remainder[mode="undetermined"] { | |
+ border: none; | |
+} | |
+ | |
+@keyframes slideX { | |
+ 0% { | |
+ background-position: 100% 0%; | |
+ } | |
+ 100% { | |
+ background-position: 0% 0%; | |
+ } | |
+} | |
diff --git a/browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css b/browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css | |
index 6d7629d..eb3ecb4 100644 | |
--- a/browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css | |
+++ b/browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css | |
@@ -151,3 +151,12 @@ | |
.downloadIconRetry > .button-box > .button-icon { | |
list-style-image: url("chrome://browser/skin/panel-icons.svg#retry"); | |
} | |
+ | |
+/*** Progressmeter ***/ | |
+%include ../commonProgressmeter.inc.css | |
+ | |
+@item@[state="4"] .progress-bar, | |
+@item@[state="4"] > .progress-bar[mode="undetermined"] { | |
+ background-image: none; | |
+ background-color: #858585; | |
+} | |
diff --git a/browser/themes/shared/downloads/downloads.inc.css b/browser/themes/shared/downloads/downloads.inc.css | |
index 52083ec..a7c23f1 100644 | |
--- a/browser/themes/shared/downloads/downloads.inc.css | |
+++ b/browser/themes/shared/downloads/downloads.inc.css | |
@@ -393,3 +393,12 @@ richlistitem[type="download"] > .downloadMainArea { | |
-moz-margin-start: 64px; | |
-moz-margin-end: 16px; | |
} | |
+ | |
+/*** Progressmeter ***/ | |
+%include ../commonProgressmeter.inc.css | |
+ | |
+@item@[state="4"] .progress-bar, | |
+@item@[state="4"] > .progress-bar[mode="undetermined"] { | |
+ background-image: none; | |
+ background-color: #858585; | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment