Bug 848134-condense metro css attributes whose only value is true(Mbrubeck Memorial Bug)r=mbrubeck
authorAllison Naaktgeboren <ally@mozilla.com>
Mon, 18 Mar 2013 15:34:23 -0700
changeset 125313 545649dc10e7a172599e837f10124ebecd37da6f
parent 125312 061871df8f9e416fdcac9930ef19819570ee05eb
child 125314 d0c34cd5d1226e44cc154dcdb9ce4ff1c9d483eb
push idunknown
push userunknown
push dateunknown
bugs848134
milestone22.0a1
Bug 848134-condense metro css attributes whose only value is true(Mbrubeck Memorial Bug)r=mbrubeck
browser/metro/base/content/bindings/grid.xml
browser/metro/base/content/browser-ui.js
browser/metro/base/content/helperui/MasterPasswordUI.js
browser/metro/theme/browser.css
browser/metro/theme/content.css
browser/metro/theme/forms.css
browser/metro/theme/platform.css
--- a/browser/metro/base/content/bindings/grid.xml
+++ b/browser/metro/base/content/bindings/grid.xml
@@ -27,39 +27,43 @@
 
       <method name="clearSelection">
         <body>
           <![CDATA[
             // 'selection' and 'selected' are confusingly overloaded here
             // as richgrid is adopting multi-select behavior, but select/selected are already being
             // used to describe triggering the default action of a tile
             if (this._selectedItem){
-              this._selectedItem.selected = false;
+              this._selectedItem.removeAttribute("selected");
               this._selectedItem = null;
             }
 
             for (let childItem of this.selectedItems) {
-              childItem.selected = false;
+              childItem.removeAttribute("selected");
             }
             // reset context actions
             this._contextActions = null;
           ]]>
         </body>
       </method>
 
       <method name="toggleItemSelection">
         <parameter name="anItem"/>
         <body>
           <![CDATA[
             let wasSelected = anItem.selected;
             if ("single" == this.getAttribute("seltype")) {
               this.clearSelection();
             }
-            anItem.selected = !wasSelected;
             this._selectedItem = wasSelected ? null : anItem;
+            if(anItem.selected) {
+              anItem.removeAttribute("selected");
+            } else {
+              anItem.setAttribute("selected", true);
+            }
             this._fireOnSelectionChange();
           ]]>
         </body>
       </method>
 
       <method name="selectItem">
         <parameter name="anItem"/>
         <body>
@@ -501,18 +505,17 @@
 
     <implementation>
       <property name="_box" onget="return document.getAnonymousElementByAttribute(this, 'anonid', 'anon-richgrid-item');"/>
       <property name="color" onset="this._color = val; this.setColor();" onget="return this._color;"/>
       <property name="backgroundimage"
                 onset="this._backgroundimage = val; this.setBackgroundImage();"
                 onget="return this._backgroundimage;" />
       <property name="selected"
-                onget="return this.getAttribute('selected') == 'true';"
-                onset="this.setAttribute('selected', val);"/>
+                onget="return this.getAttribute('selected') == 'true';" />
 
       <constructor>
         <![CDATA[
           // Bindings don't get bound until the item is displayed,
           // so we have to reset the background color/image when we get
           // created.
           this.setColor();
           this.setBackgroundImage();
--- a/browser/metro/base/content/browser-ui.js
+++ b/browser/metro/base/content/browser-ui.js
@@ -586,18 +586,26 @@ var BrowserUI = {
 
     let tab = Browser.getTabForBrowser(aBrowser);
     if (tab)
       tab.chromeTab.updateTitle(tabCaption);
   },
 
   _updateButtons: function _updateButtons() {
     let browser = Browser.selectedBrowser;
-    this._back.setAttribute("disabled", !browser.canGoBack);
-    this._forward.setAttribute("disabled", !browser.canGoForward);
+    if (browser.canGoBack) {
+      this._back.removeAttribute("disabled");
+    } else {
+      this._back.setAttribute("disabled", true);
+    }
+    if (browser.canGoForward) {
+      this._forward.removeAttribute("disabled");
+    } else {
+      this._forward.setAttribute("disabled", true);
+    }
   },
 
   _updateToolbar: function _updateToolbar() {
     let mode = Elements.urlbarState.getAttribute("mode");
     let isLoading = Browser.selectedTab.isLoading();
 
     if (isLoading && mode != "loading")
       Elements.urlbarState.setAttribute("mode", "loading");
--- a/browser/metro/base/content/helperui/MasterPasswordUI.js
+++ b/browser/metro/base/content/helperui/MasterPasswordUI.js
@@ -96,17 +96,21 @@ var MasterPasswordUI = {
 
   checkPassword: function mp_checkPassword() {
     let newPasswordValue1 = document.getElementById("masterpassword-newpassword1").value;
     let newPasswordValue2 = document.getElementById("masterpassword-newpassword2").value;
 
     let buttonOk = this._dialog.getElementsByAttribute("class", "prompt-buttons")[0].firstChild;
     let isPasswordValid = this._secModuleDB.isFIPSEnabled ? (newPasswordValue1 != "" && newPasswordValue1 == newPasswordValue2)
                                                           : (newPasswordValue1 == newPasswordValue2);
-    buttonOk.setAttribute("disabled", !isPasswordValid);
+    if (isPasswordValid) {
+      buttonOk.removeAttribute("disabled");
+    } else {
+      buttonOk.setAttribute("disabled", true);
+    }
 
     return isPasswordValid;
   },
 
   checkOldPassword: function mp_checkOldPassword() {
     let oldPassword = document.getElementById("masterpassword-oldpassword");
 
     let buttonOk = this._dialog.getElementsByAttribute("class", "prompt-buttons")[0].firstChild;
--- a/browser/metro/theme/browser.css
+++ b/browser/metro/theme/browser.css
@@ -38,17 +38,17 @@
   opacity: 0;
   transition-property: width, opacity;
   transition-duration: .3s, .5s;
   transition-timing-function: ease-in, ease-in;
 }
 
 /* in non-tabsonly mode the navigation bar and tab tray float over content. In
    tabsonly mode they are always visible and offset content. */
-#tray:not([tabsonly=true]) {
+#tray:not([tabsonly]) {
   position: fixed;
 }
 
 #tray[visible][expanded] {
   transform: none;
 }
 
 #tray[startpage],
@@ -91,54 +91,54 @@
   -moz-image-region: rect(15px 58px 63px 14px) !important;
 }
 #tabs > .tabs-scrollbox > .scrollbutton-up:hover {
   -moz-image-region: rect(14px 102px 62px 58px) !important;
 }
 #tabs > .tabs-scrollbox > .scrollbutton-up:active {
   -moz-image-region: rect(14px 152px 62px 108px) !important;
 }
-#tabs > .tabs-scrollbox > .scrollbutton-up[disabled="true"] {
+#tabs > .tabs-scrollbox > .scrollbutton-up[disabled] {
   -moz-image-region: rect(15px 196px 63px 152px) !important;
 }
 
 #tabs > .tabs-scrollbox > .scrollbutton-down {
   list-style-image: url("images/tab-arrows.png") !important;
   -moz-image-region: rect(73px 58px 121px 14px) !important;
 }
 #tabs > .tabs-scrollbox > .scrollbutton-down:hover {
   -moz-image-region: rect(72px 102px 120px 58px) !important;
 }
 #tabs > .tabs-scrollbox > .scrollbutton-down:active {
   -moz-image-region: rect(72px 152px 120px 108px) !important;
 }
-#tabs > .tabs-scrollbox > .scrollbutton-down[disabled="true"] {
+#tabs > .tabs-scrollbox > .scrollbutton-down[disabled] {
   -moz-image-region: rect(73px 196px 121px 152px) !important;
 }
 
 
 @-moz-keyframes open-documenttab {
   0% {
     opacity: 0;
     transform: scale(0, 0);
   }
   
   100% {
     opacity: 1;
     transform: scale(1, 1);
   }
 }
 
-#tray:not([tabsonly=true]) documenttab > .documenttab-container {
+#tray:not([tabsonly]) documenttab > .documenttab-container {
   animation: open-documenttab;
   animation-duration: 0.4s;
   animation-timing-function: ease-out;
 }
 
-#tray:not([tabsonly=true]) .documenttab-favicon {
+#tray:not([tabsonly]) .documenttab-favicon {
   visibility: collapse;
 }
 
 .documenttab-thumbnail {
   margin: @metro_spacing_normal@ @metro_spacing_snormal@;
   background: white none center top no-repeat;
   background-size: cover;
   width: @thumbnail_width@;
@@ -161,128 +161,128 @@
 .documenttab-crop {
   background: transparent url("chrome://browser/skin/images/tab-crop.png") 50% 50% no-repeat;
 }
 
 .documenttab-selection {
   background: transparent -moz-image-rect(url("chrome://browser/skin/images/tab-overlay.png"), 0%, 100%, 50%, 0%) 50% 50% no-repeat;
 }
 
-documenttab[selected=true] .documenttab-selection {
+documenttab[selected] .documenttab-selection {
   background: transparent -moz-image-rect(url("chrome://browser/skin/images/tab-overlay.png"), 50%, 100%, 100%, 0%) 50% 50% no-repeat;
 }
 
 .documenttab-close {
   background: none !important;
   padding: @metro_spacing_small@ !important;
   margin-top: @metro_spacing_snormal@;
   -moz-margin-end: @metro_spacing_xsmall@;
   border-color: transparent !important;
   list-style-image: url("chrome://browser/skin/images/closetab-default.png");
 }
 
 .documenttab-close > .button-box > .button-text {
   display: none;
 }
 
-#tray[tabsonly=true] {
+#tray[tabsonly] {
   transform: none !important;
 }
 
-#tray[tabsonly=true] #tabs {
+#tray[tabsonly] #tabs {
   -moz-padding-start: @metro_spacing_small@;
 }
 
-#tray[tabsonly=true] #tabs-controls {
+#tray[tabsonly] #tabs-controls {
   -moz-box-align: center;
   -moz-box-orient: horizontal;
   -moz-box-pack: end;
   margin: 0;
 }
 
-#tray[tabsonly=true] #tabs-controls toolbarbutton {
+#tray[tabsonly] #tabs-controls toolbarbutton {
   margin-top: 0;
   margin-bottom: 0;
 }
 
-#tray[tabsonly=true] documenttab {
+#tray[tabsonly] documenttab {
   height: @toolbar_height@;
   margin: 0 -@tab_compression@;
 }
 
-#tray[tabsonly=true] documenttab:first-child {
+#tray[tabsonly] documenttab:first-child {
   -moz-margin-start: 0;
 }
 
-#tray[tabsonly=true] documenttab:last-child {
+#tray[tabsonly] documenttab:last-child {
   -moz-margin-end: 0;
 }
 
-#tray[tabsonly=true] .documenttab-thumbnail,
-#tray[tabsonly=true] .documenttab-selection,
-#tray[tabsonly=true] .documenttab-crop {
+#tray[tabsonly] .documenttab-thumbnail,
+#tray[tabsonly] .documenttab-selection,
+#tray[tabsonly] .documenttab-crop {
   visibility: collapse;
 }
 
-#tray[tabsonly=true] .documenttab-container {
+#tray[tabsonly] .documenttab-container {
   display: -moz-box;
   -moz-box-orient: horizontal;
   -moz-box-align: center;
   padding: 0 @tab_spacing@;
 }
 
-#tray[tabsonly=true] .documenttab-favicon {
+#tray[tabsonly] .documenttab-favicon {
   -moz-margin-start: @metro_spacing_normal@;
   -moz-margin-end: @metro_spacing_snormal@;
 }
 
-#tray[tabsonly=true] .documenttab-title {
+#tray[tabsonly] .documenttab-title {
   padding: 0;
   margin: 0;
   height: auto;
   background: 0 none;
   opacity: 1;
   box-shadow: none;
   width: @tab_inner_width@;
 }
 
-#tray[tabsonly=true] .documenttab-close {
+#tray[tabsonly] .documenttab-close {
   list-style-image: url("chrome://browser/skin/images/closetab-tab.png");
   position: relative;
   padding: 0 !important;
   z-index: 1;
 }
 
-#tray[tabsonly=true] documenttab[selected=true] {
+#tray[tabsonly] documenttab[selected=true] {
   background-color: @panel_light_color@;
   background-image: url("chrome://browser/skin/images/tab-selection-left.png"),
                     url("chrome://browser/skin/images/tab-selection-right.png"),
                     @panel_light_background@;
   background-position: left top, right top, center center;
   background-repeat: no-repeat, no-repeat, repeat;
 }
 
-#tray[tabsonly=true] documenttab[selected=true] .documenttab-close {
+#tray[tabsonly] documenttab[selected=true] .documenttab-close {
   list-style-image: url("chrome://browser/skin/images/closetab-tabselected.png");
 }
 
 #page,
 .selection-overlay {
   -moz-stack-sizing: ignore;
 }
 
 .selection-overlay:-moz-focusring {
   outline: 0 !important;
 }
 
 .selection-overlay-hidden {
   display: none;
 }
 
-#tray[tabsonly=true] documenttab[selected=true] .documenttab-title {
+#tray[tabsonly] documenttab[selected=true] .documenttab-title {
   color: #000;
 }
 
 #tabs-controls {
   margin-top: @metro_spacing_small@;
   -moz-box-align: start;
   -moz-box-orient: vertical;
   padding: 0 @metro_spacing_small@;
@@ -351,17 +351,17 @@ documenttab[selected=true] .documenttab-
   -moz-image-region: rect(0 48px 48px 0);
   position: relative;
   z-index: 1;
   padding: 0 !important;
   min-height: 48px !important;
   max-height: 48px !important;
 }
 
-#back-button[disabled="true"] {
+#back-button[disabled] {
   -moz-image-region: rect(0 96px 48px 48px);
 }
 
 #forward-button {
   background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.5)), @panel_light_background@;
   border: @metro_border_thick@ solid rgb(192, 198, 204);
   margin: 0 !important;
   padding: 0 !important;
@@ -372,17 +372,17 @@ documenttab[selected=true] .documenttab-
 }
 
 /* XXX: Hack to move the image up one pixel because
         it's not vertically centered for some reason. */
 #forward-button image {
   margin: -1px 0 1px 0 !important;
 }
 
-#unified-back-forward-button > #forward-button[disabled="true"] {
+#unified-back-forward-button > #forward-button[disabled] {
   opacity: 0;
 }
 
 /* URL bar */
 #unified-back-forward-button + #urlbar-container {
   margin: 0;
   padding: 0;
   padding-left: @back_width@;
@@ -397,22 +397,22 @@ documenttab[selected=true] .documenttab-
 }
 
 #unified-back-forward-button + #urlbar-container > #urlbar {
   -moz-border-start: none;
   pointer-events: all;
   transition: margin-left @forward_transition_length@ ease-out;
 }
 
-#unified-back-forward-button[forwarddisabled="true"] + #urlbar-container {
+#unified-back-forward-button[forwarddisabled] + #urlbar-container {
   clip-path: url("chrome://browser/content/browser.xul#back-button-clip-path");
   padding-left: @clipped_url_back_width@;
 }
 
-#unified-back-forward-button[forwarddisabled="true"] + #urlbar-container > #urlbar {
+#unified-back-forward-button[forwarddisabled] + #urlbar-container > #urlbar {
   margin-left: -@forward_width@;
 }
 
 /* Identity widget */
 #identity-icon {
   width: @metro_spacing_xxnormal@;
   height: @metro_spacing_xxnormal@;
   margin: 0;
@@ -476,28 +476,28 @@ documenttab[selected=true] .documenttab-
 
 /* Hide the tab toggle if the tabs are visible */
 #tray[visible][expanded] #tool-new-tab {
   opacity: 0;
 }
 
 /* Hide the tab toggle if we're showing classic tabs or we're snap-viewed. */
 #toolbar[viewstate="snapped"],
-#tray[tabsonly=true] #toolbar {
+#tray[tabsonly] #toolbar {
   background: @panel_light_color@ @panel_light_background@;
   -moz-padding-end: 0;
 }
 
 #toolbar-container[viewstate="snapped"],
-#tray[tabsonly=true] #toolbar-container {
+#tray[tabsonly] #toolbar-container {
   -moz-padding-end: 0;
 }
 
 #toolbar-transition[viewstate="snapped"],
-#tray[tabsonly=true] #toolbar-transition {
+#tray[tabsonly] #toolbar-transition {
   visibility: collapse;
 }
 
 /* If we're in the small snap view, compress and simplify the UI. */
 #tray[visible][expanded][viewstate="snapped"] {
   margin-top: -@tabs_height@ !important;
 }
 
@@ -535,17 +535,17 @@ appbar toolbarbutton {
   float: left;
   border-width: 0px;
   margin: 0 @toolbar_horizontal_spacing@;
   padding: 0;
   /* Don't inherit background-color from toolbarbutton[checked="true"] */
   background-color: transparent;
 }
 
-appbar toolbarbutton[disabled="true"] {
+appbar toolbarbutton[disabled] {
   visibility: collapse;
 }
 
 #appbar:not([viewstate="snapped"])[visible] {
   transform: none;
 }
 
 #appbar toolbarbutton {
@@ -605,28 +605,28 @@ appbar toolbarbutton[disabled="true"] {
   -moz-image-region: rect(0px, 240px, 40px, 200px) !important;
 }
 #pin-button:hover {
   -moz-image-region: rect(40px, 240px, 80px, 200px) !important;
 }
 #pin-button:active {
   -moz-image-region: rect(80px, 240px, 120px, 200px) !important;
 }
-#pin-button[checked="true"] {
+#pin-button[checked] {
   -moz-image-region: rect(0px, 280px, 40px, 240px) !important;
 }
 
 #star-button {
   -moz-image-region: rect(0px, 360px, 40px, 320px) !important;
 }
 #star-button:hover {
   -moz-image-region: rect(40px, 360px, 80px, 320px) !important;
 }
 #star-button:active,
-#star-button[checked="true"] {
+#star-button[checked] {
   -moz-image-region: rect(80px, 360px, 120px, 320px) !important;
 }
 
 /* Flyouts ---------------------------------------------------------------- */
 
 /* don't add a margin to the very top settings entry in flyouts */
 flyoutpanel > settings:first-child {
   margin-top: 0px;
@@ -788,17 +788,17 @@ setting[type="directory"] > .preferences
   list-style-image: url(chrome://browser/skin/images/back.png);
   -moz-image-region: rect(0 48px 48px 0);
   padding: 0;
   min-height: 48px;
   max-height: 48px;
   -moz-box-pack: center;
 }
 
-#panel-close-button[disabled="true"] {
+#panel-close-button[disabled] {
   -moz-image-region: rect(0 96px 48px 48px);
 }
 
 #panel-view-switcher {
   border: 0 none !important;
   color: #000 !important;
   background: transparent;
   padding: 0;
