diff --git a/core/misc/icons/787878/9992-pencil.svg b/core/misc/icons/787878/9992-pencil.svg
index 229e480..ca821f3 100644
--- a/core/misc/icons/787878/9992-pencil.svg
+++ b/core/misc/icons/787878/9992-pencil.svg
@@ -1 +1 @@
-
+
diff --git a/core/modules/contextual/css/contextual.icons.css b/core/modules/contextual/css/contextual.icons.css
index c0c172f..fa622c0 100644
--- a/core/modules/contextual/css/contextual.icons.css
+++ b/core/modules/contextual/css/contextual.icons.css
@@ -18,3 +18,22 @@
.no-svg .toolbar-icon-edit.active:before {
background-image: url("../../../misc/edit-active.png");
}
+
+/**
+ * Contextual trigger.
+ */
+.contextual .trigger {
+ background-image: url("../../../misc/icons/787878/9992-pencil.svg");
+ background-position: center center;
+ background-repeat: no-repeat;
+ background-size: 16px 16px;
+ /* Override the .focusable height: auto */
+ height: 28px !important;
+ /* Override the .focusable height: auto */
+ width: 28px !important;
+ text-indent: -9999px;
+
+}
+.no-svg .contextual .trigger {
+ background-image: url("../../../misc/edit.png");
+}
diff --git a/core/modules/contextual/css/contextual.theme.css b/core/modules/contextual/css/contextual.theme.css
index 7b7feee..c8cc6ed 100644
--- a/core/modules/contextual/css/contextual.theme.css
+++ b/core/modules/contextual/css/contextual.theme.css
@@ -31,24 +31,15 @@
.contextual .trigger {
background-attachment: scroll;
background-color: #fff;
- background-image: url(../../../misc/edit.png);
- background-position: center center;
- background-repeat: no-repeat;
- background-size: 16px 16px;
border: 1px solid #ddd;
border-radius: 13px;
box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
- /* Override the .focusable height: auto */
- height: 28px !important;
float: right; /* LTR */
margin: 0;
overflow: hidden;
padding: 0 2px;
position: relative;
right: 2px; /* LTR */
- /* Override the .focusable height: auto */
- width: 28px !important;
- text-indent: -9999px;
cursor: pointer;
}
[dir="rtl"] .contextual .trigger {
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index dfd3c48..f391f45 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -546,9 +546,8 @@ function shortcut_toolbar() {
),
'#weight' => -10,
'#attached' => array(
- 'css' => array(
- $path . '/css/shortcut.theme.css',
- $path . '/css/shortcut.icons.css',
+ 'library' => array(
+ array('shortcut', 'drupal.shortcut.toolbar')
),
),
);
@@ -561,11 +560,12 @@ function shortcut_toolbar() {
* Implements hook_library_info().
*/
function shortcut_library_info() {
+ $path = drupal_get_path('module', 'shortcut');
$libraries['drupal.shortcut.admin'] = array(
'title' => 'Shortcut',
'version' => VERSION,
'js' => array(
- drupal_get_path('module', 'shortcut') . '/shortcut.admin.js' => array(),
+ $path . '/shortcut.admin.js' => array(),
),
'dependencies' => array(
array('system', 'jquery'),
@@ -573,5 +573,14 @@ function shortcut_library_info() {
),
);
+ $libraries['drupal.shortcut.toolbar'] = array(
+ 'title' => 'Assets for toolbar integration',
+ 'version' => VERSION,
+ 'css' => array(
+ $path . '/css/shortcut.theme.css' => array(),
+ $path . '/css/shortcut.icons.css' => array(),
+ ),
+ );
+
return $libraries;
}
diff --git a/core/modules/toolbar/css/toolbar.icons.css b/core/modules/toolbar/css/toolbar.icons.css
index 9843129..1637118 100644
--- a/core/modules/toolbar/css/toolbar.icons.css
+++ b/core/modules/toolbar/css/toolbar.icons.css
@@ -14,6 +14,7 @@
background-color: transparent;
background-position: center center;
background-repeat: no-repeat;
+ background-size: 100% auto;
content: '';
display: block;
height: 100%;
@@ -22,6 +23,9 @@
top: 0;
width: 20px;
}
+.no-svg .toolbar .toolbar-icon:before {
+ background-size: auto auto;
+}
[dir="rtl"] .toolbar .toolbar-icon:before {
left: auto;
right: 0.6667em;
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 59b9f1a..ba37446 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -2103,8 +2103,8 @@ function user_toolbar() {
),
'#weight' => 100,
'#attached' => array(
- 'css' => array(
- $path . '/css/user.icons.css',
+ 'library' => array(
+ array('user', 'drupal.user.toolbar'),
),
),
);
@@ -2116,14 +2116,15 @@ function user_toolbar() {
* Implements hook_library_info().
*/
function user_library_info() {
+ $path = drupal_get_path('module', 'user');
$libraries['drupal.user'] = array(
'title' => 'User',
'version' => VERSION,
'js' => array(
- drupal_get_path('module', 'user') . '/user.js' => array(),
+ $path . '/user.js' => array(),
),
'css' => array(
- drupal_get_path('module', 'user') . '/css/user.module.css' => array(),
+ $path . '/css/user.module.css' => array(),
),
'dependencies' => array(
array('system', 'jquery'),
@@ -2136,7 +2137,7 @@ function user_library_info() {
'title' => 'User permissions',
'version' => VERSION,
'js' => array(
- drupal_get_path('module', 'user') . '/user.permissions.js' => array(),
+ $path . '/user.permissions.js' => array(),
),
'dependencies' => array(
array('system', 'jquery'),
@@ -2145,6 +2146,14 @@ function user_library_info() {
),
);
+ $libraries['drupal.user.toolbar'] = array(
+ 'title' => 'Assets for toolbar integration',
+ 'version' => VERSION,
+ 'css' => array(
+ $path . '/css/user.icons.css' => array(),
+ ),
+ );
+
return $libraries;
}