diff --git a/claro.info.yml b/claro.info.yml index 10261cd..e20e21d 100644 --- a/claro.info.yml +++ b/claro.info.yml @@ -66,6 +66,8 @@ libraries-override: css: theme: /core/themes/stable/css/filter/filter.admin.css: css/dist/theme/filter.theme.css + shortcut/drupal.shortcut: + claro/drupal.shortcut libraries-extend: ckeditor/drupal.ckeditor: @@ -88,8 +90,6 @@ libraries-extend: - claro/autocomplete tour/tour-styling: - claro/tour-styling - shortcut/drupal.shortcut: - - claro/drupal.shortcut quickedit_stylesheets: - css/dist/components/quickedit.css diff --git a/claro.libraries.yml b/claro.libraries.yml index ff1b594..b9e35a8 100644 --- a/claro.libraries.yml +++ b/claro.libraries.yml @@ -192,6 +192,5 @@ autocomplete: drupal.shortcut: version: VERSION css: - theme: - css/dist/theme/shortcut.theme.css: {} - css/dist/theme/shortcut.icons.theme.css: {} + component: + css/dist/components/shortcut.css: {} diff --git a/config/install/claro.settings.yml b/config/install/claro.settings.yml index e69de29..6bba58b 100644 --- a/config/install/claro.settings.yml +++ b/config/install/claro.settings.yml @@ -0,0 +1,3 @@ +third_party_settings: + shortcut: + module_link: true diff --git a/css/src/components/shortcut.css b/css/src/components/shortcut.css index e9572ed..277d6bc 100644 --- a/css/src/components/shortcut.css +++ b/css/src/components/shortcut.css @@ -9,11 +9,10 @@ */ .shortcut-action { display: inline-block; - margin-left: var(--space-m); /* LTR */ + margin-left: var(--space-xs); /* LTR */ } [dir="rtl"] .shortcut-action { - margin-left: 0; - margin-left: var(--space-m); + margin-right: var(--space-xs); } .shortcut-action__message { background: var(--color-shortcut-bg); @@ -38,3 +37,25 @@ opacity: 1; transform: translateY(0); } + +.shortcut-action__icon { + background: transparent url(../../../images/shortcut/favstar.svg) no-repeat left top; + width: var(--size-shortcut-icon); + height: var(--size-shortcut-icon); + display: inline-block; + vertical-align: -2px; +} +[dir="rtl"] .shortcut-action__icon { + background-image: url(../../../images/shortcut/favstar-rtl.svg); +} +.shortcut-action--add:hover .shortcut-action__icon, +.shortcut-action--add:focus .shortcut-action__icon { + background-position: calc(-1 * var(--size-shortcut-icon)) top; +} +.shortcut-action--remove .shortcut-action__icon { + background-position: calc(-2 * var(--size-shortcut-icon)) top; +} +.shortcut-action--remove:focus .shortcut-action__icon, +.shortcut-action--remove:hover .shortcut-action__icon { + background-position: calc(-3 * var(--size-shortcut-icon)) top; +}