@@ -828,17 +828,17 @@ setting[type="directory"] > .preferences
 
 .console-error-msg,
 .console-msg-text {
   white-space: pre-wrap;
 }
 
 /* Context Menu ------------------------------------------------------------ */
 
-#context-commands richlistitem[disabled="true"] {
+#context-commands richlistitem[disabled] {
   display: none;
 }
 
 /* Alert Popup -------------------------------------------------------------- */
 #alerts-container {
   color: white;
   background-color: #5e6166;
   border: @border_width_small@ solid #767973;
@@ -911,17 +911,17 @@ setting[type="directory"] > .preferences
   -moz-border-top-colors: none !important;
   -moz-border-bottom-colors: none !important;
   -moz-border-right-colors: none !important;
   -moz-border-left-colors: none !important;
   border-radius: @border_radius_tiny@;
   border: @border_width_tiny@ solid rgba(255, 255, 255, 0.4) !important;
 }
 
-.scroller[panning="true"] {
+.scroller[panning] {
   opacity: 1;
 }
 
 .scroller[orient="vertical"] {
   min-width: @scroller_thickness@;
   width: @scroller_thickness@;
   min-height: @scroller_minimum@;
 }
--- a/browser/metro/theme/content.css
+++ b/browser/metro/theme/content.css
@@ -53,17 +53,17 @@ xul|window xul|scrollbar[orient="horizon
   border: 0px solid transparent !important;
 }
 
 xul|window xul|scrollbar[orient="horizontal"] xul|thumb {
   max-height: 6px !important;
   min-height: 6px !important;
 }
 
-xul|window xul|*[panning="true"] xul|scrollbar {
+xul|window xul|*[panning] xul|scrollbar {
   opacity: 1;
 }
 
 xul|window xul|scrollbox {
   overflow-y: scroll;
   overflow-x: scroll;
 }
 
@@ -213,17 +213,17 @@ select:not([size]):not([multiple])[disab
 select[size="0"][disabled],
 select[size="1"][disabled] {
   background: transparent -moz-linear-gradient(top, rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%);
 }
 
 input[type="button"][disabled],
 input[type="submit"][disabled],
 input[type="reset"][disabled],
-button[disabled="true"] {
+button[disabled] {
   padding: 0 7px 0 7px;
   background: transparent -moz-linear-gradient(top, rgba(255,255,255,0.4) 0, rgba(235,235,235,0.4) 3px, rgba(185,185,185,0.4) 100%);
 }
 
 input[type="radio"][disabled],
 input[type="radio"][disabled]:active,
 input[type="radio"][disabled]:hover,
 input[type="radio"][disabled]:hover:active,
--- a/browser/metro/theme/forms.css
+++ b/browser/metro/theme/forms.css
@@ -9,17 +9,17 @@
 #content-navigator {
   display: none;
   pointer-events: none;
   padding: 0;
   background-color: @appbar_color@;
 }
 
 #content-navigator[type="find"],
-#content-navigator[type="form"]:not([disabled="true"]) {
+#content-navigator[type="form"]:not([disabled]) {
   display: -moz-box;
 }
 
 #content-navigator > .previous-button,
 #content-navigator > .next-button,
 #content-navigator > .close-button {
   min-width: @touch_button_small@ !important; /* button size */
   min-height: @touch_button_small@ !important; /* button size */
@@ -170,17 +170,17 @@
 }
 
 #form-helper-suggestions > .autorepeatbutton-up:-moz-locale-dir(rtl) {
   list-style-image: url("chrome://browser/skin/images/arrowright-16.png");
 }
 
 /* force the autorepeat buttons to create a 'padding' when collapsed */
 #form-helper-suggestions > autorepeatbutton[collapsed="true"],
