Bug 1336072 - Avoid setting position:absolute on #newtab-grid since it breaks rearranging and deleting tiles. r=Gijs, a=lizzard
authorDão Gottwald <dao@mozilla.com>
Thu, 02 Feb 2017 13:49:29 +0100
changeset 375919 3b80d305c75a085ec1e1550dbbc27b47e58be77e
parent 375918 e03ffc294d7a570f6748f61f1feeabab03e57532
child 375920 0c4810ba31c7d8fb14911de4091f48391e8863e8
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs, lizzard
bugs1336072
milestone53.0a2
Bug 1336072 - Avoid setting position:absolute on #newtab-grid since it breaks rearranging and deleting tiles. r=Gijs, a=lizzard MozReview-Commit-ID: FTbIP28uD5k
browser/themes/shared/newtab/newTab.inc.css
--- a/browser/themes/shared/newtab/newTab.inc.css
+++ b/browser/themes/shared/newtab/newTab.inc.css
@@ -95,34 +95,26 @@
 #newtab-customize-button:-moz-any(:hover, :active, [active]) {
   background-image: -moz-image-rect(url(chrome://browser/skin/newtab/controls.svg), 0, 64, 32, 32);
   background-color: #FFFFFF;
   border: solid 1px #CCCCCC;
   border-radius: 2px;
 }
 
 /* GRID */
-body.compact #newtab-grid {
-  /* Allow #topsites-heading to use position:absolute such that it doesn't
-     affect how many cells we can fit into the grid. */
-  position: relative;
-  padding-top: 1em;
-  margin-top: -1em;
-}
-
 #topsites-heading {
   color: #7A7A7A;
   font-size: 1em;
   font-weight: normal;
   /* Position the heading such that it doesn't affect how many cells we
      can fit into the grid. */
   position: absolute;
-  top: 0;
-  /* The horizontal margin aligns the heading with the cells. */
-  margin: 0 10px;
+  /* The top margin moves the heading away from the grid.
+     The horizontal margin aligns the heading with the cells. */
+  margin: -1em 10px 0;
 }
 
 /* CELLS */
 .newtab-cell {
   --cell-corner-radius: 8px;
   background-color: rgba(255,255,255,.2);
   border-radius: var(--cell-corner-radius);
 }