Login with Google button class

Login with Google button class

by Mihai Bojonca -
Number of replies: 3
Picture of Testers

I would like to change the "login with google" button color by changing it from btn to btn-danger in the moodle frontpage side-pre login form and the moodle login page.

Moodle 3.5.7.+

Essential 3.5.1.5

How do I target with custom CSS the 2 buttons?

How do I change the classes of the buttons?

I would like to simply add this customization to the custom css option. 

Thank you!

Attachment 2019-08-10 10_34_55-2019-08-10 10_27_17-TCM International Institute Online Delivery Platform.png - L.png
Average of ratings: -
In reply to Mihai Bojonca

Re: Login with Google button class

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Mihai,

Given the constraints of the solution implementation, try something like https://www.w3schools.com/cssref/sel_first-of-type.asp with a copy / paste of the attribute values from the btn-danger class.

Gareth
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Login with Google button class

by Mihai Bojonca -
Picture of Testers
Thank you very much Gareth for your reply.
This is what i have done:

#inst34>div.content>div.potentialidps>div>div>a {
background-color: red;
background-image: none;
color: white;
}

I felt this was a little too dirty, i will go ahead and copy the style from the specific button so it looks cleaner.



In reply to Mihai Bojonca

Re: Login with Google button class

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Mihai,

#inst34 looks ugly, perhaps the 'pagelayout-login' class (I think) on the 'body' tag would be better.

G