Bug 1596966 - Set `min-height: 0` on <stack> children. r=dholbert
authorTim Nguyen <ntim.bugs@gmail.com>
Sat, 16 Nov 2019 02:00:01 +0000
changeset 502311 1d6c106c86d52e7e6552f9fc73f5d349c1db529f
parent 502310 bf1d04bbfc0be1fc01828bf6c0a32a98473513d6
child 502312 3e4d6ff8aa5e8c719453d5f3a2b1e67a333f7b5a
push id36808
push usershindli@mozilla.com
push dateSat, 16 Nov 2019 05:13:16 +0000
treeherdermozilla-central@1d6c106c86d5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1596966
milestone72.0a1
first release with
nightly linux32
1d6c106c86d5 / 72.0a1 / 20191116051316 / files
nightly linux64
1d6c106c86d5 / 72.0a1 / 20191116051316 / files
nightly mac
1d6c106c86d5 / 72.0a1 / 20191116051316 / files
nightly win32
1d6c106c86d5 / 72.0a1 / 20191116051316 / files
nightly win64
1d6c106c86d5 / 72.0a1 / 20191116051316 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1596966 - Set `min-height: 0` on <stack> children. r=dholbert Differential Revision: https://phabricator.services.mozilla.com/D53294
browser/themes/shared/incontentprefs/preferences.inc.css
toolkit/content/xul.css
--- a/browser/themes/shared/incontentprefs/preferences.inc.css
+++ b/browser/themes/shared/incontentprefs/preferences.inc.css
@@ -32,25 +32,22 @@ body {
   -moz-box-orient: vertical;
 }
 
 * {
   -moz-user-select: text;
 }
 
 /*
-  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.
+  The stack has some very tall content but it shouldn't be taller than the
+  viewport (and we know the tall content will still be accessible via scrollbars
+  regardless if the stack has a shorter height). So we use min-height: 0 to allow
+  the stack to be smaller than its content height so it can fit the viewport size.
 */
-#preferences-stack,
-#preferences-stack > * {
+#preferences-stack {
   min-height: 0;
 }
 
 .main-content {
   padding-top: 0;
 }
 
 .pane-container {
--- a/toolkit/content/xul.css
+++ b/toolkit/content/xul.css
@@ -372,16 +372,25 @@ deck {
 stack {
   display: grid;
   position: relative;
 }
 
 stack > *|* {
   grid-area: 1 / 1;
   z-index: 0;
+
+  /*
+    The default `min-height: auto` value makes grid items refuse to be smaller
+    than their content. This doesn't match the traditional behavior of XUL stack,
+    which often shoehorns tall content into a smaller stack and allows the content
+    to decide how to handle overflow (e.g. by scaling down if it's an image, or
+    by adding scrollbars if it's scrollable).
+  */
+  min-height: 0;
 }
 
 /********** tabbox *********/
 
 tabbox {
   -moz-box-orient: vertical;
 }