summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authordbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 09:17:04 +0000
committerdbeam@chromium.org <dbeam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-06 09:17:04 +0000
commit38e858c4804e9a26506e9044f900af92cf80ecec (patch)
tree44d879c18c4e4cc1a0f1617b8a04439009babe7b /chrome/browser
parent3d00e87205a8050aade92ca20f1d87c45032d03a (diff)
downloadchromium_src-38e858c4804e9a26506e9044f900af92cf80ecec.zip
chromium_src-38e858c4804e9a26506e9044f900af92cf80ecec.tar.gz
chromium_src-38e858c4804e9a26506e9044f900af92cf80ecec.tar.bz2
NTP4: Dragging app over trash should be more apparent.
R=estade@chromium.org,csilv@chromium.org BUG=92912 TEST=Drag a [removable] app over the trash in either LTR or RTL and be greeted by a sweet trash can lid opening animation. Review URL: http://codereview.chromium.org/8786010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113167 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/resources/ntp4/new_tab.css74
-rw-r--r--chrome/browser/resources/ntp4/new_tab.html2
2 files changed, 66 insertions, 10 deletions
diff --git a/chrome/browser/resources/ntp4/new_tab.css b/chrome/browser/resources/ntp4/new_tab.css
index f687775..aa8f234 100644
--- a/chrome/browser/resources/ntp4/new_tab.css
+++ b/chrome/browser/resources/ntp4/new_tab.css
@@ -240,36 +240,90 @@ html[dir='rtl'] .login-status-icon {
/* Trash. *********************************************************************/
#trash {
+ -webkit-transition: top 200ms, opacity 0;
+ -webkit-transition-delay: 0, 200ms;
color: #7F7F7F;
height: 100%;
position: absolute;
opacity: 0;
right: 0;
top: 50px;
- -webkit-transition: top 200ms, opacity 0;
- -webkit-transition-delay: 0, 200ms;
+}
+
+html[dir='rtl'] #trash {
+ left: 0;
+ right: auto;
}
#footer.showing-trash-mode #trash {
- opacity: 1;
- top: 0;
-webkit-transition-delay: 0, 0;
+ -webkit-transition-duration: 0, 200ms;
+ opacity: 0.75;
+ top: 0;
+}
+
+#footer.showing-trash-mode #trash.drag-target {
+ opacity: 1;
}
#trash > span {
- background-image: url('images/trash.png');
- background-position: 7px;
- background-repeat: no-repeat;
+ display: inline-block;
+}
+
+#trash > span:not([class]) {
+ -webkit-padding-end: 7px;
+ -webkit-padding-start: 30px;
border: 1px dashed #7f7f7f;
border-radius: 4px;
- display: inline-block;
font-size: 84%;
padding-bottom: 9px;
padding-top: 10px;
position: relative;
top: 7px;
- -webkit-padding-end: 7px;
- -webkit-padding-start: 30px;
+}
+
+#trash > .can,
+#trash > .lid {
+ background: url('images/trash.png') 0 0 no-repeat;
+ position: absolute;
+}
+
+#trash > .lid {
+ -webkit-transition: -webkit-transform 200ms;
+ -webkit-transform-origin: -7% 100%;
+ height: 6px;
+ left: 10px;
+ top: 18px;
+ width: 14px;
+}
+
+html[dir='rtl'] #trash > .lid {
+ -webkit-transform-origin: 107% 100%;
+ left: auto;
+ /* NOTE: Intentionally different than LTR value. */
+ right: 9px;
+}
+
+#trash > .can {
+ background-position: -1px -4px;
+ border-radius: 0 0 2px 2px;
+ height: 12px;
+ left: 11px;
+ top: 22px;
+ width: 11px;
+}
+
+html[dir='rtl'] #trash > .can {
+ left: auto;
+ right: 11px;
+}
+
+#footer.showing-trash-mode #trash.drag-target .lid {
+ -webkit-transform: rotate(-45deg);
+}
+
+html[dir='rtl'] #footer.showing-trash-mode #trash.drag-target .lid {
+ -webkit-transform: rotate(45deg);
}
/* Page switcher buttons. *****************************************************/
diff --git a/chrome/browser/resources/ntp4/new_tab.html b/chrome/browser/resources/ntp4/new_tab.html
index 92942f5..c322a66 100644
--- a/chrome/browser/resources/ntp4/new_tab.html
+++ b/chrome/browser/resources/ntp4/new_tab.html
@@ -108,6 +108,8 @@
</button>
<div id="trash">
+ <span class="lid"></span>
+ <span class="can"></span>
<span i18n-content="appuninstall"></span>
</div>
</div>