Bug 1336072 - Avoid setting position:absolute on #newtab-grid since it breaks rearranging and deleting tiles. r?gijs draft
authorDão Gottwald <dao@mozilla.com>
Thu, 02 Feb 2017 13:49:29 +0100
changeset 469569 5aca5e58d4283ffb482e26fbb94f5d2d11387458
parent 469330 f985243bb630b2c78cd57731c8d8ab191aa09527
child 544243 56b1b996f12c9aba67b86c8b31d211e4a4a350eb
push id43774
push userdgottwald@mozilla.com
push dateThu, 02 Feb 2017 12:50:23 +0000
reviewersgijs
bugs1336072
milestone54.0a1
Bug 1336072 - Avoid setting position:absolute on #newtab-grid since it breaks rearranging and deleting tiles. r?gijs 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);
 }