Reputation: 4201
Where can i put custom css files to customize ActiveAdmin CSS?
I see in active_admin.rb there is the following line:
config.register_stylesheet 'active_admin.css'
but i can't understand where the file has to go. All i want to do is add some extra custom styles to AA's default ones
Upvotes: 10
Views: 11701
Reputation: 4509
To keep separate directory for admin style-sheet.
I am using gem 'activeadmin'
in an application.
I wanted to use my own style-sheet which stored in separate directory, here is how I archive that-
admin
inside style-sheet .app/assets/stylesheets/admin
config/initializers/active_admin.rb
.Looked for register_stylesheet and found commented line as-
# config.register_stylesheet 'my_stylesheet.css'
Modified this line with-
config.register_stylesheet 'admin/active_style.css'
Restart rails server and found desired result.
Hope will work for you!
Upvotes: 0
Reputation: 1759
Lets say I have 2 css files, highlight.css and select2.css
In config/initializers/active_admin.rb
, I would add it like this:
config.register_stylesheet 'highlight.min.css'
config.register_stylesheet 'select2.css'
Note:
highlight.css and select2.css should be inside/under app/assets/stylesheets
Upvotes: 20