Default theme will be loaded regardless of theme.config
See original GitHub issueHelp Wanted
What i’m trying to do is have the FUI primary color be bounded to a css var(), the main issue is the usage of pre-processing functions.
So what i did is to copy the site.variables of the default them and copied it to /site/globals/site.variables
and modified every primary related var to a css var(), like this:
@linkColor : var(--accent-link-color); @primaryBackground : var(--accent-bg-color);
I then went ahead and tried to compile and got the following:
{ [Error: error evaluating function
darken: color.toHSL is not a function in file /home/yahav/fomantic_themeColors/semantic/src/themes/default/globals/site.variables line no. 145] message: 'error evaluating function
darken: color.toHSL is not a function in file /home/yahav/fomantic_themeColors/semantic/src/themes/default/globals/site.variables line no. 145', stack: undefined, type: 'Runtime', filename: '/home/yahav/fomantic_themeColors/semantic/src/themes/default/globals/site.variables', index: 3383, line: 145, column: 23, callLine: NaN, callExtract: undefined, extract: [ '@linkUnderline : none;', '@linkHoverColor : darken(saturate(@linkColor, 20), 15, relative);', '@linkHoverUnderline : @linkUnderline;' ], lineNumber: 145, fileName: '/home/yahav/fomantic_themeColors/semantic/src/themes/default/globals/site.variables', name: 'Error', plugin: 'gulp-less', showProperties: true, showStack: false, __safety: { toString: [Function: bound ] } }
so i created a new theme folder, basically copied the default theme and renamed it, i then copied the /site/globals/site.variables
file to this new theme’s site.variables and changed every occurrence of ‘default’ at theme.config to the new theme’s name.
and yet, i still get the same error which means FUI is trying to compile the themes/default/globals/site.variables
file although i have defined the new theme AND have a site/globals/site.variables
file overriding it a well.
I can simply overwrite the default theme site.variables and it will work (i had this same setup when i was using SUI) but it won’t be wise. Any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:21 (10 by maintainers)
Top GitHub Comments
@Yahav
Hey,that is not respectful way to communicate with people. Even contributors, those who are dedicating themselves to maintain spirit of SUI, sometimes made a wrong design choice accidentally that may break some use case. Contributors do not intend to damage SUI.
@lubber-de
I haven’t been able to make the:
part as well, had to rewrite the entire default/site.variables. There must be a way, otherwise, what good is a theme system. updated my git to showcase the successful build when overriding the default theme as opposed to trying to use the theme system: https://github.com/Yahav/fomanticUiColorSystem/