Results 1 to 6 of 6

Thread: Inheritence of own theme variables between themes

  1. #1
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    13
    Answers
    2

    Default Answered: Inheritence of own theme variables between themes

    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?

  2. Quote Originally Posted by thecap View Post
    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/wha...0/fashion.html

  3. #2
    Ext JS Premium Member
    Join Date
    Sep 2008
    Location
    Raleigh, NC
    Posts
    164
    Answers
    1

    Default

    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.

  4. #3

    Default

    It not where there is a fault in my concept?

  5. #4
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    13
    Answers
    2

    Default

    Hi,

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

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

  6. #5
    Sencha Premium Member
    Join Date
    Aug 2014
    Posts
    13
    Answers
    2

    Default

    Phil already answered to the last question:

    https://www.sencha.com/forum/showthr...e-X-as-dynamic

  7. #6
    Ext JS Premium Member
    Join Date
    Sep 2008
    Location
    Raleigh, NC
    Posts
    164
    Answers
    1

    Default

    Quote Originally Posted by thecap View Post
    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/wha...0/fashion.html

Similar Threads

  1. [INFOREQ] ViewModel inheritence should work for everything not just data
    By SebTardif in forum Ext 5: Bugs
    Replies: 3
    Last Post: 5 Mar 2016, 11:00 AM
  2. Replies: 1
    Last Post: 28 Jan 2015, 11:36 PM
  3. Inheritence :: Ext.extend
    By directx32 in forum Ext 2.x: Help & Discussion
    Replies: 3
    Last Post: 31 Mar 2008, 1:56 PM
  4. [Solved] deep inheritence SimpleForm->Form->BasicForm [now with extra scope issue]
    By TheNakedPirate in forum Ext 1.x: Help & Discussion
    Replies: 10
    Last Post: 26 Sep 2007, 9:22 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •