Bug 1589588 - Adjustments to <stack> after bug 1576946. r=Paenglab DONTBUILD
authorMagnus Melin <mkmelin+mozilla@iki.fi>
Fri, 18 Oct 2019 10:27:42 +0300
changeset 37501 96490ef9899a8afef1e29ad5d4944aa34e3eb22d
parent 37500 716cec9c6ca52060ea9fc237f6f266d3ac16ddf7
child 37502 0402e4370a3cb4093a253970c3b396b43791e783
push id396
push userclokep@gmail.com
push dateMon, 06 Jan 2020 23:11:57 +0000
reviewersPaenglab
bugs1589588, 1576946
Bug 1589588 - Adjustments to <stack> after bug 1576946. r=Paenglab DONTBUILD
mail/components/im/content/chat-conversation.js
mail/components/im/themes/chat.css
mail/components/preferences/aboutPreferences.xul
mail/themes/shared/mail/incontentprefs/preferences.css
mail/themes/shared/mail/newmailalert.css
mailnews/base/content/newmailalert.xul
--- a/mail/components/im/content/chat-conversation.js
+++ b/mail/components/im/content/chat-conversation.js
@@ -228,19 +228,16 @@
       this.inputBox = document.createElementNS(
         "http://www.w3.org/1999/xhtml",
         "textarea"
       );
       this.inputBox.classList.add("conv-textbox");
 
       this.charCounter = document.createXULElement("description");
       this.charCounter.classList.add("conv-counter");
-      this.charCounter.setAttribute("right", "0");
-      this.charCounter.setAttribute("bottom", "0");
-
       this.convBottom.appendChild(this.inputBox);
       this.convBottom.appendChild(this.charCounter);
 
       this.appendChild(this.convTop);
       this.appendChild(this.splitter);
       this.appendChild(this.convStatusContainer);
       this.appendChild(this.convBottom);
 
--- a/mail/components/im/themes/chat.css
+++ b/mail/components/im/themes/chat.css
@@ -255,20 +255,16 @@ richlistitem[is="chat-imconv-richlistite
   min-height: 16px;
   min-width: 16px;
 }
 
 .startChatBubble {
   list-style-image: url('chrome://chat/skin/prpl-generic/icon.png');
 }
 
-.closeConversationButton {
-  -moz-stack-sizing: ignore;
-}
-
 .startChatBubble > .button-box,
 .closeConversationButton > .button-box {
   padding: 0;
 }
 
 .closeConversationButton > .button-box > .button-icon {
   width: 16px;
   height: 16px;
@@ -559,16 +555,18 @@ richlistitem[state="disconnected"] .acco
 }
 
 .conv-textbox > .textbox-input-box {
   background: inherit;
 }
 %endif
 
 .conv-counter {
+  justify-self: end;
+  align-self: end;
   color: #000;
   background-color: rgba(246, 246, 246, 0.7);
   border-inline-start: 1px solid rgb(200, 200, 200);
   border-top: 1px solid rgb(200, 200, 200);
   /* Padding that gets flipped to margins in .conv-counter[value^="0"] to avoid the red border. */
   font-size: 130%;
   padding-top: 0;
   padding-bottom: 1px;
--- a/mail/components/preferences/aboutPreferences.xul
+++ b/mail/components/preferences/aboutPreferences.xul
@@ -81,18 +81,18 @@
                 src="chrome://messenger/locale/preferences/preferences.properties"/>
   <linkset>
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="messenger/preferences/preferences.ftl"/>
     <html:link rel="localization" href="messenger/preferences/fonts.ftl"/>
     <html:link rel="localization" href="messenger/preferences/languages.ftl"/>
   </linkset>
 
-  <stack flex="1">
-    <hbox id="prefBox" flex="1">
+  <stack id="preferences-stack" flex="1">
+    <hbox id="prefBox" class="main-content" flex="1">
       <vbox id="pref-category-box">
         <radiogroup id="selector" orient="vertical" class="paneSelector chromeclass-toolbar"
                         role="listbox" flex="1"/> <!-- Expose to accessibility APIs as a listbox -->
         <spacer flex="1"/>
         <hbox class="sidebar-footer-button"
               pack="center"
               onclick="window.docShell.rootTreeItem.domWindow.openAddonsMgr();">
           <label is="text-link" id="addonsButton">
--- a/mail/themes/shared/mail/incontentprefs/preferences.css
+++ b/mail/themes/shared/mail/incontentprefs/preferences.css
@@ -31,17 +31,32 @@
   position: relative;
 }
 
 #pref-category-box {
   background-color: var(--in-content-categories-background);
   width: 240px;
 }
 
-/* Subcategory title */
+/*
+  The default min-height:auto value makes grid items (and XUL flex items) refuse
+  to be smaller than their content. In this case, we have some tall very content
+  inside of us, and yet we don't want to be taller than the viewport (and we know
+  the tall content will still be accessible via scrollbars regardless if we're a
+  shorter height). So we use min-height:0 to allow ourselves to be smaller than
+  our content height so we can fit the viewport size.
+*/
+#preferences-stack,
+#preferences-stack > * {
+  min-height: 0;
+}
+
+.main-content {
+  padding: 0;
+}
 
 /**
  * The first subcategory title for each category should not have margin-top.
  */
 
 .subcategory:not([hidden]) ~ .subcategory {
   margin-top: 16px;
   padding-top: 16px;
--- a/mail/themes/shared/mail/newmailalert.css
+++ b/mail/themes/shared/mail/newmailalert.css
@@ -84,8 +84,13 @@ folder-summary {
 .folderSummaryMessage:hover > .folderSummary-message-row {
   cursor: pointer;
   color: -moz-hyperlinktext;
 }
 
 .folderSummaryMessage:hover:active > .folderSummary-message-row {
   color: -moz-activehyperlinktext;
 }
+
+#closeButton {
+  justify-self: end;
+  align-self: start;
+}
--- a/mailnews/base/content/newmailalert.xul
+++ b/mailnews/base/content/newmailalert.xul
@@ -25,11 +25,11 @@
 
       <vbox id="alertTextBox">
         <label id="alertTitle"/>
         <separator id="alertGroove" class="groove"/>
         <folder-summary id="folderSummaryInfo" mousethrough="never"/>
       </vbox>
     </hbox>
 
-    <toolbarbutton id="closeButton" class="close-icon" top="0" right="0" onclick="closeAlert();"/>
+    <toolbarbutton id="closeButton" class="close-icon" onclick="closeAlert();"/>
   </stack>
 </window>