Make WordPress Core


Ignore:
Timestamp:
03/10/2022 05:19:50 AM (2 years ago)
Author:
peterwilsoncc
Message:

Twenty Twenty-One: Reverse logic for prefers-reduced-motion media query.

Reverse the logic of the prefers-reduced-motion to enable transitions based on no-preference rather than disable them based on the reduce preference. This removes the need to disable transitions with the ! important tag and unintended interactions with plugins as a result.

Props gregoiresailland, sabernhardt, ryokuhi.
Fixes #54174.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/assets/sass/06-components/footer-navigation.scss

    r49726 r52835  
    2222        a {
    2323            padding: calc(1.25 * var(--primary-nav--padding)) var(--primary-nav--padding);
    24             transition: transform 0.1s ease;
    2524            color: var(--footer--color-link);
    2625
     
    6463                transform: scale(1.1);
    6564            }
     65
     66            @media (prefers-reduced-motion: no-preference) {
     67                transition: transform 0.1s ease;
     68            }
    6669        }
    6770    }
Note: See TracChangeset for help on using the changeset viewer.