Refactor VWordPressLink
component to use CSS for color
#4998
Labels
💻 aspect: code
Concerns the software code in the repository
🧰 goal: internal improvement
Improvement that benefits maintainers, not users
🟩 priority: low
Low priority and doesn't need to be rushed
🧱 stack: frontend
Related to the Nuxt frontend
Problem
Most of the colors are determined using CSS-only methods. However, the
VWordPressLink
uses JS to set the color. This was first done because the logo is used on a background that is different from the main background color in the mobile pages modal (its background is always black, both in the dark and the light themes).Description
Refactor the WP logo component to use the CSS-only methods of color scheme detection. The mobile nav should add a CSS variable (or change the color mode class name) to enable setting the correct color to the logo component.
Alternatives
Leave the JS method. It will be confusing long term to have the JS-based pattern still present in the app, for anyone trying to understand how to correctly style components.
Additional context
The text was updated successfully, but these errors were encountered: