#43483 closed defect (bug) (fixed)
login css imports styles it has as dependencies
Reported by: | alpipego | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | 4.8.3 |
Component: | Login and Registration | Keywords: | has-patch |
Focuses: | Cc: |
Description
The login.css
(login-rtl.css
) imports forms.css
and i10n.css
(forms-rtl.css
and i10n-rtl.css
) and also has them as dependencies.
I think this should be unified and propose removing the import statements.
Attachments (1)
Change History (8)
#2
@
7 years ago
No, that's not what I am saying (it's actually the opposite). If you look at the source of wp-admin/css/login.css
it imports forms.css
and i10n.css
:
@import url(forms.css); @import url(l10n.css);
And in https://core.trac.wordpress.org/browser/trunk/src/wp-includes/script-loader.php#L1075 these two scripts are also added as dependencies to login.css
, which is redundant:
$styles->add( 'login', "/wp-admin/css/login$suffix.css", array( 'dashicons', 'buttons', 'forms', 'l10n' ) );
I think we should get rid of the one of the two and I propose removing the @import
statements.
#3
@
7 years ago
thanks for clarifying that ;-)
Wonder if there's a reason it was kept in there?
The @import url(forms.css);
and the $styles->add( 'login', ...
was added in changeset [27199] for ticket #12506.
The @import url(l10n.css);
was added in changeset [28096].
Tickets #26669 and #35229 might also be of interest to understand the setup.
#4
@
7 years ago
Thanks for the additional information. I can't find a valid reason why it's in there though; I assume it's an oversight.
Adding forms.css
and i10n
as a dependency actually was introduced in changeset [36341].
So I guess you mean to introduce
login.scss
that importsforms.scss
andi10n.scss
.The only other
scss
files I'm aware of is for the admin color schemes in/wp-admin/css/colors/
(e.g./wp-admin/css/colors/light/colors.scss
), with this sass entry inGruntfile.js
: