Skip to content

Narrow global theme transitions and add reduced-motion guard in GlobalStyles#26

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/narrow-css-transition-selectors
Draft

Narrow global theme transitions and add reduced-motion guard in GlobalStyles#26
Copilot wants to merge 2 commits into
mainfrom
copilot/narrow-css-transition-selectors

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

The global transition rule in GlobalStyles.js applied to broad structural/content tags (div, span, ul, li, etc.), causing unnecessary repaint/recalc surface area and unintended animations. This change scopes transitions to relevant theming/interactive elements and disables motion when users request reduced motion.

  • Transition scope reduction

    • Removed broad content/container tags from the global transition selector.
    • Kept transitions on a smaller, intentional set used for theme/UI state changes (body, sectioning containers, and interactive controls).
  • Accessibility: reduced motion support

    • Added a global prefers-reduced-motion: reduce override to disable transitions and animations (including pseudo-elements).
  • Illustrative change

    @media (prefers-reduced-motion: reduce) {
      *,
      *::before,
      *::after {
        transition: none !important;
        animation: none !important;
      }
    }

Copilot AI changed the title [WIP] Narrow overly broad CSS transition selectors and respect prefers-reduced-motion Narrow global theme transitions and add reduced-motion guard in GlobalStyles Apr 4, 2026
Copilot AI requested a review from Yasar2019 April 4, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Narrow overly broad CSS transition selectors and respect prefers-reduced-motion in GlobalStyles.js

2 participants