WordPress / wporg-mu-plugins

Development of the Global Header and other mu-plugins used on WordPress.org.
57 stars 28 forks source link

Link to site homepage is not underlined on hover in the local navigation bar #627

Open ndiego opened 2 months ago

ndiego commented 2 months ago

I noticed this today when testing the Theme Directory refresh, but this impacts all newly redesigned sites with the local navigation bar.

Unlike the links on the right, the main link back to the site homepage is not underlined on hover, which makes it hard to tell that it's actually a link. Here's an example in Developer Resources.

https://github.com/WordPress/wporg-mu-plugins/assets/4832319/e42f3d5a-13d2-45c4-aab5-86a1d8f34ab8

cc @ryelle @adamwoodnz

ryelle commented 2 months ago

I think this has to do with GB's restructuring of CSS specificity for styles generated from theme.json. The generated CSS rule for hover :root :where(.wp-block-site-title a:where(:not(.wp-element-button)):hover) is no longer overriding the default general a:hover provided by the parent theme.

Maybe we can move this bit of CSS to a rule in theme.json to ensure the styles cascade correctly?

This issue should probably be moved to the parent theme repo, the underlying issue might impact other places we invert link text-decoration.

ndiego commented 2 months ago

Something like this should work.

"elements": {
    "link": {
        "typography": {
            "textDecoration": "none"
        },
        ":hover": {
            "typography": {
                "textDecoration": "underline"
            }
        }
    }
}
ndiego commented 2 months ago

This issue should probably be moved to the parent theme repo, the underlying issue might impact other places we invert link text-decoration.

I'll move it over.