Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to override active admin CSS?

I am using Active Admin, is there a way to override CSS used by the active admin theme?

For eg:- I have to change css of submit button which is disabled to cursor: wait; and make it unclickable.

What's the best way to do this?

like image 683
Sampat Badhe Avatar asked Mar 21 '23 13:03

Sampat Badhe


2 Answers

just make a new file

app/assets/stylesheets/active_admin.css.scss

and put your scss code there.

(Or just active_admin.css with css code)

like image 183
ksu Avatar answered Apr 02 '23 12:04

ksu


You can override any CSS property by overriding the CSS class or IDs in you own stylesheet with !important attribute if you do not have any access to the original stylesheet

For example, use

.submit-button {
    color: white !important;
}

to change the color of the submit button text.

like image 32
AlexB Avatar answered Apr 02 '23 11:04

AlexB