зеркало из https://github.com/mozilla/gecko-dev.git
Bug 892425 - Stabilize grid sizing in start sections with & without scrollbars. r=mbrubeck
This commit is contained in:
Родитель
496513c7cd
Коммит
188ab01295
|
@ -358,21 +358,17 @@
|
||||||
|
|
||||||
<field name="_rowCount">0</field>
|
<field name="_rowCount">0</field>
|
||||||
<property name="rowCount" readonly="true" onget="return this._rowCount;"/>
|
<property name="rowCount" readonly="true" onget="return this._rowCount;"/>
|
||||||
|
|
||||||
<field name="_columnCount">0</field>
|
<field name="_columnCount">0</field>
|
||||||
<property name="columnCount" readonly="true" onget="return this._columnCount;"/>
|
<property name="columnCount" readonly="true" onget="return this._columnCount;"/>
|
||||||
|
|
||||||
<property name="_containerSize">
|
<property name="_containerSize">
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
// return the rect that represents our bounding box
|
// return the rect that represents our bounding box
|
||||||
let containerNode = this.parentNode;
|
let containerNode = this.hasAttribute("flex") ? this : this.parentNode;
|
||||||
|
|
||||||
// Autocomplete is a binding within a binding, so we have to step
|
// Autocomplete is a binding within a binding, so we have to step
|
||||||
// up an additional parentNode.
|
// up an additional parentNode.
|
||||||
if (containerNode.id == "results-vbox" ||
|
if (containerNode.id == "results-vbox" ||
|
||||||
containerNode.id == "searches-vbox")
|
containerNode.id == "searches-vbox")
|
||||||
containerNode = containerNode.parentNode;
|
containerNode = containerNode.parentNode;
|
||||||
|
|
||||||
let rect = containerNode.getBoundingClientRect();
|
let rect = containerNode.getBoundingClientRect();
|
||||||
// return falsy if the container has no height
|
// return falsy if the container has no height
|
||||||
return rect.height ? {
|
return rect.height ? {
|
||||||
|
|
|
@ -205,18 +205,20 @@ documenttab[selected] .documenttab-selection {
|
||||||
#start-container:not([filtering]) > #start-autocomplete {
|
#start-container:not([filtering]) > #start-autocomplete {
|
||||||
visibility: collapse;
|
visibility: collapse;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* startUI sections, grids */
|
/* startUI sections, grids */
|
||||||
#start-container .meta-section {
|
#start-scrollbox > .meta-section {
|
||||||
/* allot space for at least a single column */
|
/* allot space for at least a single column */
|
||||||
min-width: @grid_double_column_width@;
|
min-width: @grid_double_column_width@;
|
||||||
|
/* leave margin for horizontal scollbar */
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
#start-scrollbox[input="precise"] > .meta-section {
|
||||||
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#start-topsites {
|
#start-topsites {
|
||||||
/* allot space for 3 tile columns for the topsites grid */
|
/* allot space for 3 tile columns for the topsites grid */
|
||||||
min-width: calc(3 * @grid_double_column_width@);
|
min-width: calc(3 * @grid_double_column_width@);
|
||||||
}
|
}
|
||||||
|
|
||||||
#start-scrollbox {
|
#start-scrollbox {
|
||||||
-moz-box-orient: horizontal;
|
-moz-box-orient: horizontal;
|
||||||
/* Move scrollbar above toolbar,
|
/* Move scrollbar above toolbar,
|
||||||
|
@ -232,20 +234,17 @@ documenttab[selected] .documenttab-selection {
|
||||||
#start-autocomplete[viewstate="snapped"] .richgrid-item-content {
|
#start-autocomplete[viewstate="snapped"] .richgrid-item-content {
|
||||||
-moz-box-orient: horizontal;
|
-moz-box-orient: horizontal;
|
||||||
}
|
}
|
||||||
|
|
||||||
#start-container,
|
#start-container,
|
||||||
#start-autocomplete {
|
#start-autocomplete {
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
}
|
}
|
||||||
|
#start-container[viewstate="snapped"] #start-scrollbox > .meta-section {
|
||||||
#start-container[viewstate="snapped"] .meta-section {
|
|
||||||
margin: 0;
|
margin: 0;
|
||||||
min-width: @grid_double_column_width@;
|
min-width: @grid_double_column_width@;
|
||||||
-moz-box-flex: 1;
|
-moz-box-flex: 1;
|
||||||
-moz-box-align: center;
|
-moz-box-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#start-container[viewstate="snapped"] richgrid {
|
#start-container[viewstate="snapped"] richgrid {
|
||||||
visibility: collapse;
|
visibility: collapse;
|
||||||
}
|
}
|
||||||
|
|
|
@ -653,24 +653,19 @@ arrowbox {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-section {
|
.meta-section {
|
||||||
margin: 0 @metro_spacing_large@;
|
margin: 0 @metro_spacing_large@;
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-section-title {
|
.meta-section-title {
|
||||||
font-size: @metro_font_large@;
|
font-size: @metro_font_large@;
|
||||||
font-weight: 100;
|
font-weight: 100;
|
||||||
visibility: collapse;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#start-container[viewstate="snapped"] .meta-section-title.narrow-title,
|
#start-container[viewstate="snapped"] .meta-section-title.narrow-title,
|
||||||
#start-container:not([viewstate="snapped"]) .meta-section-title.wide-title {
|
#start-container:not([viewstate="snapped"]) .meta-section-title.wide-title {
|
||||||
visibility: visible;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* App bars ----------------------------------------------------------------- */
|
/* App bars ----------------------------------------------------------------- */
|
||||||
|
|
||||||
appbar {
|
appbar {
|
||||||
display: block;
|
display: block;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
|
@ -25,15 +25,13 @@ richgriditem[compact] {
|
||||||
width: auto;
|
width: auto;
|
||||||
height: @compactgrid_row_height@;
|
height: @compactgrid_row_height@;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*****************************************************
|
*****************************************************
|
||||||
*/
|
*/
|
||||||
|
|
||||||
richgrid {
|
richgrid {
|
||||||
display: -moz-box;
|
display: -moz-box;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
richgrid > .richgrid-grid {
|
richgrid > .richgrid-grid {
|
||||||
-moz-column-width: @grid_double_column_width@; /* tile width (2x unit + gutter) */
|
-moz-column-width: @grid_double_column_width@; /* tile width (2x unit + gutter) */
|
||||||
min-width: @grid_double_column_width@; /* min 1 column */
|
min-width: @grid_double_column_width@; /* min 1 column */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче