PDA

View Full Version : Inheritence of own theme variables between themes



thecap
16 Sep 2015, 3:34 AM
Hi,

I am having a small Problem with Theming in the following situation:

Theme A (extends Theme Triton)

bigger Theme for different Products


Theme B (extends Theme A)

very small Theme which should only set som Colors a.s.o. for a special Product


In Theme A there are the following files:

src/button/Button.scss

this:

$color-over: $btn-ThemeA-linkbutton-color-over


var/button/Button.scss

this:

$btn-ThemeA-linkbutton-color-over: ThemeA-linkcolor-over !default;


var/Component.scss

this:

$ThemeA-linkcolor-over: #ff00ff !default;




Now I shoul be able to overwrite this Color (ThemeA-linkcolor-over) inside the Component.scss of Theme B, right?
Then an App which uses Theme B should show the new Color from Theme B on the specific Components, right?
Well, that doesn' t not work and I have no idea, why it should not. In all other cases, setting of Variables of Theme A inside Theme B does work fine.


Can anybody say where there is a fault in my concept?

qooleot
17 Sep 2015, 3:39 AM
Hey I haven't extended a custom theme with another (just extended crisp theme), but just a quick note if you're stuck and don't get a response - check out using "$color-over: dynamic($color-var)" instead of "!default". It seems to be the new extjs6 way to create a default, and has worked in my theming.

davil
24 Sep 2015, 2:56 AM
It not where there is a fault in my concept?

thecap
29 Sep 2015, 1:12 AM
Hi,

your approach seems to work. Where did you find it out?

But my IntelliJ still marks the 'dynamic' as an error.

thecap
29 Sep 2015, 1:17 AM
Phil already answered to the last question:

https://www.sencha.com/forum/showthread.php?301512-Cannot-redefine-X-as-dynamic

qooleot
29 Sep 2015, 3:16 AM
Hi,

your approach seems to work. Where did you find it out?


"...we recommended you change variable assignments to use !dynamic. "

http://docs.sencha.com/extjs/6.0/whats_new/6.0.0/fashion.html