How can I restyle the login button?

Re: How can I restyle the login button?

by Richard Oelmann -
Number of replies: 0
Picture of Core developers Picture of Plugin developers Picture of Testers

Also, I'm not really sure why you would have added those classes anyway as they are not necessary. The submit button on the login page can be targetted specifically by:

#page-login-index .loginpanel input#loginbtn {your css rules here}

Perhaps you are trying to build your own independent login page - in which case my advice would be to start by recognising what you can do with the existing login page and some css styling, just by cloning and adapting the column1.php layout file to create a login.php (referenced in the config.php file) which would then have all the component parts by default (from $OUTPUT->main_content() ) and which you could then style as required without resorting to building your own specific html with new classes.

Generally, using the classes already in place, where possible, allows the theme to pick up consistent styles from the theme stylesheets (including the parent themes), rather than separate in-page style sections in every layout file.

One complication is that login is one area that does not have a renderer that can be overridden as other areas of the page/site do, but if you are at the stage where you are trying to replicate that level of customisation by creating your own login page rather than restyling the core one, then it would be useful to know that you have looked at and considered (and rejected) the core login page - and why - rather than creating a new one simply because you are not aware of some of the existing options, and so we can provide the appropriate support and help for your queries.