Currently, there are 3 relevant styles-only ResourceLoader modules registered:
- mediawiki.special.userlogin.common.styles
- mediawiki.special.userlogin.signup.styles
- mediawiki.special.userlogin.login.styles
LoginSignupSpecialPage, which is extended by SpecialCreateAccount and SpecialUserLogin, will add the common styles module, and then one of the others depending on if the page is a signup page or not (i.e. will add the signup styles for Special:CreateAccount and the login styles for Special:UserLogin).
However, instead of using separate modules for these styles, we can just add an overall selector for the individual page (.mw-special-Userlogin or .mw-special-CreateAccount). We can then safely load the styles for both on both pages, because they will only affect one or the other.
Disadvantages:
- Larger CSS package to load on both
Advantage:
- Remove the need to register the 2 dedicated modules, reducing the size of the module manifest on all pages