fix(drawer): introduce opacity for reduced motion#7442
Merged
Conversation
Collaborator
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
andrew-ronaldson
left a comment
Collaborator
There was a problem hiding this comment.
Beauty never fades... unless you turn on reduced motion.
mcoker
approved these changes
Apr 10, 2025
mcoker
left a comment
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 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7360