From 4856561c98c4ff6c62181ba568cb0b57faa78269 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sun, 13 Dec 2009 20:08:30 +0000 Subject: [PATCH] - Patch #601150 by Frando: tweaked the CSS of the contextual links to add some padding. --- modules/contextual/contextual.css | 9 +++++---- modules/contextual/contextual.js | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/contextual/contextual.css b/modules/contextual/contextual.css index 05612cfb6b1a..3776c925d460 100644 --- a/modules/contextual/contextual.css +++ b/modules/contextual/contextual.css @@ -26,10 +26,11 @@ html.js div.contextual-links-wrapper { display: block; } a.contextual-links-trigger { - background: transparent url(images/gear-select.png) no-repeat top left; + background: transparent url(images/gear-select.png) no-repeat 2px 0; display: none; height: 18px; margin: 2px 1px 0 1px; + padding: 0 2px; outline: none; text-indent: 34px; width: 28px; @@ -37,13 +38,13 @@ a.contextual-links-trigger { } a.contextual-links-trigger:hover, div.contextual-links-active a.contextual-links-trigger { - background-position: 0 -18px; + background-position: 2px -18px; } div.contextual-links-active a.contextual-links-trigger { background-color: #fff; border: #ccc 1px solid; border-bottom: none; - padding: 0; + padding: 0 2px; margin: 1px 0 0 0; position: relative; z-index: 1; @@ -90,7 +91,7 @@ ul.contextual-links li a { color: #333; display: block; margin: 0.25em 0; - padding: 0.25em; + padding: 0.25em 1em 0.25em 0.5em; } ul.contextual-links li a:hover { background-color: #bfdcee; diff --git a/modules/contextual/contextual.js b/modules/contextual/contextual.js index 92973f661295..e5377f578649 100644 --- a/modules/contextual/contextual.js +++ b/modules/contextual/contextual.js @@ -24,8 +24,8 @@ Drupal.behaviors.contextualLinks = { function () { $region.addClass('contextual-links-region-active'); }, function () { $region.removeClass('contextual-links-region-active'); } ); - // Hide the contextual links when user rolls out of the ul.contextual-links or .contextual-links-region. - $links.add($region).bind('mouseleave', Drupal.contextualLinks.mouseleave); + // Hide the contextual links when user rolls out of the .contextual-links-region. + $region.bind('mouseleave', Drupal.contextualLinks.mouseleave); // Prepend the trigger. $links.end().prepend($trigger); }); -- GitLab