Skip to content
Snippets Groups Projects
Commit 4856561c authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #601150 by Frando: tweaked the CSS of the contextual links to add some padding.

parent d7dbb49a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -26,10 +26,11 @@ html.js div.contextual-links-wrapper { ...@@ -26,10 +26,11 @@ html.js div.contextual-links-wrapper {
display: block; display: block;
} }
a.contextual-links-trigger { 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; display: none;
height: 18px; height: 18px;
margin: 2px 1px 0 1px; margin: 2px 1px 0 1px;
padding: 0 2px;
outline: none; outline: none;
text-indent: 34px; text-indent: 34px;
width: 28px; width: 28px;
...@@ -37,13 +38,13 @@ a.contextual-links-trigger { ...@@ -37,13 +38,13 @@ a.contextual-links-trigger {
} }
a.contextual-links-trigger:hover, a.contextual-links-trigger:hover,
div.contextual-links-active a.contextual-links-trigger { div.contextual-links-active a.contextual-links-trigger {
background-position: 0 -18px; background-position: 2px -18px;
} }
div.contextual-links-active a.contextual-links-trigger { div.contextual-links-active a.contextual-links-trigger {
background-color: #fff; background-color: #fff;
border: #ccc 1px solid; border: #ccc 1px solid;
border-bottom: none; border-bottom: none;
padding: 0; padding: 0 2px;
margin: 1px 0 0 0; margin: 1px 0 0 0;
position: relative; position: relative;
z-index: 1; z-index: 1;
...@@ -90,7 +91,7 @@ ul.contextual-links li a { ...@@ -90,7 +91,7 @@ ul.contextual-links li a {
color: #333; color: #333;
display: block; display: block;
margin: 0.25em 0; margin: 0.25em 0;
padding: 0.25em; padding: 0.25em 1em 0.25em 0.5em;
} }
ul.contextual-links li a:hover { ul.contextual-links li a:hover {
background-color: #bfdcee; background-color: #bfdcee;
......
...@@ -24,8 +24,8 @@ Drupal.behaviors.contextualLinks = { ...@@ -24,8 +24,8 @@ Drupal.behaviors.contextualLinks = {
function () { $region.addClass('contextual-links-region-active'); }, function () { $region.addClass('contextual-links-region-active'); },
function () { $region.removeClass('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. // Hide the contextual links when user rolls out of the .contextual-links-region.
$links.add($region).bind('mouseleave', Drupal.contextualLinks.mouseleave); $region.bind('mouseleave', Drupal.contextualLinks.mouseleave);
// Prepend the trigger. // Prepend the trigger.
$links.end().prepend($trigger); $links.end().prepend($trigger);
}); });
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment