Skip to content

Commit

Permalink
Fix #9, #10 and re-order some attributes
Browse files Browse the repository at this point in the history
Missing notification icons in other platforms
Was applied only to windows/notification.css

Remove redundant close icon attributes and selectors
Above may have been done in the past but applies only to tab-close, see 820ee4f
New 2x close icon has been created for mac (and other uses, ie. HiDPI)

Remove background images from mac notifications
  • Loading branch information
fofajardo committed Sep 1, 2017
1 parent 9951cf9 commit bdf066f
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 128 deletions.
30 changes: 0 additions & 30 deletions src/chrome/browser/browser.css
Original file line number Diff line number Diff line change
Expand Up @@ -2208,21 +2208,11 @@ richlistitem[type~="action"][actiontype="switchtab"][selected="true"] > .ac-url-

.panel-promo-closebutton {
-moz-appearance: none;
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-image-region: rect(0, 16px, 16px, 0);
border: none;
-moz-margin-end: -10px;
margin-top: -5px;
}

.panel-promo-closebutton:hover {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

.panel-promo-closebutton:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

.panel-promo-closebutton > .toolbarbutton-text {
padding: 0;
margin: 0;
Expand Down Expand Up @@ -2540,8 +2530,6 @@ toolbar:not([mode="text"]):not([iconsize="small"]) #navigator-throbber {
/* Tabstrip close button */
.tabs-closebutton {
-moz-appearance: none;
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-image-region: rect(0, 16px, 16px, 0);
margin: 0px;
border: none;
outline: 0;
Expand All @@ -2553,14 +2541,6 @@ toolbar:not([mode="text"]):not([iconsize="small"]) #navigator-throbber {
-moz-padding-start: 2px !important;
}

.tabs-closebutton:hover {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

.tabs-closebutton:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

toolbarbutton.chevron {
list-style-image: url("chrome://global/skin/toolbar/chevron.gif") !important;
}
Expand Down Expand Up @@ -3130,17 +3110,7 @@ window:not([chromehidden~=toolbar]) #navigator-toolbox[iconsize=large][mode=icon
#addonbar-closebutton {
border: none;
padding: 0 5px;
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-appearance: none;
-moz-image-region: rect(0, 16px, 16px, 0);
}

#addonbar-closebutton:hover {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

#addonbar-closebutton:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

/* Status panel */
Expand Down
10 changes: 0 additions & 10 deletions src/chrome/browser/newtab/newTab.css
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,9 @@
-moz-appearance: none;
padding: 0;
border: none;
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-image-region: rect(0, 16px, 16px, 0);
-moz-user-focus: normal;
}

#newtab-undo-close-button:hover {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

#newtab-undo-close-button:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

#newtab-undo-close-button > .toolbarbutton-text {
display: none;
}
Expand Down
13 changes: 1 addition & 12 deletions src/chrome/global/alerts/alert.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,11 @@ label {
}

.alertCloseButton {
list-style-image: url("chrome://global/skin/icons/close.png");
-moz-appearance: none;
-moz-image-region: rect(0, 16px, 16px, 0);
padding: 4px 2px;
border: none !important;
}

.alertCloseButton > .toolbarbutton-text {
display: none;
}

.alertCloseButton:hover {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

.alertCloseButton:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

}
16 changes: 16 additions & 0 deletions src/chrome/global/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ window.dialog {
list-style-image: url("chrome://global/skin/icons/information-32.png");
}

.alert-dialog #info\.icon,
.alert-icon {
list-style-image: url("chrome://global/skin/icons/Warning.png");
}
Expand Down Expand Up @@ -343,4 +344,19 @@ label[disabled="true"]:-moz-system-metric(windows-classic) {

.close-icon:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

@media (min-resolution: 2dppx) {
.close-icon {
list-style-image: url("chrome://global/skin/icons/[email protected]");
-moz-image-region: rect(0, 32px, 32px, 0);
}

.close-icon:hover {
-moz-image-region: rect(0, 64px, 32px, 32px);
}

.close-icon:hover:active {
-moz-image-region: rect(0, 96px, 32px, 64px);
}
}
Binary file added src/chrome/global/icons/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/chrome/global/notification/close.png
Binary file not shown.
Binary file not shown.
Binary file removed src/chrome/global/notification/info-bar-background.png
Binary file not shown.
Binary file not shown.
34 changes: 19 additions & 15 deletions src/chrome/os_target/linux/notification.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

notification {
background-color: InfoBackground;
color: InfoText;
background-color: InfoBackground;
text-shadow: none;
}

notification[type="info"] {
background-color: -moz-Dialog;
color: -moz-DialogText;
background-color: -moz-Dialog;
}

notification[type="critical"] {
background-image: linear-gradient(rgb(212,0,0), rgb(152,0,0));
color: white;
background-image: linear-gradient(rgb(212,0,0), rgb(152,0,0));
}

.notification-inner {
Expand All @@ -30,33 +30,33 @@ notification[type="critical"] {
margin-bottom: 0 !important;
}

.messageText > .text-link {
color: inherit !important;
text-decoration: underline;
}

.messageImage {
width: 16px;
height: 16px;
-moz-margin-start: 6px;
-moz-margin-end: 1px;
}

.popup-notification-learnmore-link:not([href]) {
display: none;
}

/* Default icons for notifications */

.messageImage[type="info"] {
notification[type="info"] .messageImage {
list-style-image: url("moz-icon://stock/gtk-dialog-info?size=menu");
}

.messageImage[type="warning"] {
notification[type="warning"] .messageImage {
list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=menu");
}

.messageImage[type="critical"] {
notification[type="critical"] .messageImage {
list-style-image: url("moz-icon://stock/gtk-dialog-error?size=menu");
}

.messageCloseButton {
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
margin-top: 0;
margin-bottom: 0;
}
Expand All @@ -67,10 +67,14 @@ notification[type="critical"] {
max-width: 24em;
}

.popup-notification-button-container {
margin-top: 17px;
.popup-notification-learnmore-link {
margin-top: 1em !important;
}

.popup-notification-learnmore-link:not([href]) {
display: none;
}

.popup-notification-closeitem {
list-style-image: url("moz-icon://stock/gtk-close?size=menu");
.popup-notification-button-container {
margin-top: 17px;
}
53 changes: 20 additions & 33 deletions src/chrome/os_target/mac/notification.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,46 +11,47 @@ notification {

notification[type="info"] {
color: rgba(255,255,255,0.95);
background: url("chrome://global/skin/notification/info-bar-background.png") #404040 repeat-x top left;
background: #404040 repeat-x top left;
border-top: 1px solid #707070;
border-bottom: 1px solid #2a2a2a;
}

notification[type="warning"] {
color: rgba(0,0,0,0.95);
background: url("chrome://global/skin/notification/warning-bar-background.png") #ffc703 repeat-x top left;
background: #ffc703 repeat-x top left;
border-top: 1px solid #ffe970;
border-bottom: 1px solid #bf8a01;
}

notification[type="critical"] {
color: rgba(255,255,255,0.95);
background: url("chrome://global/skin/notification/critical-bar-background.png") #980000 repeat-x top left;
background: #980000 repeat-x top left;
border-top: 1px solid #e35959;
border-bottom: 1px solid #5d0000;
}

.messageText > .text-link {
color: inherit !important;
text-decoration: underline;
}

.messageImage {
width: 16px;
height: 16px;
margin: 0 4px;
}

.popup-notification-learnmore-link:not([href]) {
display: none;
}

/* Default icons for notifications */

.messageImage[type="info"] {
notification[type="info"] .messageImage {
list-style-image: url("chrome://global/skin/notification/info-icon.png");
}

.messageImage[type="warning"] {
notification[type="warning"] .messageImage {
list-style-image: url("chrome://global/skin/notification/warning-icon.png");
}

.messageImage[type="critical"] {
notification[type="critical"] .messageImage {
list-style-image: url("chrome://global/skin/notification/error-icon.png");
}

Expand All @@ -68,43 +69,20 @@ notification[type="critical"] {
-moz-appearance: none;
padding: 0;
margin: 0 2px;
list-style-image: url("chrome://global/skin/icons/close.png");
border: none;
-moz-image-region: rect(0, 16px, 16px, 0);
}

.messageCloseButton > .toolbarbutton-text {
display: none;
}

.messageCloseButton:hover {
-moz-image-region: rect(0, 32px, 16px, 16px);
}

.messageCloseButton:hover:active {
-moz-image-region: rect(0, 48px, 16px, 32px);
}

.messageCloseButton:-moz-focusring > .toolbarbutton-icon {
border-radius: 10000px;
box-shadow: 0 0 2px 1px -moz-mac-focusring,
0 0 0 2px -moz-mac-focusring inset;
}

@media (min-resolution: 2dppx) {
.messageCloseButton {
list-style-image: url("chrome://global/skin/icons/[email protected]");
-moz-image-region: rect(0, 32px, 32px, 0);
}

.messageCloseButton:hover {
-moz-image-region: rect(0, 64px, 32px, 32px);
}

.messageCloseButton:hover:active {
-moz-image-region: rect(0, 96px, 32px, 64px);
}

.messageCloseButton > .toolbarbutton-icon {
width: 16px;
}
Expand All @@ -116,6 +94,15 @@ notification[type="critical"] {
max-width: 24em;
}

.popup-notification-learnmore-link {
margin-top: 1em !important;
-moz-margin-start: 0 !important; /* override default label margin to match description margin */
}

.popup-notification-learnmore-link:not([href]) {
display: none;
}

.popup-notification-button-container {
margin-top: 17px;
}
Expand Down
Loading

0 comments on commit bdf066f

Please sign in to comment.