blocknotes / activeadmin_blaze_theme

A theme for Active Admin based on Blaze CSS 3.x
MIT License
46 stars 12 forks source link

Custom colors with webpacker #11

Closed ngouy closed 3 years ago

ngouy commented 3 years ago

From the read me :

using webpacker

If you are using Webpacker:

Add the component to the package.json: yarn add blocknotes/activeadmin_blaze_theme Add at the end of your Active Admin javascript pack (app/javascript/packs/active_admin.js): require('activeadmin_blaze_theme');

custom colors :

To change colors add to your Active Admin styles (before activeadmin_blaze_theme/theme import):

How can we combine both to make variables works ?

If I try to require the js file after I import my scss file where my styles customization variables are, it just doesn't works

import "../my_css_style_sheet"
require('activeadmin_blaze_theme')

(the other way around doesn't works either)

blocknotes commented 3 years ago

Hey @ngouy. Good point 😄

You can try in this way:

$color-brand: #c02; // ... and the other vars ... @import "~activeadmin_blaze_theme/app/assets/stylesheets/activeadmin_blaze_theme/theme";


- remove `require('activeadmin_blaze_theme')` from the js.
ngouy commented 3 years ago

Will do

Thank you for providing this gem and also help users. 💪

ngouy commented 3 years ago

It worked 👍

Thank you