From f0ce6435d1fe0f73c1e58c28e1cd756718d82b7a Mon Sep 17 00:00:00 2001 From: Patrick Yeo Date: Tue, 25 Jul 2023 14:35:03 -0700 Subject: [PATCH] LPS-190149 c-prefers-reduced-motion class should remove transitions --- .../resources/_styled/css/_extras.scss | 4 ++++ .../_styled/css/application/_drag_drop.scss | 4 ++++ .../css/taglib/_empty_result_message.scss | 20 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/_extras.scss b/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/_extras.scss index 552bff8a849984..b9745a6c77f963 100644 --- a/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/_extras.scss +++ b/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/_extras.scss @@ -109,6 +109,10 @@ @media (prefers-reduced-motion: reduce) { transition: none; } + + .c-prefers-reduced-motion & { + transition: none; + } } @keyframes highlight-animation { diff --git a/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/application/_drag_drop.scss b/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/application/_drag_drop.scss index d2acfd2c002489..6cad9ddb025f6d 100644 --- a/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/application/_drag_drop.scss +++ b/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/application/_drag_drop.scss @@ -96,6 +96,10 @@ html#{$cadmin-selector} { transition: none; } + .c-prefers-reduced-motion & { + transition: none; + } + .portlet { border: 2px dashed #ccc; } diff --git a/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/taglib/_empty_result_message.scss b/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/taglib/_empty_result_message.scss index 1617460bcf2ebe..8bf91028c00892 100644 --- a/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/taglib/_empty_result_message.scss +++ b/modules/apps/frontend-theme/frontend-theme-styled/src/main/resources/META-INF/resources/_styled/css/taglib/_empty_result_message.scss @@ -31,6 +31,10 @@ @media (prefers-reduced-motion: reduce) { background-image: url(@theme_image_path@/states/empty_state_reduced_motion.gif); } + + .c-prefers-reduced-motion & { + background-image: url(@theme_image_path@/states/empty_state_reduced_motion.gif); + } } .taglib-empty-search-result-message-header { @@ -41,6 +45,10 @@ @media (prefers-reduced-motion: reduce) { background-image: url(@theme_image_path@/states/search_state_reduced_motion.gif); } + + .c-prefers-reduced-motion & { + background-image: url(@theme_image_path@/states/search_state_reduced_motion.gif); + } } .taglib-empty-state { @@ -52,6 +60,10 @@ @media (prefers-reduced-motion: reduce) { background-image: url(@theme_image_path@/states/empty_state_reduced_motion.gif); } + + .c-prefers-reduced-motion & { + background-image: url(@theme_image_path@/states/empty_state_reduced_motion.gif); + } } .taglib-success-state { @@ -63,6 +75,10 @@ @media (prefers-reduced-motion: reduce) { background-image: url(@theme_image_path@/states/success_state_reduced_motion.gif); } + + .c-prefers-reduced-motion & { + background-image: url(@theme_image_path@/states/success_state_reduced_motion.gif); + } } .taglib-search-state { @@ -74,6 +90,10 @@ @media (prefers-reduced-motion: reduce) { background-image: url(@theme_image_path@/states/search_state_reduced_motion.gif); } + + .c-prefers-reduced-motion & { + background-image: url(@theme_image_path@/states/search_state_reduced_motion.gif); + } } .taglib-empty-result-message-title {