Results 1 to 4 of 4

Thread: Is it possible to import an SCSS file into a theme within Architect?

  1. #1
    Sencha Premium Member
    Join Date
    Dec 2013
    Posts
    3

    Default Is it possible to import an SCSS file into a theme within Architect?

    We have some common SCSS code that will be deployed across a set of apps in various technologies - not all ExtJS - and I'd like to be able to import at least some subset of that into Sencha Architect.

    If I create an Scss Resource under my theme, I can edit that code and attempt to add an @import statement, but I continually get compilation errors (File to import not found or unreadable). I've tried fully qualifying the path name, or sprinkling the file into nearly every directory in the project, to no avail.

    Is it possible to import an external SCSS file? If so, where do I place it and/or how do I refer to it?

  2. #2
    Sencha Premium Member
    Join Date
    Dec 2013
    Posts
    3

    Default

    Incidentally, I've found that if I drop the scss file into c:\Users\\AppData\Local\Sencha\Sencha Architect 3.0\extracted\ext42-compile\ext-theme-neptune\build (which is on the "load path"), it's able to find the file and I can proceed. This is obviously a bit of a hack. It validates that the import will work fine, though, and I now have access to all of my externally defined SASS variables. But I obviously need a better place to put the file and a better way to reference it.

  3. #3
    Sencha User arnebech's Avatar
    Join Date
    Jun 2010
    Posts
    498
    Answers
    10

    Default

    We don't have a good way of adding an external scss file to a theme at this point, other than copy/pasting it's content into a scss resource inside Architect.

    Putting it in the temp compile folder should work. However, that folder is likely cleared every time you upgrade Architect, so it's not a great solution.

    Sass doesn't support @import with absolute paths. However, you should be able to use the relative path. e.g something like this

    @import '../../../../../path/to/_file.scss'

    However, this might break in a future release of Architect if the temp compile folders are moved (touch compile folder will likely be moved for next major point release).

    Thanks for the feedback on this. I'll look into it some more. It would be nice if Architect could handle this better!

  4. #4
    Sencha Premium Member
    Join Date
    Dec 2013
    Posts
    3

    Default Following up a year later...

    Back when I asked this question, we decided to stick with our old way of styling ExtJS themes, and with the normal file structure I was able to import our base SASS variables from our other projects.

    Now that we're a year later, and Sencha has had some intervening releases, is it possible yet to import external SASS into an Architect project?

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
  •