Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4251)

Unified Diff: chrome/browser/resources/ntp4/suggested_page.css

Issue 9358031: Added new adaptive "Suggest" tab on the New Tab Page, behing the flag, for the experiments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove extra line Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/ntp4/suggested_page.css
diff --git a/chrome/browser/resources/ntp4/suggested_page.css b/chrome/browser/resources/ntp4/suggested_page.css
new file mode 100644
index 0000000000000000000000000000000000000000..fdc524285ea3ab814ba403c74b9eb3912f57e8cf
--- /dev/null
+++ b/chrome/browser/resources/ntp4/suggested_page.css
@@ -0,0 +1,186 @@
+/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
Dan Beam 2012/02/09 01:43:06 Why did you duplicate this style?
GeorgeY 2012/02/10 00:00:36 Modified copy of the Most Visited - see above.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
Dan Beam 2012/02/09 01:43:06 nit: * found in the LICENSE file. */
GeorgeY 2012/02/10 00:00:36 Done.
+ */
+
+.suggested {
+ position: absolute;
+ z-index: 0;
+}
+
+.suggested {
+ display: -webkit-box;
+ position: absolute;
+ text-decoration: none;
+ -webkit-box-orient: vertical;
Dan Beam 2012/02/09 01:43:06 -webkit rules should go at the top, alpha sorted,
GeorgeY 2012/02/10 00:00:36 Done.
+}
+
+.suggested:focus {
+ outline: none;
+}
+
+.fills-parent {
+ bottom: 0;
+ display: -webkit-box;
+ left: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+}
+
+/* filler mode: hide everything except the thumbnail --- leave a grey rectangle
+ * in its place. */
+.filler * {
+ visibility: hidden;
+}
+
+.filler {
+ pointer-events: none;
+}
+
+.suggested .close-button {
+ opacity: 0;
+ position: absolute;
+ right: 0;
+ top: 0;
+ z-index: 5;
+ -webkit-transition: opacity 150ms;
+}
+
+html[dir=rtl] .suggested .close-button {
+ left: 0;
+ right: auto;
+}
+
+.suggested:hover .close-button {
+ opacity: 1;
+ -webkit-transition-delay: 500ms;
+}
+
+.suggested .close-button:hover {
+ -webkit-transition: none;
+}
+
+.suggested .favicon {
+ -webkit-margin-start: 5px;
+ background: no-repeat left 50%;
+ bottom: 7px;
+ box-sizing: border-box;
+ display: block;
+ height: 16px;
+ position: absolute;
+ width: 16px;
+}
+
+html[dir='rtl'] .suggested .favicon {
+ background-position-x: right;
+}
+
+.suggested .color-stripe {
+ border-bottom-left-radius: 3px 3px;
+ border-bottom-right-radius: 3px 3px;
+ /* Matches height of title. */
+ bottom: 23px;
+ height: 3px;
+ /* Matches padding-top of the title. */
+ margin-bottom: 8px;
+ position: absolute;
+ width: 100%;
+ z-index: 10;
+}
+
+.suggested .title {
+ display: block;
+ height: 23px;
+ overflow: hidden;
+ padding-top: 8px;
+ text-align: center;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.thumbnail {
+ background: no-repeat;
+ /* This shows for missing thumbnails. */
+ background-color: #eee;
+ background-size: 100%;
+ border-radius: 3px;
+ /* These max dimensions are not necessary, as the sizing logic in the .js
+ * should be sufficient, but they're here for extra insurance. We never want
+ * to scale a thumbnail larger than this size. */
+ max-height: 132px;
+ max-width: 212px;
+ -webkit-transition: opacity 150ms;
+}
+
+.filler .thumbnail {
+ /* TODO(estade): there seems to be a webkit bug where this border is not
+ * always removed when it should be. Investigate. */
+ border: 1px solid;
+ visibility: visible;
+}
+
+.thumbnail-shield {
+ border-radius: 3px;
+ background: -webkit-linear-gradient(rgba(255, 255, 255, 0),
+ rgba(255, 255, 255, 0) 50%,
+ rgba(255, 255, 255, 0.9));
+}
+
+/* TODO(dbeam): Remove this when printing of -webkit-linear-gradient() works. */
+@media print {
+ .thumbnail-shield {
+ background: none;
+ }
+}
+
+.suggested:focus .thumbnail,
+.suggested:hover .thumbnail {
+ opacity: 0.95;
+}
+
+.suggested:focus .thumbnail-shield,
+.suggested:hover .thumbnail-shield,
+.suggested:active .thumbnail-shield {
+ background: -webkit-linear-gradient(rgba(255, 255, 255, 0),
+ rgba(255, 255, 255, 0) 80%,
+ rgba(255, 255, 255, 0.9));
+}
+
+/* The thumbnail gets lighter when clicked, but not when the click is on the
+ * close button. */
+.suggested:active .close-button:not(:active) + .thumbnail {
+ opacity: 0.9;
+}
+
+/* The thumbnail gets a shadow when clicked, but not when the click is on the
+ * close button. */
+.suggested:active .close-button:not(:active) + .thumbnail .thumbnail-shield {
+ -webkit-box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.2);
+}
+
+.thumbnail-wrapper {
+ border: 1px solid transparent;
+ border-radius: 3px;
+ display: block;
+ position: relative;
+ z-index: 5;
+ -webkit-box-flex: 1;
+ -webkit-transition: background-color 150ms;
+}
+
+.filler .thumbnail-wrapper {
+ visibility: visible;
+}
+
+/* 'finishing-drag' is the state we are in after dropping on the trash can.
+ * Override opacity of the tile to 1, so that the new tile animation
+ * occurs simultaneously with the trash animation. */
+.tile.dragging.finishing-drag {
+ opacity: 1;
+}
+
+/* Don't display the new tile until there's something to show. */
+.blacklisted {
+ opacity: 0;
+}

Powered by Google App Engine
This is Rietveld 408576698