doabit / semantic-ui-sass

Semantic UI, converted to Sass and ready to drop into Rails & Compass.
MIT License
1.15k stars 190 forks source link

set site-varibles color setting not work. #123

Closed zw963 closed 6 years ago

zw963 commented 6 years ago

Hi, I want to add semantic-ui global/site-variables variable into rails.

following is config from site-varibles

/*******************************
     User Global Variables
*******************************/

@importGoogleFonts : false;
@headerFont        : 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', 'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;
@pageFont          : 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', 'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;

@primaryColor   : @teal;
@secondaryColor : @grey;
@red            : #B03060;
@orange         : #FE9A76;
@yellow         : #FFD700;
@olive          : #32CD32;
@green          : #016936;
@teal           : #008080;
@blue           : #0E6EB8;
@violet         : #EE82EE;
@purple         : #B413EC;
@pink           : #FF1493;
@brown          : #A52A2A;
@grey           : #A0A0A0;
@black          : #000000;

I try to convert those in application.css.scss, like following:

$red            : #B03060;
$orange         : #FE9A76;
$yellow         : #FFD700;
$olive          : #32CD32;
$green          : #016936;
$teal           : #000000;
$blue           : #0E6EB8;
$violet         : #EE82EE;
$purple         : #B413EC;
$pink           : #FF1493;
$brown          : #A52A2A;
$grey           : #A0A0A0;
$black          : #000000;
$import-google-fonts: false;
$header-font: 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', 'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;
$page-font: 'Helvetica Neue', Helvetica, Arial, 'Microsoft Yahei', 'Hiragino Sans GB', 'Heiti SC', 'WenQuanYi Micro Hei', sans-serif;
$primary-color: $teal;
$secondary-color: $grey;
@import "semantic-ui";

But, seem like not work.

Thanks

doabit commented 6 years ago

Sorry, the gem dosen't support variables now. https://github.com/doabit/semantic-ui-sass/issues/31

zw963 commented 6 years ago

Hi, is there other approach to archive this?

e.g. copy site-variables into some where in my project.

thanks.

zw963 commented 6 years ago

@doabit , if use with webpacker, this gem can work with global variable?

thanks

doabit commented 6 years ago

@zw963 Sorry,the gem dosen't support variable now. i recommend to use semantic with npm if use webpacker.