diff options
author | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 18:57:23 +0000 |
---|---|---|
committer | arv@chromium.org <arv@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-21 18:57:23 +0000 |
commit | 3c92499fe304b9b65d647e3d78303aab3cd931c9 (patch) | |
tree | 5d277bf1419334a3798b26f3d5e5a4bdefbcc6eb /chrome/browser/resources/ntp/apps.css | |
parent | b5fe86e4e754ea16b709cfb65dc497fe03a7f077 (diff) | |
download | chromium_src-3c92499fe304b9b65d647e3d78303aab3cd931c9.zip chromium_src-3c92499fe304b9b65d647e3d78303aab3cd931c9.tar.gz chromium_src-3c92499fe304b9b65d647e3d78303aab3cd931c9.tar.bz2 |
NTP: Add ability to uninstall apps from the ntp.
BUG=44915
TEST=Start chrome with --enable-apps (and optionally --enable-accelerated-compositing). Install some apps. Now hover over the app icon and click the wrench icon.
Review URL: http://codereview.chromium.org/2832014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50368 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/ntp/apps.css')
-rw-r--r-- | chrome/browser/resources/ntp/apps.css | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/chrome/browser/resources/ntp/apps.css b/chrome/browser/resources/ntp/apps.css new file mode 100644 index 0000000..f54cd93 --- /dev/null +++ b/chrome/browser/resources/ntp/apps.css @@ -0,0 +1,154 @@ +/* Apps */ + +#apps-section .app, +#apps-section .app[new=installed] { + -webkit-box-sizing: border-box; + -webkit-perspective: 400; + border-radius: 10px; + color: black; + display: inline-block; + margin: 5px 3px; + position: relative; + height: 136px; + width: 124px; /* 920 / 7 - margin * 2 */ +} + +.app > .front, +.app > .back, +.app a { + border-radius: 10px; + bottom: 0; + left: 0; + position: absolute; + right: 0; + top: 0; +} + +.app > .front, +.app > .back { + -webkit-backface-visibility: hidden; + -webkit-transition: -webkit-transform .15s; +} + +.app a { + -webkit-transition: background-color .5s; + background: rgba(255, 255, 255, 0) /* transparent white */ + no-repeat center 10px; + background-size: 96px 96px; + font-weight: bold; + overflow: hidden; + padding: 111px 10px 10px; /* 10 + 96 + 5 */ + text-align: center; + text-decoration: none; + text-overflow: ellipsis; + white-space: nowrap; +} + +.app .flip { + background-color: transparent; + border: 0; + height: 14px; + padding: 0; + position: absolute; + right: 5px; + top: 5px; + width: 14px; +} + +.app > .front > .flip { + -webkit-transition: opacity .3s; + -webkit-transition-delay: 0; + background-image: url(chrome://theme/balloon_wrench); + opacity: 0; +} + +.app > .front > .flip:hover { + -webkit-transition: none; + background-image: url(chrome://theme/balloon_wrench_hover); +} + +.app:hover > .front > .flip, +.app > .front > .flip:focus { + -webkit-transition-delay: .5s; + opacity: .9; +} + +.app > .back > .flip { + background-image: url(chrome://theme/balloon_close); + opacity: .9; +} + +.app > .back > .flip:hover { + background-image: url(chrome://theme/balloon_close_hover); +} + +.app > .back { + padding: 10px; +} + +.app > .back > h2 { + font-size: 100%; + margin: 10px 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.app > .back > button:not(.flip) { + width: 100%; +} + +@-webkit-keyframes bounce { + 0% { + -webkit-transform: scale(0, 0); + } + + 60% { + -webkit-transform: scale(1.2, 1.2); + } + + 100% { + -webkit-transform: scale(1, 1); + } +} + +#apps-section .app[new=new] { + opacity: 0; +} + +#apps-section .app[new=installed] { + -webkit-animation: bounce .5s ease-in-out; + -webkit-transition: opacity .5s; +} + +/* Make items on the wrong side non focusable by hiding them. */ +.app:not(.config) > .back button, +.app.config > .front button, +.app.config > .front a { + display: none; +} + +html[has_3d=true] .app.config > .front { + -webkit-transform: rotateY(180deg); +} + +html[has_3d=true] .app > .back { + -webkit-transform: rotateY(-180deg); +} + +html[has_3d=true] .app.config > .back { + -webkit-transform: rotateY(0deg); +} + +html[has_3d=false] .app.config > .front { + display: none; +} + +html[has_3d=false] .app > .back { + display: none; +} + +html[has_3d=false] .app.config > .back { + display: block; +} + |