-#form-helper-suggestions > autorepeatbutton[disabled="true"] {
+#form-helper-suggestions > autorepeatbutton[disabled] {
   visibility: hidden;
 }
 
 #form-helper-suggestions .form-helper-suggestions-label {
   padding: @padding_xxnormal@ @padding_normal@; /* 12px helps get row size for the labels */
   margin: 0;
   border-color: transparent rgb(215,215,215) transparent rgb(255,255,255);
   border-style: solid;
--- a/browser/metro/theme/platform.css
+++ b/browser/metro/theme/platform.css
@@ -33,18 +33,18 @@ menulist {
   font-weight: normal !important;
 
   color: @field_foreground_color@;
   background: @field_background_color@;
   border: @metro_border_thick@ solid @field_foreground_color@ !important;
   border-radius: 0;
 }
 
-textbox[disabled="true"],
-menulist[disabled="true"] {
+textbox[disabled],
+menulist[disabled] {
   border-color: @field_disabled_foreground_color@ !important;
   color: @field_disabled_foreground_color@;
 }
 
 menulist:not([disabled]):hover:active {
   color: @field_background_color@;
   background: @field_foreground_color@;
 }
@@ -166,17 +166,17 @@ menulist {
 .menu-container[showingfrom="below"] {
   transform: translateY(@metro_spacing_normal@);
 }
 
 .menu-container[showingfrom="above"] {
   transform: translateY(-@metro_spacing_normal@);
 }
 
-.menu-container[showing="true"] {
+.menu-container[showing] {
   opacity: 1;
   transform: none;
   transition: all ease-out 0.2s;
 }
 
 .menu-popup > richlistbox {
   padding: 3px 0;
   border: #000 solid @metro_border_thick@;
@@ -347,38 +347,38 @@ richlistitem description.normal {
   color: gray;
 }
 
 richlistitem label.normal-bold,
 richlistitem description.normal-bold {
   font-weight: bold;
 }
 
-richlistitem[selected="true"] {
+richlistitem[selected] {
   color: black;
   background-color: white;
 }
 
-richlistitem:hover:active:not([selected="true"]):not([nohighlight="true"]) {
+richlistitem:hover:active:not([selected]) {
   background-color: #8db8d8;
 }
 
 richlistitem.section-header,
-richlistitem[selected="true"].section-header {
+richlistitem[selected].section-header {
   font-weight: bold;
   color: #000;
   background-color: lightgray;
 }
 
-richlistitem[selected="true"] .hide-on-select,
+richlistitem[selected] .hide-on-select,
 richlistitem .show-on-select {
   visibility: collapse;
 }
 
-richlistitem[selected="true"] .show-on-select,
+richlistitem[selected] .show-on-select,
 richlistitem .hide-on-select {
   visibility: visible;
 }
 
 richlistitem[typeName="message"] {
   border-bottom: 0;
 }
 
@@ -464,41 +464,41 @@ richgriditem .richgrid-item-content {
   -moz-box-sizing: border-box;
   padding: 10px 8px 6px 8px;
 }
 
 .richgrid-item-content {
   background: #fff;
 }
 
-richgriditem[selected="true"] .richgrid-item-content {
+richgriditem[selected] .richgrid-item-content {
   border: @metro_border_xthick@ solid @selected_color@;
   padding: @metro_spacing_xxsmall@;
 }
 
 richgriditem .richgrid-icon-container {
   padding-bottom: 2px;
 }
 
 richgriditem .richgrid-icon-box {
   padding: 4px;
   background: #fff;
   opacity: 1.0;
 }
 
 
-richgriditem[customColorPresent="true"] {
+richgriditem[customColorPresent] {
   color: #f1f1f1;
 }
 richgriditem[customImagePresent] {
   color: #1a1a1a;
 }
 
 
-richgriditem[customColorPresent="true"] .richgrid-icon-box {
+richgriditem[customColorPresent] .richgrid-icon-box {
   opacity: 0.8;
   background-color: #fff;
 }
 
 .richgrid-item-content[customImagePresent] {
   height: 120px;
   width: 200px;
   background-size: cover;