blob: 84109232f1ca3b61344ce151f01ba86c5b730d63 [file] [log] [blame]
/* Copyright 2015 The Chromium Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file. */
body {
-webkit-user-select: none;
background: none transparent;
color: #323232;
margin: 0;
overflow: hidden;
padding: 0;
}
a {
display: block;
}
a,
a:active,
a:hover,
a:visited {
color: inherit;
text-decoration: none;
}
#most-visited {
-webkit-user-select: none;
margin: 0;
text-align: -webkit-center;
}
#mv-tiles,
.mv-tiles-old {
-webkit-user-select: none;
font-size: 0;
margin: 0;
opacity: 0;
position: absolute;
/* This align correctly for both LTR and RTL */
text-align: -webkit-auto;
transition: opacity 1s;
}
.thumb-ntp #mv-tiles,
.thumb-ntp .mv-tiles-old {
height: calc(146px + 130px);
line-height: 146px;
}
.icon-ntp #mv-tiles,
.icon-ntp .mv-tiles-old {
height: calc(2 * 112px);
line-height: 112px;
width: 100%;
}
.mv-tile,
.mv-empty-tile {
box-sizing: border-box;
display: inline-block;
font-family: arial, sans-serif;
font-size: 12px;
opacity: 1;
outline: 0;
overflow: hidden;
position: relative;
vertical-align: top;
white-space: nowrap;
}
.mv-tile.hidden,
.mv-empty-tile.hidden {
display: none;
}
.thumb-ntp .mv-tile,
.thumb-ntp .mv-empty-tile {
background: rgb(242,242,242);
border: 1px solid transparent;
border-radius: 2px;
height: calc(130px - 2px);
line-height: 100%;
margin: 0 8px;
width: calc(156px - 2px);
}
.icon-ntp .mv-tile,
.icon-ntp .mv-empty-tile {
border: none;
border-radius: 2px;
height: calc(102px + 18px - 12px);
margin: 0 12px 4px 12px;
width: calc(48px + 2 * 18px);
}
.mv-tile {
-webkit-transition-duration: 200ms;
-webkit-transition-property: -webkit-transform, border,
box-shadow, margin, opacity, width;
cursor: pointer;
}
.thumb-ntp .mv-tile:focus:not(:hover) {
-webkit-filter: brightness(75%);
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.2);
}
.icon-ntp .mv-tile:focus {
background: rgba(0,0,0,0.2);
}
.icon-ntp.dark .mv-tile:focus {
background: rgba(255,255,255,0.2);
}
.mv-tile.blacklisted {
-webkit-transform: scale(0, 0);
border: none !important;
margin: 0;
width: 0;
}
.thumb-ntp .mv-tile:hover {
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.1), 0 4px 8px 0 rgba(0,0,0,0.2);
}
.mv-tile.mv-blacklist {
opacity: 0;
}
.mv-tile.mv-blacklist {
-webkit-transform: scale(0, 0);
-webkit-transform-origin: 0 41px;
margin-left: 0;
margin-right: 0;
width: 0;
}
.mv-title {
border: none;
overflow: hidden;
position: absolute;
text-overflow: clip;
}
.mv-title.multiline {
white-space: pre-wrap;
word-wrap: break-word;
}
.thumb-ntp .mv-title {
-webkit-mask-image:
linear-gradient(to right, #000, #000, 100px, transparent);
height: 15px;
left: 31px;
line-height: 14px;
padding: 0;
top: 8px;
width: calc(156px - 32px - 4px);
}
html:not([dir=rtl]) .thumb-ntp .mv-title[style*='direction: rtl'] {
-webkit-mask-image:
linear-gradient(to left, black, black, 100px, transparent);
left: auto;
right: 8px;
text-align: right;
}
html[dir=rtl] .mv-title {
left: 8px;
text-align: left;
}
html[dir=rtl] .thumb-ntp .mv-title[style*='direction: rtl'] {
-webkit-mask-image:
linear-gradient(to left, black, black, 100px, transparent);
right: 31px;
text-align: right;
}
.icon-ntp .mv-title {
height: 28px;
left: auto;
line-height: 117%;
right: auto;
text-align: center;
top: 76px;
width: 100%;
z-index: 5;
}
.mv-thumb {
border: none;
cursor: pointer;
display: block;
overflow: hidden;
position: absolute;
}
.thumb-ntp .mv-thumb {
border-radius: 0;
height: 94px;
left: 3px;
top: 31px;
width: 148px;
}
.mv-thumb img.thumbnail {
height: auto;
min-height: 100%;
width: 100%;
}
.mv-thumb img.large-icon {
-webkit-clip-path: inset(0 0 0 0 round 4px);
height: 48px;
left: 50%;
margin-left: -24px;
margin-top: -24px;
position: absolute;
top: 50%;
width: 48px;
}
.mv-thumb.failed-img,
.mv-thumb.large-icon-outer {
background-color: #fff;
height: 94px;
width: 148px;
}
.icon-ntp .mv-thumb,
.icon-ntp .mv-thumb-fallback {
background: transparent;
height: 48px;
left: 50%;
margin-left: -24px;
top: 18px;
width: 48px;
}
/* We use ::after without content to provide an aditional element on top of the
* thumbnail. */
.mv-thumb.failed-img::after {
border: 8px solid #f2f2f2;
border-radius: 50%;
content: '';
display: block;
height: 0;
margin: 39px 66px;
width: 0;
}
.mv-x {
-webkit-transition: opacity 150ms;
border: none;
cursor: pointer;
opacity: 0;
position: absolute;
}
.thumb-ntp .mv-x {
background: linear-gradient(to left, rgb(242,242,242) 60%, transparent);
height: 30px;
right: 0;
width: 40px;
}
.icon-ntp .mv-x {
background: none;
height: 16px;
right: 10px;
top: 10px;
width: 16px;
}
/* We use ::after without content to provide the masked X element. The "bottom"
* div is actually just the gradient. */
.mv-x::after {
-webkit-mask-image: -webkit-image-set(
url(chrome-search://local-ntp/images/close_3_mask.png) 1x,
url(chrome-search://local-ntp/images/close_3_mask.png@2x) 2x);
-webkit-mask-position: 12px 10px;
-webkit-mask-repeat: no-repeat;
-webkit-mask-size: 10px 10px;
background-color: rgba(90,90,90,0.7);
content: '';
display: block;
height: 32px;
position: absolute;
right: 0;
width: 32px;
}
.icon-ntp .mv-x::after {
-webkit-mask: none;
background-color: inherit;
background-image: -webkit-image-set(
url(chrome-search://local-ntp/images/close_4_button.png) 1x,
url(chrome-search://local-ntp/images/close_4_button.png@2x) 2x);
height: 16px;
width: 16px;
}
html[dir=rtl] .thumb-ntp .mv-x {
background: linear-gradient(to right, rgb(242,242,242) 60%, transparent);
left: -1px;
right: auto;
}
html[dir=rtl] .thumb-ntp .mv-x::after {
left: -1px;
right: auto;
}
html[dir=rtl] .icon-ntp .mv-x {
left: 10px;
right: auto;
}
.thumb-ntp .mv-x:hover::after {
background-color: rgb(90,90,90);
}
.thumb-ntp .mv-x:active::after {
background-color: rgb(66,133,244);
}
.icon-ntp .mv-x:hover::after,
.icon-ntp .mv-x:active::after {
background-color: inherit;
}
.mv-tile:hover .mv-x {
-webkit-transition-delay: 500ms;
opacity: 1;
}
.icon-ntp .mv-tile:hover .mv-x {
-webkit-transition-delay: 800ms;
}
.mv-x:hover {
-webkit-transition: none;
}
.mv-favicon {
background-size: 16px;
height: 16px;
left: 7px;
margin: 0;
pointer-events: none;
position: absolute;
top: 7px;
width: 16px;
}
html[dir=rtl] .mv-favicon {
left: auto;
right: 7px;
}
.mv-favicon.failed-favicon {
background-image: -webkit-image-set(
url(chrome-search://local-ntp/images/ntp_default_favicon.png) 1x,
url(chrome-search://local-ntp/images/ntp_default_favicon.png@2x) 2x);
background-repeat: no-repeat;
background-size: 16px 16px;
}
.mv-favicon img {
height: 100%;
width: 100%;
}
.mv-favicon.failed-favicon img {
display: none;
}