diff --git a/browser/base/content/browser.css b/browser/base/content/browser.css
index f5aad31f2aa..950adcef163 100644
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -829,23 +829,15 @@ html|*#gcli-output-frame,
transition: none;
}
-.toolbarbutton-badge[badge]:not([badge=""])::after {
- content: attr(badge);
-}
-
-toolbarbutton[type="badged"] {
- -moz-binding: url("chrome://browser/content/urlbarBindings.xml#toolbarbutton-badged");
-}
-
toolbarbutton[type="socialmark"] {
-moz-binding: url("chrome://browser/content/socialmarks.xml#toolbarbutton-marks");
}
-toolbarbutton[type="badged"] > .toolbarbutton-badge-container > .toolbarbutton-icon,
+toolbarbutton.badged-button > .toolbarbutton-badge-container > .toolbarbutton-icon,
toolbarbutton[type="socialmark"] > .toolbarbutton-icon {
max-width: 16px;
}
-toolbarpaletteitem[place="palette"] > toolbarbutton[type="badged"] > .toolbarbutton-badge-container > .toolbarbutton-icon {
+toolbarpaletteitem[place="palette"] > toolbarbutton.badged-button > .toolbarbutton-badge-container > .toolbarbutton-icon {
max-width: 32px;
}
diff --git a/browser/base/content/urlbarBindings.xml b/browser/base/content/urlbarBindings.xml
index 533a42bf1df..f0a9893b8c6 100644
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -2581,20 +2581,4 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/browser/components/customizableui/CustomizableWidgets.jsm b/browser/components/customizableui/CustomizableWidgets.jsm
index 792018afe75..07bae5e6ca2 100644
--- a/browser/components/customizableui/CustomizableWidgets.jsm
+++ b/browser/components/customizableui/CustomizableWidgets.jsm
@@ -915,7 +915,7 @@ const CustomizableWidgets = [
node.setAttribute("id", this.id);
node.classList.add("toolbarbutton-1");
node.classList.add("chromeclass-toolbar-additional");
- node.setAttribute("type", "badged");
+ node.classList.add("badged-button");
node.setAttribute("label", CustomizableUI.getLocalizedProperty(this, "label"));
node.setAttribute("tooltiptext", CustomizableUI.getLocalizedProperty(this, "tooltiptext"));
node.setAttribute("removable", "true");
diff --git a/browser/modules/Social.jsm b/browser/modules/Social.jsm
index 54f03eefced..80d3d39872a 100644
--- a/browser/modules/Social.jsm
+++ b/browser/modules/Social.jsm
@@ -271,8 +271,7 @@ function CreateSocialStatusWidget(aId, aProvider) {
onBuild: function(aDocument) {
let node = aDocument.createElement('toolbarbutton');
node.id = this.id;
- node.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional social-status-button');
- node.setAttribute('type', "badged");
+ node.setAttribute('class', 'toolbarbutton-1 chromeclass-toolbar-additional social-status-button badged-button');
node.style.listStyleImage = "url(" + (aProvider.icon32URL || aProvider.iconURL) + ")";
node.setAttribute("origin", aProvider.origin);
node.setAttribute("label", aProvider.name);
diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
index 41accaf0561..163ff92c35c 100644
--- a/browser/themes/linux/browser.css
+++ b/browser/themes/linux/browser.css
@@ -565,7 +565,7 @@ menuitem:not([type]):not(.menuitem-tooltip):not(.menuitem-iconic-tooltip) {
padding: 3px 7px;
}
-toolbarbutton[type="badged"] > .toolbarbutton-badge-container > .toolbarbutton-icon,
+toolbarbutton.badged-button > .toolbarbutton-badge-container > .toolbarbutton-icon,
toolbarbutton[type="socialmark"] > .toolbarbutton-icon {
max-width: 32px !important;
}
@@ -2077,35 +2077,6 @@ toolbarbutton.chevron > .toolbarbutton-icon {
display: none;
}
-.toolbarbutton-badge-container {
- margin: 5px 3px;
- position: relative;
-}
-
-toolbar[iconsize="small"] .toolbarbutton-badge-container {
- margin: 0;
-}
-
-.toolbarbutton-badge[badge]:not([badge=""])::after {
- /* The |content| property is set in the content stylesheet. */
- font-size: 9px;
- font-weight: bold;
- padding: 0 1px;
- color: #fff;
- background-color: rgb(240,61,37);
- border: 1px solid rgb(216,55,34);
- border-radius: 2px;
- box-shadow: 0 1px 0 rgba(0,39,121,0.77);
- position: absolute;
- top: 0;
- right: 0;
-}
-
-.toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl)::after {
- left: 2px;
- right: auto;
-}
-
.popup-notification-icon[popupid="servicesInstall"] {
list-style-image: url(chrome://browser/skin/social/services-64.png);
}
diff --git a/browser/themes/osx/browser.css b/browser/themes/osx/browser.css
index 5733e331959..bae683789b6 100644
--- a/browser/themes/osx/browser.css
+++ b/browser/themes/osx/browser.css
@@ -4419,48 +4419,6 @@ menulist.translate-infobar-element > .menulist-dropmarker {
display: none;
}
-.toolbarbutton-badge-container {
- margin: 0;
- padding: 0;
- position: relative;
-}
-
-.toolbarbutton-badge[badge]:not([badge=""]) {
- /* The |content| property is set in the content stylesheet. */
- font-size: 9px;
- font-weight: bold;
- padding: 0 1px;
- color: #fff;
- background-color: rgb(240,61,37);
- border: 1px solid rgb(216,55,34);
- border-radius: 2px;
- box-shadow: 0 1px 0 rgba(0,39,121,0.77);
- position: absolute;
- top: 0;
- right: 0;
- z-index: 1;
-}
-
-.toolbarbutton-badge[badge]:not([badge=""]):-moz-window-inactive {
- background-color: rgb(230,230,230);
- box-shadow: none;
- border: 1px solid rgb(206,206,206);
- color: rgb(192,192,192);
-}
-
-.toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl) {
- left: 0;
- right: auto;
-}
-
-toolbar[mode="icons"] > *|* > .toolbarbutton-badge[badge]:not([badge=""]) {
- right: -2px;
-}
-
-toolbar[mode="icons"] > *|* > .toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl) {
- left: -2px;
-}
-
.popup-notification-icon[popupid="servicesInstall"] {
list-style-image: url(chrome://browser/skin/social/services-64.png);
}
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
index 91a69b3faee..9a59218b7b1 100644
--- a/browser/themes/windows/browser.css
+++ b/browser/themes/windows/browser.css
@@ -2699,59 +2699,6 @@ toolbarpaletteitem[place="palette"] > #switch-to-metro-button {
list-style-image: url(chrome://browser/skin/Metro_Glyph-menuPanel.png);
}
-.toolbarbutton-badge-container {
- margin: 0;
- padding: 0;
- position: relative;
-}
-
-#nav-bar .toolbarbutton-1 > .toolbarbutton-badge-container {
- padding: 2px 5px;
-}
-
-.toolbarbutton-1 > .toolbarbutton-badge-container > .toolbar-icon {
- position: absolute;
- top: 2px;
- right: 2px;
-}
-
-.toolbarbutton-badge-container > .toolbarbutton-icon[label]:not([label=""]) {
- -moz-margin-end: 0;
-}
-
-.toolbarbutton-badge[badge=""] {
- display: none;
-}
-.toolbarbutton-badge[badge]:not([badge=""])::after {
- /* The |content| property is set in the content stylesheet. */
- font-size: 9px;
- font-weight: bold;
- padding: 0 1px;
- color: #fff;
- background-color: rgb(240,61,37);
- border: 1px solid rgb(216,55,34);
- border-radius: 2px;
- box-shadow: 0 1px 0 rgba(0,39,121,0.77);
- position: absolute;
- top: 0;
- right: 0;
-}
-
-#nav-bar .toolbarbutton-badge[badge]:not([badge=""])::after {
- top: 1px;
- right: 1px;
-}
-
-.toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl)::after {
- left: 0;
- right: auto;
-}
-
-#nav-bar .toolbarbutton-badge[badge]:not([badge=""]):-moz-locale-dir(rtl)::after {
- left: 1px;
- right: auto;
-}
-
.popup-notification-icon[popupid="servicesInstall"] {
list-style-image: url(chrome://browser/skin/social/services-64.png);
}
diff --git a/toolkit/content/widgets/toolbarbutton.xml b/toolkit/content/widgets/toolbarbutton.xml
index ceb17f2857c..7816dbd9539 100644
--- a/toolkit/content/widgets/toolbarbutton.xml
+++ b/toolkit/content/widgets/toolbarbutton.xml
@@ -14,7 +14,7 @@
-
+
@@ -25,7 +25,7 @@
-
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/toolkit/content/xul.css b/toolkit/content/xul.css
index ee4ae00c2ea..5ab4eaa36c2 100644
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -138,6 +138,14 @@ toolbarbutton[type="menu-button"] {
-moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#menu-button");
}
+toolbarbutton.badged-button {
+ -moz-binding: url("chrome://global/content/bindings/toolbarbutton.xml#toolbarbutton-badged");
+}
+
+toolbarbutton.badged-button .toolbarbutton-badge[badge]:not([badge=""])::after {
+ content: attr(badge);
+}
+
toolbar[mode="icons"] .toolbarbutton-text,
toolbar[mode="icons"] .toolbarbutton-multiline-text,
toolbar[mode="text"] .toolbarbutton-icon {
diff --git a/toolkit/themes/linux/global/toolbarbutton.css b/toolkit/themes/linux/global/toolbarbutton.css
index 38980a80d83..4a11f72df2e 100644
--- a/toolkit/themes/linux/global/toolbarbutton.css
+++ b/toolkit/themes/linux/global/toolbarbutton.css
@@ -105,6 +105,40 @@ toolbarbutton[type="menu-button"][disabled="true"]:hover:active {
-moz-box-orient: vertical;
}
+/* ::::: toolbarbutton badged ::::: */
+
+.toolbarbutton-badge {
+ background-color: #d90000;
+}
+
+.toolbarbutton-badge::after {
+ /* The |content| property is set in the content stylesheet. */
+ font-size: 10px;
+ font-weight: bold;
+ padding: 1px 2px 2px;
+ color: #fff;
+ background-color: inherit;
+ border-radius: 2px;
+ box-shadow: 0 1px 0 hsla(0, 100%, 100%, .2) inset,
+ 0 -1px 0 hsla(0, 0%, 0%, .1) inset,
+ 0 1px 0 hsla(206, 50%, 10%, .2);
+ position: absolute;
+ top: -4px;
+ right: -2px;
+ min-width: 10px;
+ line-height: 10px;
+ text-align: center;
+}
+
+.toolbarbutton-badge:-moz-locale-dir(rtl)::after {
+ left: -2px;
+ right: auto;
+}
+
+.toolbarbutton-badge-container {
+ position: relative;
+}
+
/* .......... dropmarker .......... */
.toolbarbutton-menubutton-dropmarker {
diff --git a/toolkit/themes/osx/global/toolbarbutton.css b/toolkit/themes/osx/global/toolbarbutton.css
index 6862ef25ee6..2cfd452eadf 100644
--- a/toolkit/themes/osx/global/toolbarbutton.css
+++ b/toolkit/themes/osx/global/toolbarbutton.css
@@ -76,6 +76,55 @@ toolbarbutton[type="menu-button"][disabled="true"]:hover:active {
text-shadow: inherit;
}
+/* ::::: toolbarbutton badged ::::: */
+
+.toolbarbutton-badge {
+ background-color: #d90000;
+}
+
+.toolbarbutton-badge::after {
+ /* The |content| property is set in the content stylesheet. */
+ font-size: 9px;
+ padding: 1px 2px 2px;
+ color: #fff;
+ background-color: inherit;
+ border-radius: 2px;
+ box-shadow: 0 1px 0 hsla(0, 100%, 100%, .2) inset,
+ 0 -1px 0 hsla(0, 0%, 0%, .1) inset,
+ 0 1px 0 hsla(206, 50%, 10%, .2);
+ position: absolute;
+ top: -8px;
+ right: -8px;
+ z-index: 1;
+ min-width: 10px;
+ line-height: 10px;
+ text-align: center;
+}
+
+.toolbarbutton-badge:-moz-window-inactive::after {
+ background-color: rgb(230,230,230);
+ box-shadow: none;
+ border: 1px solid rgb(206,206,206);
+ color: rgb(192,192,192);
+}
+
+.toolbarbutton-badge:-moz-locale-dir(rtl)::after {
+ left: -8px;
+ right: auto;
+}
+
+toolbar[mode="icons"] > *|* > .toolbarbutton-badge::after {
+ right: -10px;
+}
+
+toolbar[mode="icons"] > *|* > .toolbarbutton-badge:-moz-locale-dir(rtl)::after {
+ left: -10px;
+}
+
+.toolbarbutton-badge-container {
+ position: relative;
+}
+
/* .......... dropmarker .......... */
.toolbarbutton-menubutton-dropmarker {
diff --git a/toolkit/themes/windows/global/toolbarbutton.css b/toolkit/themes/windows/global/toolbarbutton.css
index 6e3763d0205..1e2250fe41f 100644
--- a/toolkit/themes/windows/global/toolbarbutton.css
+++ b/toolkit/themes/windows/global/toolbarbutton.css
@@ -137,6 +137,48 @@ toolbarbutton[type="menu-button"][disabled="true"]:hover:active {
-moz-box-orient: vertical;
}
+/* ::::: toolbarbutton badged ::::: */
+
+.toolbarbutton-badge-container > .toolbarbutton-icon[label]:not([label=""]) {
+ -moz-margin-end: 0;
+}
+
+.toolbarbutton-badge[badge=""] {
+ display: none;
+}
+
+.toolbarbutton-badge {
+ background-color: #d90000;
+}
+
+.toolbarbutton-badge::after {
+ /* The |content| property is set in the content stylesheet. */
+ font-size: 10px;
+ font-weight: bold;
+ padding: 1px 2px 2px;
+ color: #fff;
+ background-color: inherit;
+ border-radius: 2px;
+ box-shadow: 0 1px 0 hsla(0, 100%, 100%, .2) inset,
+ 0 -1px 0 hsla(0, 0%, 0%, .1) inset,
+ 0 1px 0 hsla(206, 50%, 10%, .2);
+ position: absolute;
+ top: -4px;
+ right: -2px;
+ min-width: 10px;
+ line-height: 10px;
+ text-align: center;
+}
+
+.toolbarbutton-badge:-moz-locale-dir(rtl)::after {
+ left: -2px;
+ right: auto;
+}
+
+.toolbarbutton-badge-container {
+ position: relative;
+}
+
/* .......... dropmarker .......... */
.toolbarbutton-menubutton-dropmarker {