diff --git a/core/modules/shortcut/css/shortcut.theme.css b/core/modules/shortcut/css/shortcut.theme.css index e251f62..9984ae1 100644 --- a/core/modules/shortcut/css/shortcut.theme.css +++ b/core/modules/shortcut/css/shortcut.theme.css @@ -27,33 +27,3 @@ display: inline-block; margin-left: 0.3em; } -.add-or-remove-shortcuts .text { - background: #000000; - background: rgba(0, 0, 0, 0.5); - border-radius: 5px; - padding: 0 5px; - color: #ffffff; - display: inline-block; - margin-left: 0.3em; - opacity: 0; - -ms-transform: translateY(-12px); - -moz-transform: translateY(-12px); - -webkit-transform: translateY(-12px); - transform: translateY(-12px); - -webkit-transition: all 200ms ease-out; - -moz-transition: all 200ms ease-out; - transition: all 200ms ease-out; - -ms-backface-visibility: hidden; - -moz-backface-visibility: hidden; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; -} -.add-or-remove-shortcuts a:hover .text, -.add-or-remove-shortcuts a:focus .text { - opacity: 1; - -o-transform: translateY(-2px); - -ms-transform: translateY(-2px); - -moz-transform: translateY(-2px); - -webkit-transform: translateY(-2px); - transform: translateY(-2px); -} diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module index 6d9c935..d347ef6 100644 --- a/core/modules/shortcut/shortcut.module +++ b/core/modules/shortcut/shortcut.module @@ -403,7 +403,7 @@ function shortcut_preprocess_page(&$variables) { '#route_parameters' => $route_parameters, '#options' => array('query' => $query, 'html' => TRUE, - 'attributes' => array ('class' => array('hint--right'), 'data-hint' => $link_text) + 'attributes' => array ('class' => array('hint--right'), 'data-hint' => $link_text, 'title' => $link_text) ), '#suffix' => '', ); diff --git a/core/themes/seven/css/components/seven.hint.css b/core/themes/seven/css/components/seven.hint.css new file mode 100644 index 0000000..5fb7895 --- /dev/null +++ b/core/themes/seven/css/components/seven.hint.css @@ -0,0 +1,13 @@ +.hint:before, +[data-hint]:before { + border-right-color: #000000; + border-right-color: rgba(0, 0, 0, 0.5); +} +.hint:after, +[data-hint]:after { + background: #000000; + background: rgba(0, 0, 0, 0.5); + border-radius: 5px; + box-shadow: none; + text-shadow: none; +} diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 2923605..0895203 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -13,6 +13,8 @@ use Drupal\Component\Utility\String; * Implements hook_preprocess_HOOK() for page templates. */ function seven_preprocess_page(&$variables) { + $theme_path = drupal_get_path('theme', 'seven'); + /** @var \Drupal\Core\Page\HtmlPage $page_object */ $page_object = $variables['page']['#page']; $attributes = $page_object->getBodyAttributes(); @@ -34,6 +36,10 @@ function seven_preprocess_page(&$variables) { '#theme' => 'menu_local_tasks', '#secondary' => isset($variables['tabs']['#secondary']) ? $variables['tabs']['#secondary'] : '', ); + + if (theme_get_setting('shortcut_module_link')) { + $variables['title_suffix']['add_or_remove_shortcut']['#attached']['css'] = array($theme_path . '/css/components/seven.hint.css'); + } } /**