Make WordPress Core

Opened 7 years ago

Closed 5 years ago

Last modified 5 years ago

#43483 closed defect (bug) (fixed)

login css imports styles it has as dependencies

Reported by: alpipego's profile alpipego Owned by: sergeybiryukov's profile 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)

43483.diff (261 bytes) - added by alpipego 7 years ago.

Download all attachments as: .zip

Change History (8)

#1 @birgire
7 years ago

So I guess you mean to introduce login.scss that imports forms.scss and i10n.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 in Gruntfile.js :

sass: {
    colors: {
        expand: true,
        cwd: SOURCE_DIR,
        dest: BUILD_DIR,
        ext: '.css',
        src: ['wp-admin/css/colors/*/colors.scss'],
        options: {
            outputStyle: 'expanded'
        }
    }
},

Last edited 7 years ago by birgire (previous) (diff)

#2 @alpipego
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 @birgire
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 @alpipego
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].

@alpipego
7 years ago

#5 @alpipego
7 years ago

  • Keywords has-patch added

#6 @SergeyBiryukov
5 years ago

  • Milestone changed from Awaiting Review to 5.3
  • Resolution set to fixed
  • Status changed from new to closed

Hi there, thanks for the ticket!

This is now fixed in [45673]. Didn't see this ticket before the commit, sorry :)

#7 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov

In 45844:

Upgrade/Install: Bring some consistency to installation screen styles.

  • Include forms.css and l10n.css, for consistency with login screen and other admin screens.
  • Remove redundant @import directives from login.css for files already declared as dependencies.
  • Adjust margin on password strength meter for consistency with other fields.
  • Increase font size for "You will need this password to log in" notice.
  • Fix misaligned icon on "Hide" button for the password.

Props iseulde, dan@…, bassgang, cdog, johnbillion, nmenescardi, mukesh27, alpipego, SergeyBiryukov.
Merges [45673] to the 5.2 branch.
Fixes #35776, #43483, #47757, #47758.

Note: See TracTickets for help on using tickets.