By default, links in WordPress Twenty Twenty One theme have a background color that’s displayed when they are clicked. The background color appears white on light background and appears black when dark mode is on.
How to change the on-click background color of links in WordPress Twenty Twenty One theme?
All it takes is just adding couple of lines of CSS in the customizer panel.
Once you login to the admin panel, go to: Appearance -> Customize -> Additional CSS
Add the following CSS in the text box.
.has-background-white .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { color: var(--wp--style--color--link, var(--global--color-black)); background-color: transparent; } .is-dark-theme .site a:focus:not(.wp-block-button__link):not(.wp-block-file__button) { color: var(--wp--style--color--link, var(--global--color-white)); background-color: transparent; }
After adding that, click on publish and refresh your site. If you are using a cache plugin, purge all cache to see the changes.