2013-06-26 21:54:06 -07:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
/* Tile grid ------------------------------------------------------------- */
|
|
|
|
|
|
|
|
%filter substitution
|
|
|
|
%include defines.inc
|
|
|
|
|
|
|
|
/*
|
|
|
|
*****************************************************
|
|
|
|
The following rules define the key tile dimensions
|
|
|
|
They are (also) snarfed via the CSSOM as the dimensions used in the #richgrid binding
|
|
|
|
*****************************************************
|
|
|
|
*/
|
|
|
|
richgriditem {
|
|
|
|
width: @grid_double_column_width@;
|
|
|
|
height: @grid_row_height@;
|
|
|
|
}
|
2013-07-18 07:18:29 -07:00
|
|
|
richgriditem[tiletype="thumbnail"] {
|
2013-06-26 21:54:06 -07:00
|
|
|
width: @grid_double_column_width@;
|
|
|
|
height: @grid_double_row_height@;
|
|
|
|
}
|
2013-09-19 13:33:12 -07:00
|
|
|
richgriditem[search] {
|
|
|
|
width: @grid_search_width@;
|
|
|
|
height: @grid_row_height@;
|
|
|
|
}
|
2013-06-26 21:54:06 -07:00
|
|
|
richgriditem[compact] {
|
|
|
|
width: auto;
|
|
|
|
height: @compactgrid_row_height@;
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
*****************************************************
|
|
|
|
*/
|
|
|
|
richgrid {
|
|
|
|
display: -moz-box;
|
2013-07-25 18:25:25 -07:00
|
|
|
overflow: hidden;
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
2013-10-17 12:14:08 -07:00
|
|
|
|
2013-06-26 21:54:06 -07:00
|
|
|
richgrid > .richgrid-grid {
|
|
|
|
-moz-column-width: @grid_double_column_width@; /* tile width (2x unit + gutter) */
|
|
|
|
min-width: @grid_double_column_width@; /* min 1 column */
|
|
|
|
min-height: @grid_double_row_height@; /* 2 rows (or 1 double rows) minimum; multiple of tile_height */
|
|
|
|
-moz-column-fill: auto; /* do not attempt to balance content between columns */
|
|
|
|
-moz-column-gap: 0;
|
|
|
|
-moz-column-count: auto;
|
|
|
|
display: block;
|
|
|
|
-moz-box-sizing: content-box;
|
|
|
|
overflow-x: hidden; /* clipping will only kick in if an explicit width is set */
|
|
|
|
transition: 100ms transform ease-out;
|
|
|
|
}
|
|
|
|
|
2013-09-19 13:33:12 -07:00
|
|
|
richgrid[search] > .richgrid-grid {
|
|
|
|
-moz-column-width: auto;
|
|
|
|
min-width: 0;
|
|
|
|
}
|
|
|
|
|
2013-06-26 21:54:06 -07:00
|
|
|
richgriditem {
|
|
|
|
display: block;
|
|
|
|
position: relative;
|
|
|
|
width: @grid_double_column_width@;
|
|
|
|
height: @grid_row_height@;
|
|
|
|
-moz-box-sizing: border-box;
|
|
|
|
-moz-column-gap: 0;
|
|
|
|
overflow:hidden;
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tile-content {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2013-08-10 01:29:22 -07:00
|
|
|
/* background-color colors the tile-edge,
|
|
|
|
and will normally be overridden with a favicon-based color */
|
|
|
|
background-color: #ccc;
|
2013-06-26 21:54:06 -07:00
|
|
|
background-origin: padding-box;
|
|
|
|
/* content positioning within the grid "cell"
|
|
|
|
gives us the gutters/spacing between tiles */
|
2013-07-29 11:01:36 -07:00
|
|
|
top: 2px; right: @tile_side_margin@; bottom: 10px; left: @tile_side_margin@;
|
2013-06-26 21:54:06 -07:00
|
|
|
border: @metro_border_thin@ solid @tile_border_color@;
|
|
|
|
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1);
|
2013-11-01 15:50:01 -07:00
|
|
|
transition: 150ms transform ease-out,
|
|
|
|
@metro_animation_duration@ background-color @metro_animation_easing@;
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
.tile-start-container {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
2013-08-10 01:29:22 -07:00
|
|
|
left: 10px;
|
2013-06-26 21:54:06 -07:00
|
|
|
padding: 8px;
|
2013-08-10 01:29:22 -07:00
|
|
|
background-color: #fff;
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
|
|
|
|
2013-09-19 13:33:12 -07:00
|
|
|
richgriditem[search] .tile-start-container {
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
2013-07-25 12:57:35 -07:00
|
|
|
richgriditem:not([tiletype="thumbnail"]) .tile-start-container {
|
|
|
|
background-image: none!important;
|
|
|
|
}
|
|
|
|
|
2013-06-26 21:54:06 -07:00
|
|
|
.tile-icon-box {
|
2013-08-10 01:29:22 -07:00
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
margin-top: -17px;
|
|
|
|
padding: 8px;
|
|
|
|
/* default color, may be overriden by a favicon-based color */
|
|
|
|
background-color: white;
|
|
|
|
border: 1px solid #ccc;
|
|
|
|
border-radius: 1px;
|
2013-06-26 21:54:06 -07:00
|
|
|
opacity: 1.0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tile-icon-box > image {
|
2013-08-10 01:29:22 -07:00
|
|
|
display: block;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
list-style-image: url("chrome://browser/skin/images/identity-icons-generic.png");
|
|
|
|
}
|
|
|
|
|
|
|
|
/* for larger favicons (which includes the fallback icon) */
|
|
|
|
richgriditem:not([iconURI]) .tile-icon-box,
|
|
|
|
richgriditem[iconURI=""] .tile-icon-box,
|
|
|
|
richgriditem[iconsize="large"] .tile-icon-box {
|
|
|
|
border-color: transparent!important;
|
|
|
|
padding: 4px;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[iconsize="large"] .tile-icon-box > image,
|
|
|
|
.tile-icon-box > image[src=""] {
|
2013-06-26 21:54:06 -07:00
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
}
|
|
|
|
|
2013-09-19 13:33:12 -07:00
|
|
|
richgriditem[search] .tile-icon-box {
|
|
|
|
padding: 0;
|
|
|
|
border: 0;
|
|
|
|
left: 50%;
|
|
|
|
margin-left: -13px;
|
|
|
|
margin-top: -8px;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[search][iconsize="large"] .tile-icon-box {
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
margin: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[search][iconsize="large"] .tile-start-container {
|
|
|
|
left: 0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[search][iconsize="large"] .tile-icon-box > image {
|
|
|
|
width: 74px;
|
|
|
|
height: 74px;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[search] .tile-desc {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[search] .tile-content {
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
|
2013-06-26 21:54:06 -07:00
|
|
|
.tile-desc {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
2013-08-10 01:29:22 -07:00
|
|
|
top: 6px;
|
|
|
|
left: 52px; /* label goes to the right of the favicon */
|
2013-06-26 21:54:06 -07:00
|
|
|
right: 0;
|
2013-08-10 01:29:22 -07:00
|
|
|
padding: 1em 6px 6px 12px;
|
2013-09-25 13:42:09 -07:00
|
|
|
background: white;
|
2013-06-26 21:54:06 -07:00
|
|
|
color: #333;
|
|
|
|
margin: 0;
|
|
|
|
-moz-margin-start: 0;
|
|
|
|
display: block;
|
2013-08-10 01:29:22 -07:00
|
|
|
font-size: 16px;
|
2013-06-26 21:54:06 -07:00
|
|
|
overflow: hidden;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2013-11-01 15:50:01 -07:00
|
|
|
transition: @metro_animation_duration@ background-color @metro_animation_easing@;
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
|
|
|
|
2013-08-10 01:29:22 -07:00
|
|
|
richgriditem:not([tiletype="thumbnail"]) .tile-desc {
|
|
|
|
background-color: transparent!important;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-06-26 21:54:06 -07:00
|
|
|
richgriditem.collapsed {
|
|
|
|
height: 0!important;
|
|
|
|
overflow: hidden;
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem.collapsed > .tile-content {
|
|
|
|
transform: scaleY(0);
|
|
|
|
transition: 150ms transform ease-out 150ms;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem:active {
|
|
|
|
z-index: 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* thumbnail variation */
|
2013-07-18 07:18:29 -07:00
|
|
|
|
|
|
|
richgriditem[tiletype="thumbnail"] .tile-start-container {
|
|
|
|
background-image: url("chrome://browser/skin/images/firefox-watermark.png");
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[tiletype="thumbnail"] {
|
2013-06-26 21:54:06 -07:00
|
|
|
width: @grid_double_column_width@;
|
|
|
|
height: @grid_double_row_height@;
|
|
|
|
-moz-box-pack: end;
|
|
|
|
padding: 0px;
|
|
|
|
color: #1a1a1a;
|
|
|
|
}
|
|
|
|
|
2013-07-18 07:18:29 -07:00
|
|
|
richgriditem[tiletype="thumbnail"] .tile-desc {
|
2013-08-10 01:29:22 -07:00
|
|
|
margin: 0;
|
|
|
|
top: auto;
|
|
|
|
bottom: 0;
|
2013-06-26 21:54:06 -07:00
|
|
|
left: 0;
|
2013-08-10 01:29:22 -07:00
|
|
|
padding: 4px 8px 4px 56px;
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
|
|
|
|
2013-07-18 07:18:29 -07:00
|
|
|
richgriditem[tiletype="thumbnail"] > .tile-content > .tile-desc {
|
2013-06-26 21:54:06 -07:00
|
|
|
/* ensure thumbnail labels get their color from the parent richgriditem element */
|
|
|
|
color: inherit;
|
|
|
|
}
|
|
|
|
|
2013-08-10 01:29:22 -07:00
|
|
|
/* thumbnail tiles use a screenshot thumbnail as the background */
|
2013-07-18 07:18:29 -07:00
|
|
|
richgriditem[tiletype="thumbnail"] > .tile-content > .tile-start-container {
|
2013-06-26 21:54:06 -07:00
|
|
|
background-size: cover;
|
|
|
|
background-position: top left;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
2013-08-10 01:29:22 -07:00
|
|
|
bottom: 0;
|
2013-06-26 21:54:06 -07:00
|
|
|
right: 0;
|
|
|
|
left: 0;
|
|
|
|
}
|
2013-07-18 07:18:29 -07:00
|
|
|
richgriditem[tiletype="thumbnail"] .tile-icon-box {
|
2013-08-10 01:29:22 -07:00
|
|
|
top: auto;
|
|
|
|
left: 10px;
|
|
|
|
bottom: 6px;
|
|
|
|
margin-top: 0;
|
|
|
|
z-index: 1;
|
|
|
|
box-shadow: 0px 0px 2px 2px rgba(0, 0, 0, 0.05), 0px 2px 0px rgba(0, 0, 0, 0.1);
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* selected tile indicator */
|
|
|
|
richgriditem[selected] > .tile-content::after {
|
|
|
|
content: "";
|
|
|
|
pointer-events: none;
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
z-index: 1;
|
|
|
|
background-image: url(chrome://browser/skin/images/tile-selected-check-hdpi.png);
|
|
|
|
background-origin: border-box;
|
|
|
|
background-position: right 0 top 0;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
/* scale the image whatever the dppx */
|
|
|
|
background-size: 35px 35px;
|
|
|
|
border: @metro_border_xthick@ solid @selected_color@;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[crosssliding] {
|
|
|
|
z-index: 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ease the return to original position when cross-sliding */
|
|
|
|
richgriditem:not([crosssliding]) {
|
|
|
|
transition: transform ease-out 0.2s;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* tile pinned-state indication */
|
|
|
|
richgriditem[pinned] > .tile-content::before {
|
|
|
|
pointer-events:none;
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
right: 0;
|
|
|
|
left: auto;
|
|
|
|
z-index: 1;
|
|
|
|
width: 35px;
|
|
|
|
height: 35px;
|
|
|
|
background-image: url(chrome://browser/skin/images/pinned-hdpi.png);
|
|
|
|
background-position: center;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
/* scale the image whatever the dppx */
|
|
|
|
background-size: 70px 70px;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Selected _and_ pinned tiles*/
|
|
|
|
richgriditem[selected][pinned] > .tile-content::before {
|
|
|
|
background-position: right -@metro_border_xthick@ top -@metro_border_xthick@;
|
|
|
|
width: 70px;
|
|
|
|
height: 70px;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[pinned]:-moz-locale-dir(rtl) > .tile-content::before {
|
|
|
|
left: 0;
|
|
|
|
right: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem[customColor] {
|
|
|
|
color: #f1f1f1;
|
|
|
|
}
|
|
|
|
|
2013-07-09 18:04:08 -07:00
|
|
|
richgriditem[bending] > .tile-content {
|
|
|
|
transform-origin: center center;
|
|
|
|
}
|
|
|
|
|
2013-10-16 16:17:17 -07:00
|
|
|
/* Empty/unused tiles */
|
|
|
|
richgriditem:not([value]) {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
|
|
|
richgriditem[tiletype="thumbnail"]:not([value]) {
|
|
|
|
visibility: visible;
|
|
|
|
}
|
|
|
|
richgriditem:not([value]) > .tile-content {
|
|
|
|
padding: 10px 14px;
|
|
|
|
}
|
|
|
|
richgriditem[tiletype="thumbnail"]:not([value]) > .tile-content {
|
|
|
|
box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.05);
|
|
|
|
background-image: url("chrome://browser/skin/images/firefox-watermark.png");
|
|
|
|
background-origin: content-box;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-color: rgba(255,255,255, 0.2);
|
|
|
|
background-position: center center;
|
|
|
|
background-size: @grid_row_height@;
|
|
|
|
}
|
|
|
|
|
2013-06-26 21:54:06 -07:00
|
|
|
/* Snapped-view variation
|
|
|
|
We use the compact, single-column grid treatment for <=320px */
|
|
|
|
|
|
|
|
@media (max-width: 330px) {
|
|
|
|
|
2013-09-19 13:33:12 -07:00
|
|
|
richgrid:not([search]) > .richgrid-grid {
|
2013-06-26 21:54:06 -07:00
|
|
|
-moz-column-width: auto!important; /* let it flow */
|
|
|
|
-moz-column-count: auto!important; /* let it flow */
|
|
|
|
height: auto; /* let it flow */
|
|
|
|
min-width: 280px;
|
|
|
|
transition: 100ms transform ease-out;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem {
|
|
|
|
width: @grid_double_column_width@;
|
|
|
|
overflow: hidden;
|
|
|
|
height: @compactgrid_row_height@;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tile-desc {
|
2013-08-10 01:29:22 -07:00
|
|
|
padding: 0.5em 4px 4px 4px;
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|
2013-08-07 13:11:44 -07:00
|
|
|
|
2013-09-19 13:33:12 -07:00
|
|
|
richgriditem:not([search]) > .tile-content {
|
2013-08-07 13:11:44 -07:00
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
richgriditem {
|
|
|
|
width: auto;
|
|
|
|
}
|
2013-06-26 21:54:06 -07:00
|
|
|
}
|