View Full Version : SASS in 4.1

17 Nov 2011, 7:40 AM
A fairly frequent issue that people have been running into is that some of the syntax used in the default theme is incompatible with the most recent versions of SASS - see this thread (http://www.sencha.com/forum/showthread.php?149266-Theming-issue-Line-15-Functions-may-only-be-defined...), for example, and this post (http://www.sencha.com/forum/showthread.php?155114-Where-to-get-themes-for-ExtJS-4&p=674784&viewfull=1#post674784) too. The upshot is, users either have to hold back from updating SASS, or fix the syntax errors in the .scss files directly. I've been opting for the second option, but it's getting annoying to keep applying the same patches every time I upgrade ExtJS. Is there any hope for this to be fixed in 4.1? It's not been fixed in the preview, to my knowledge, and I couldn't spot it in the list of active bugs (http://www.sencha.com/forum/showthread.php?154116-Ext-JS-4.1-Updates&p=673794&viewfull=1#post673794) still to be addressed.

For reference, the syntax errors are:

mixins/_frame.scss:115 - Defining a function within a mixin is not allowed. The "@function pad" should be moved to the top of the document, outside the x-frame mixin.
widgets/_tabbar.scss:31 - Nested mixins are not allowed. The "@mixin tab-bar-top" and "@mixin tab-bar-bottom" should be moved to the top of the document, outside the extjs-tabbar mixin.

17 Nov 2011, 7:48 AM
Also, the ExtJS theming guide (http://docs.sencha.com/ext-js/4-0/#%21/guide/theming) says this under the "Directory Structure" section:

Due to a bug in Ext JS 4.0.2a you will also need to edit line 62 of appname/extjs/resources/themes/lib/utils.rb from this:

images_path = File.join($ext_path, 'resources', 'themes', 'images', theme)
to this:

images_path = relative_path
This ensures images will be served from appname/resources/images rather than appname/extjs/resources/images
This "bug in ExtJS 4.0.2a" is still around, as far as I know, and is another one of those modifications I make every upgrade. Would be nice to have that one also taken care of in 4.1 if possible...

30 Nov 2011, 9:47 AM
No word on this? Official bug report with template filed here (http://www.sencha.com/forum/showthread.php?158358-4.0.7-Syntax-errors-when-compiling-SASS-themes) in the hopes of garnering some attention. :(