diff --git a/core/modules/shortcut/shortcut.libraries.yml b/core/modules/shortcut/shortcut.libraries.yml
index 94bad9d..d3ab123 100644
--- a/core/modules/shortcut/shortcut.libraries.yml
+++ b/core/modules/shortcut/shortcut.libraries.yml
@@ -14,3 +14,5 @@ drupal.shortcut:
theme:
css/shortcut.theme.css: {}
css/shortcut.icons.css: {}
+ dependencies:
+ - core/hint.css
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index ec16b0b..d27adcb 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -390,7 +390,6 @@ function shortcut_preprocess_page(&$variables) {
'#attached' => array(
'library' => array(
'shortcut/drupal.shortcut',
- 'core/hint.css',
),
),
'#prefix' => '
',
diff --git a/core/themes/seven/seven.libraries.yml b/core/themes/seven/seven.libraries.yml
index fb22ac1..b0e9e6a 100644
--- a/core/themes/seven/seven.libraries.yml
+++ b/core/themes/seven/seven.libraries.yml
@@ -28,3 +28,9 @@ drupal.nav-tabs:
- core/drupal
- core/jquery.once
- core/jquery.intrinsic
+
+drupal.hint:
+ version: VERSION
+ css:
+ component:
+ css/components/seven.hint.css: {}
diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme
index 2687f5b..7a9fd41 100644
--- a/core/themes/seven/seven.theme
+++ b/core/themes/seven/seven.theme
@@ -12,8 +12,6 @@ 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();
@@ -37,7 +35,7 @@ function seven_preprocess_page(&$variables) {
);
if (theme_get_setting('shortcut_module_link')) {
- $variables['title_suffix']['add_or_remove_shortcut']['#attached']['css'] = array($theme_path . '/css/components/seven.hint.css');
+ $variables['title_suffix']['add_or_remove_shortcut']['#attached']['library'][] = 'seven/drupal.hint';
}
}