1. #1
    Sencha User ludoo's Avatar
    Join Date
    Mar 2007
    Location
    France, Luxembourg
    Posts
    60
    Vote Rating
    2
    ludoo is on a distinguished road

      0  

    Default SCSS for classes with custom namespace

    SCSS for classes with custom namespace


    REQUIRED INFORMATION


    Sencha Cmd version(s) tested:
    • Sencha Cmd 3.1.0.256
    Operating System:
    • Win7
    Framework used:
    • Ext JS 4.1.1a
    Description:
    • I don't find how to include scss from sass/src into sass build process.
      All classes with Ext namespace worked, but not with custom namespace.
    Steps to reproduce the problem:

    Steps to reproduce :
    • create a "demo" app with sencha generate app demo demo,
    • Class "demo.view.Viewport" is created
      Code:
      Ext.define('demo.view.Viewport', {
          extend: 'Ext.container.Viewport',
      ...
    • Add a Viewport.scss file into sass/src/demo/view for the class 'demo.view.Viewport'
    • Write some CSS rules in it :
      Code:
      body{color:green;}
    • Add a Viewport.scss file into sass/src/container for the superclass 'Ext.container.Viewport'
    • Write some CSS rules in it :
      Code:
      img{color:yellow;}
    • Compile with sencha build app

    The result that was expected:
    • All CSS rules from both SCSS are included in my compiled stylesheet
    The result that occurs instead:
    • Compiled stylesheet resources/demo-all.css contains only rules for Ext namespace. No way to include any SCSS for demo namespace.

    I tried to empty app.sass.namespace / package.sass.namespace and added 'Ext' and 'demo' folder under sass/src. Same results.

    Thanks for your help.

  2. #2
    Sencha User ludoo's Avatar
    Join Date
    Mar 2007
    Location
    France, Luxembourg
    Posts
    60
    Vote Rating
    2
    ludoo is on a distinguished road

      0  

    Default Solved

    Solved


    After investigation, it seems the key is package.sass.namespace.

    To include both scss rules, set in your package/.sencha/package/sencha.cfg :
    Code:
    package.sass.namespace=
    and use sass/src/Ext/ and sass/src/demo/ for base folders for your classes.

    Solved, so thread can be closed.

  3. #3
    Sencha User
    Join Date
    Mar 2013
    Location
    Moscow, Russia
    Posts
    19
    Vote Rating
    0
    koutsenko is on a distinguished road

      0  

    Default


    Hello, ludoo, can you import and use default sass mixins in your Viewport.scss?
    Please, take a look to my question: http://www.sencha.com/forum/showthre...-custom-theme. , seems that you can answer.

    Thanks.







Thread Participants: 1

Tags for this Thread