[wp-trac] [WordPress Trac] #62410: Custom login logo CSS targets changed
WordPress Trac
noreply at wordpress.org
Wed Nov 13 22:20:49 UTC 2024
#62410: Custom login logo CSS targets changed
------------------------------------+---------------------
Reporter: leecollings | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7.1
Component: Login and Registration | Version: 6.7
Severity: normal | Resolution:
Keywords: | Focuses: css
------------------------------------+---------------------
Comment (by sabernhardt):
I should have noticed a problem with increasing the CSS specificity.
The Core styles can work with the `.wp-login-logo` class when `.login` is
removed, so I made [attachment:"62410.diff"] to consider that. With the
change, the specificity would be one element lower than the `.login h1`
selectors.
Then the alternative patch adds a `body` element to **match** the
specificity level those rules had in earlier versions. Note that printing
custom styles with `.login h1 a` //before// the `login.css` stylesheet
would not work with [attachment:"62410.alt.diff"], but it would not have
worked with WordPress 6.6 either.
The Codex is very outdated, but maybe it would be worth adding the current
selector to the list in the article's example:
`#login h1 a, .login h1 a, .login .wp-login-logo a {`
(and maybe rewriting the snippet to use `wp_add_inline_style( 'login',
$css );` instead of printing a `style` tag in an enqueue hook)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62410#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list