From 809f380aa638549c15ec1a74b273b88df7120b69 Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 22 Jan 2013 09:09:57 -0800 Subject: [PATCH] Fix FileTreeView sprites Summary: D4453 and D4427 sailed past one another, like ships in the night. Test Plan: Verified Differential hover and selected states. Reviewers: asherkin, chad Reviewed By: chad CC: aran Differential Revision: https://secure.phabricator.com/D4577 --- resources/sprite/manifest/gradient.json | 6 +++--- .../celerity/CeleritySpriteGenerator.php | 10 +++++++--- webroot/rsrc/css/layout/phabricator-filetree-view.css | 8 -------- webroot/rsrc/css/sprite-gradient.css | 6 +++--- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/resources/sprite/manifest/gradient.json b/resources/sprite/manifest/gradient.json index 43736710c6..484ab83f2b 100644 --- a/resources/sprite/manifest/gradient.json +++ b/resources/sprite/manifest/gradient.json @@ -53,7 +53,7 @@ }, "gradient-menu-hover" : { "name" : "gradient-menu-hover", - "rule" : ".gradient-menu-hover, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover", + "rule" : ".gradient-menu-hover, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover, .phabricator-filetree a.phabricator-filetree-item:hover", "hash" : "856380207ac8c5cb6770d44dceb245a8" }, "gradient-menu-label" : { @@ -63,13 +63,13 @@ }, "gradient-menu-selected" : { "name" : "gradient-menu-selected", - "rule" : ".gradient-menu-selected, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover", + "rule" : ".gradient-menu-selected, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover, .phabricator-nav-local a.phabricator-active-nav-focus", "hash" : "815bafb94e11c23e1a419ea85dcae113" } }, "scales" : [ 1 ], - "header" : "\/**\n * @provides sprite-gradient-css\n * @generated\n *\/\n\n.sprite-gradient, button, a.button, a.button:visited, input.inputsubmit, .phabricator-dark-menu .phabricator-menu-item-type-label, .phabricator-side-menu .phabricator-menu-item-type-label, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover {\n background-image: url(\/rsrc\/image\/sprite-gradient.png);\n background-repeat: repeat-x;\n}\n\n\n", + "header" : "\/**\n * @provides sprite-gradient-css\n * @generated\n *\/\n\n.sprite-gradient, button, a.button, a.button:visited, input.inputsubmit, .phabricator-dark-menu .phabricator-menu-item-type-label, .phabricator-side-menu .phabricator-menu-item-type-label, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover, .phabricator-filetree a.phabricator-filetree-item:hover, .phabricator-filetree a.phabricator-active-nav-focus {\n background-image: url(\/rsrc\/image\/sprite-gradient.png);\n background-repeat: repeat-x;\n}\n\n\n", "type" : "repeat-x" } diff --git a/src/infrastructure/celerity/CeleritySpriteGenerator.php b/src/infrastructure/celerity/CeleritySpriteGenerator.php index d926b9885e..b9faed446d 100644 --- a/src/infrastructure/celerity/CeleritySpriteGenerator.php +++ b/src/infrastructure/celerity/CeleritySpriteGenerator.php @@ -202,11 +202,13 @@ final class CeleritySpriteGenerator { ', .phabricator-side-menu .phabricator-menu-item-type-label', 'menu-hover' => ', .device-desktop .phabricator-side-menu '. - 'a.phabricator-menu-item-type-link:hover', + 'a.phabricator-menu-item-type-link:hover, '. + '.phabricator-filetree a.phabricator-filetree-item:hover', 'menu-selected' => ', .phabricator-side-menu .phabricator-menu-item-selected, '. '.device-desktop .phabricator-side-menu '. - 'a.phabricator-menu-item-selected:hover', + 'a.phabricator-menu-item-selected:hover, '. + '.phabricator-nav-local a.phabricator-active-nav-focus', ); $sprites = array(); @@ -233,7 +235,9 @@ final class CeleritySpriteGenerator { 'a.phabricator-menu-item-type-link:hover, '. '.phabricator-side-menu .phabricator-menu-item-selected, '. '.device-desktop .phabricator-side-menu '. - 'a.phabricator-menu-item-selected:hover '); + 'a.phabricator-menu-item-selected:hover, '. + '.phabricator-filetree a.phabricator-filetree-item:hover, '. + '.phabricator-filetree a.phabricator-active-nav-focus'); foreach ($sprites as $sprite) { $sheet->addSprite($sprite); } diff --git a/webroot/rsrc/css/layout/phabricator-filetree-view.css b/webroot/rsrc/css/layout/phabricator-filetree-view.css index 5b96f71f4a..5cb5026f63 100644 --- a/webroot/rsrc/css/layout/phabricator-filetree-view.css +++ b/webroot/rsrc/css/layout/phabricator-filetree-view.css @@ -45,8 +45,6 @@ } .phabricator-filetree a.phabricator-filetree-item:hover { - background-image: url(/rsrc/image/menu_hover.png); - background-repeat: repeat-x; text-decoration: none; } @@ -57,9 +55,3 @@ .phabricator-filetree-icon-dir { background-image: url(/rsrc/image/icon/fatcow/folder.png); } - -.phabricator-nav-local - a.phabricator-active-nav-focus { - background-image: url(/rsrc/image/menu_selected.png); - background-repeat: repeat-x; -} diff --git a/webroot/rsrc/css/sprite-gradient.css b/webroot/rsrc/css/sprite-gradient.css index be9a1a9464..861ebc5249 100644 --- a/webroot/rsrc/css/sprite-gradient.css +++ b/webroot/rsrc/css/sprite-gradient.css @@ -3,7 +3,7 @@ * @generated */ -.sprite-gradient, button, a.button, a.button:visited, input.inputsubmit, .phabricator-dark-menu .phabricator-menu-item-type-label, .phabricator-side-menu .phabricator-menu-item-type-label, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover { +.sprite-gradient, button, a.button, a.button:visited, input.inputsubmit, .phabricator-dark-menu .phabricator-menu-item-type-label, .phabricator-side-menu .phabricator-menu-item-type-label, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover, .phabricator-filetree a.phabricator-filetree-item:hover, .phabricator-filetree a.phabricator-active-nav-focus { background-image: url(/rsrc/image/sprite-gradient.png); background-repeat: repeat-x; } @@ -51,7 +51,7 @@ background-position: 0px -240px; } -.gradient-menu-hover, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover { +.gradient-menu-hover, .device-desktop .phabricator-side-menu a.phabricator-menu-item-type-link:hover, .phabricator-filetree a.phabricator-filetree-item:hover { background-position: 0px -267px; } @@ -59,6 +59,6 @@ background-position: 0px 0px; } -.gradient-menu-selected, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover { +.gradient-menu-selected, .phabricator-side-menu .phabricator-menu-item-selected, .device-desktop .phabricator-side-menu a.phabricator-menu-item-selected:hover, .phabricator-nav-local a.phabricator-active-nav-focus { background-position: 0px -296px; }