Save 36% for Black Friday! Learn more

All threads / After adding the activeadmin gem, my previous style changed, How can avoid this?

Ask A Question

Notifications

You’re not receiving notifications from this thread.

After adding the activeadmin gem, my previous style changed, How can avoid this?

Larry Qu asked in Gems / Libraries

After adding the activeadmin gem, my previous style changed , How can avoid this?

Previous style is :

After adding the activeadmin gem, the style become this:

but if I comment the active_admin scss out, the admin page will have no style.
active_admin.scss

@import "active_admin/mixins";
@import "active_admin/base";

Make sure you're not requiring the active admin css file in your application.css on accident (probably with a require_tree). Their CSS is made to be compiled separately into another file out of the box and so you don't want to include their CSS with yours. That's probably happening with a bad require or import in your application.css at the top.

yes, solved! Thank you !
After I manually require scss files, no longer use require_tree it works fine.

 *= require_self
 * require_tree . // not used
 *
 *= require addresses.scss
 *= require carts.scss
 *= require checkout.scss
 *= require full-width-pics.scss
 *= require order_items.scss
 *= require orders.scss
 *= require products.scss
 *= require scaffolds.scss
 *= require services.scss
 *= require startup.scss
 */
Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 39,376+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

    © 2020 GoRails, LLC. All rights reserved.