diff --git a/core/themes/default_admin/css/components/more-actions.pcss.css b/core/themes/default_admin/css/components/more-actions.pcss.css index fa10f66..eaaaa5a 100644 --- a/core/themes/default_admin/css/components/more-actions.pcss.css +++ b/core/themes/default_admin/css/components/more-actions.pcss.css @@ -34,20 +34,16 @@ } } -@keyframes pseudo-throbber { - 0% { - background-position: 16px 18px; - background-size: 8px 8px; +@keyframes pseudo-throbber-mask { + 0%, + 100% { + mask-position: 16px 18px; + mask-size: 8px 8px; } 50% { - background-position: 4px 14px; - background-size: 32px 32px; - } - - 100% { - background-position: 16px 18px; - background-size: 8px 8px; + mask-position: 4px 14px; + mask-size: 32px 32px; } } @@ -61,12 +57,46 @@ body:has([data-drupal-selector="edit-save"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-save"]), body:has([data-drupal-selector="edit-preview"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-preview"]), body:has([data-drupal-selector="edit-delete"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-delete"]) { + position: relative; padding-inline-start: var(--admin-space-xl); - animation: pseudo-throbber 1s linear infinite; - background-image: var(--admin-icon-loader); + + &::after { + position: absolute; + inset-block: 0; + inset-inline-start: 0; + width: 100%; + height: 100%; + background-color: currentColor; + -webkit-mask-image: var(--admin-icon-loader); + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: 16px 18px; + -webkit-mask-size: 8px 8px; + mask-image: var(--admin-icon-loader); + mask-repeat: no-repeat; + mask-position: 16px 18px; + mask-size: 8px 8px; + animation: pseudo-throbber-mask 1s linear infinite; + content: ""; + pointer-events: none; + } &:dir(rtl) { padding-inline-start: unset; padding-inline-end: var(--admin-space-xl); + + &::after { + -webkit-mask-position: right 16px center; + mask-position: right 16px center; + } + } +} + +@media (prefers-reduced-motion: reduce) { + body:has([data-drupal-selector="edit-save"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-save"]), + body:has([data-drupal-selector="edit-preview"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-preview"]), + body:has([data-drupal-selector="edit-delete"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-delete"]) { + &::after { + animation: none; + } } } diff --git a/core/themes/default_admin/css/components/more-actions.css b/core/themes/default_admin/css/components/more-actions.css index c415fa9..81b4f59 100644 --- a/core/themes/default_admin/css/components/more-actions.css +++ b/core/themes/default_admin/css/components/more-actions.css @@ -41,20 +41,16 @@ } } -@keyframes pseudo-throbber { - 0% { - background-position: 16px 18px; - background-size: 0.5rem 0.5rem; +@keyframes pseudo-throbber-mask { + 0%, + 100% { + mask-position: 16px 18px; + mask-size: 0.5rem 0.5rem; } 50% { - background-position: 4px 14px; - background-size: 2rem 2rem; - } - - 100% { - background-position: 16px 18px; - background-size: 0.5rem 0.5rem; + mask-position: 4px 14px; + mask-size: 2rem 2rem; } } @@ -68,12 +64,46 @@ body:has([data-drupal-selector="edit-save"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-save"]), body:has([data-drupal-selector="edit-preview"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-preview"]), body:has([data-drupal-selector="edit-delete"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-delete"]) { + position: relative; padding-inline-start: var(--admin-space-xl); - animation: pseudo-throbber 1s linear infinite; - background-image: var(--admin-icon-loader); + + &::after { + position: absolute; + inset-block: 0; + inset-inline-start: 0; + width: 100%; + height: 100%; + background-color: currentColor; + -webkit-mask-image: var(--admin-icon-loader); + -webkit-mask-repeat: no-repeat; + -webkit-mask-position: 16px 18px; + -webkit-mask-size: 0.5rem 0.5rem; + mask-image: var(--admin-icon-loader); + mask-repeat: no-repeat; + mask-position: 16px 18px; + mask-size: 0.5rem 0.5rem; + animation: pseudo-throbber-mask 1s linear infinite; + content: ""; + pointer-events: none; + } &:dir(rtl) { padding-inline-start: unset; padding-inline-end: var(--admin-space-xl); + + &::after { + -webkit-mask-position: right 16px center; + mask-position: right 16px center; + } + } +} + +@media (prefers-reduced-motion: reduce) { + body:has([data-drupal-selector="edit-save"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-save"]), + body:has([data-drupal-selector="edit-preview"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-preview"]), + body:has([data-drupal-selector="edit-delete"] + .ajax-progress) :where([data-drupal-selector="sticky-edit-delete"]) { + &::after { + animation: none; + } } }