fix(drawer): introduce opacity for reduced motion#7442
Merged
mcoker merged 2 commits intopatternfly:mainfrom Apr 10, 2025
Merged
fix(drawer): introduce opacity for reduced motion#7442mcoker merged 2 commits intopatternfly:mainfrom
mcoker merged 2 commits intopatternfly:mainfrom
Conversation
Collaborator
|
Preview: https://patternfly-pr-7442.surge.sh A11y report: https://patternfly-pr-7442-a11y.surge.sh |
Contributor
|
@srambach pushed some updates. From what we were looking at
I pushed an update with the changes below. One thing I didn't test was in nested drawers, so we will want to test that.
diff --git a/src/patternfly/components/Drawer/drawer.scss b/src/patternfly/components/Drawer/drawer.scss
index c6e3fe6dc..65aecf54a 100644
--- a/src/patternfly/components/Drawer/drawer.scss
+++ b/src/patternfly/components/Drawer/drawer.scss
@@ -55,11 +55,10 @@ $pf-v6-c-drawer__panel--list--width: (25, 33, 50, 66, 75, 100);
@media screen and (prefers-reduced-motion: no-preference) {
--#{$drawer}__panel--TransitionDuration--slide: var(--pf-t--global--motion--duration--slide-in--short);
--#{$drawer}__panel--TransitionDelay--focus: var(--#{$drawer}__panel--TransitionDuration--slide);
- --#{$drawer}__panel--TransitionDelay: 0s, 0s, 0s, 0s, var(--#{$drawer}__panel--TransitionDelay--focus);
+ --#{$drawer}__panel--TransitionDelay: 0s, 0s, 0s, 0s, var(--#{$drawer}__panel--TransitionDelay--focus), 0s;
--#{$drawer}__panel--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--decelerate);
- --#{$drawer}__panel--TransitionDuration: 0s, var(--#{$drawer}__panel--TransitionDuration--slide), 0s, 0s, 0s;
- --#{$drawer}__panel--TransitionProperty: margin, transform, box-shadow, flex-basis, visibility; // with no preference, slide the panel
- --#{$drawer}__panel--Opacity: 1;
+ --#{$drawer}__panel--TransitionDuration: 0s, var(--#{$drawer}__panel--TransitionDuration--slide), 0s, 0s, 0s, var(--#{$drawer}__panel--TransitionDuration--slide);
+ --#{$drawer}__panel--TransitionProperty: margin, transform, box-shadow, flex-basis, visibility, opacity; // with no preference, slide the panel
}
// Drawer panel head
|
andrew-ronaldson
approved these changes
Apr 9, 2025
Collaborator
There was a problem hiding this comment.
Beauty never fades... unless you turn on reduced motion.
mcoker
approved these changes
Apr 10, 2025
Contributor
There was a problem hiding this comment.
Just one little nit, otherwise lgtm 🚀
| --#{$drawer}__panel--TransitionDuration--slide: var(--pf-t--global--motion--duration--slide-in--short); | ||
| --#{$drawer}__panel--TransitionDelay--focus: var(--#{$drawer}__panel--TransitionDuration--slide); | ||
| --#{$drawer}__panel--TransitionDelay: 0s, 0s, 0s, 0s, var(--#{$drawer}__panel--TransitionDelay--focus); | ||
| --#{$drawer}__panel--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--decelerate); |
Contributor
There was a problem hiding this comment.
Looks like this is a dupe of this line and could be removed.
Collaborator
|
🎉 This PR is included in version 6.3.0-prerelease.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Fixes #7360