I've tried a couple different subthemes, both using drush sns and manually duplicating files from the subtheme folder. No matter what I do, the theme refuses to use my grid settings. Instead, it's using the !defaults from sasson/sass/salsa/sass/_settings.scss ($columns: 16 && $gutter-width: 20px).
I've changed settings in admin and in subtheme.info, and tried overriding the variables in either subtheme.scss or in a partial. No dice. I've tried changing the variable globally, and locally within a specific class. Nope.
So far, the only thing that has worked is if I edit the original _settings.scss with different variables.
Looks like the main sasson theme is doing this too. Just checked my theme settings, and it's ignoring them. Not that it should matter, but I'm trying to get it to go 19 columns and 0 gutter.
I'm running version = "7.x-3.x-dev"
core = "7.x"
project = "sasson"
datestamp = "1351690423"
Comments
Comment #1
tsi CreditAttribution: tsi commentedSo your Sass is being re-compiled to CSS - your custom styles work properly and it is only the grid settings, right ?
Just to be clear, are you using Sasson's built-in compiler ? you're not compiling with
compass watch
or any app that does it ?Comment #2
superjerms CreditAttribution: superjerms commentedCorrect. I've got compass installed on the server, but sasson is triggering it to compile.
SASS SETTINGS:
"compile sass to css" & "development mode" are on
"compiled files path" & "url helpers" aren't set
"debugging" is on
DEVELOPMENT:
"File watcher" & "update styles without refreshing" are off (these froze up my server...4.6ghz & 1.6GB ram, had my server load up at the 11-12 range.
"files to watch" points to my subtheme.scss, but not any of my partials
I'm just resaving and clearing caches as needed.
Now that i'm messing around with some stuff, I am noticing that I can override the vars from within my partial; it's just not updating the grid overlay (but it's not pulling from my .info or admin>appearance>settings>subtheme>grid settings)
Comment #3
superjerms CreditAttribution: superjerms commentedjust for fun, here's the .info settings it's ignoring...
Comment #4
tsi CreditAttribution: tsi commentedThanks for all the info,
So, about your settings, nothing special here. you should have "debugging" turned on only on extreme cases where you are testing the compiler (and now we are, but don't forget to turn it off) this might also be related to the fact that the file watcher choked your server though I'm not sure why. all in all your settings sound good.
About the .info file - well, those theme settings are just the default settings, you can change them before you enable the theme but once you did - those go into the DB and changes in the file will be ignored.
But I still can't see why changes in your theme settings form are ignored...
What OS are you on ? what version of compass ? did you get your custom styles, other than the layout, to compile ?
let's try a small test, put this anywhere inside one of your Sass files (main stylesheet, not a partial) :
This token should be replaced by Sasson to show the number of columns.
For the record, you could work around this by copying layout.scss from Sasson into your sub-theme and call it from your info file, this will disable the original layout.scss and allow you to set via code all the grid settings without hacking anything. but this way we won't find what caused the issue :)
Comment #5
superjerms CreditAttribution: superjerms commentedI'm running Compass 0.12.2, but having sasson trigger all compiling. I'm on CentOS 5.6 (Linux version 2.6.18-238.9.1.el5xen (Red Hat 4.1.2-50)).
And, sass/compass has been compiling all along (I'm just using debug to make things compile because the watcher is causing the server to go crazy, and the overhead is comparably negligible). Even salsa settings are correct, except that it's basing everything off the wrong [column], [gutter-width], and i'm guessing sidebar settings.
With your code, the token outputs the correct value, but the background grid is still wrong. More important to me, though, is that the body is still rendering with 16 columns unless I override the token from within my sheet. Stuff I've tried (none of which has worked):
My goal is to do things that last way (settings via DB, layout via included _layout.sass). But to summarize, sasson is seeing the right token, but is ignoring it for both the theme and the background. If I override the vars from within my subtheme sheets, it'll fix the theme, but not the background.
Comment #6
tsi CreditAttribution: tsi commentedYou have one more option - creating a sub-theme without enabling it, editing the .info file with your layout settings and only then enabling it.
Other than that, I'm really out of ideas, this has never happened to anyone I know of.
Are you working on a fresh drupal install ? is there any other module that can interfere with the theme ?
Did you ever tried Sasson 2.x ? did you have similar issues with the php compiler ?
With the info available, I can only suggest workarounds -
Did you try putting a copy of layout.scss from the parent into your theme and .info file ? this will give you control over the layout settings.
Right below that, you can call something like :
This should add the grid background using the values you've set above it.
Comment #7
tsi CreditAttribution: tsi commentedJust read again your last comment, you shouldn't need the "debug" mode to have compass re-compiling your files, they should compile whenever they are modified (on page refresh).
The file watcher makes it so you wouldn't even have to refresh your page, Sass is being re-compiled and CSS is refreshed in the browser without a page refresh.
"Debug" mode forces all Sass files to re-compile even if they hadn't been modified.
BTW when in dev mode, you can also use Ctrl+C to re-compile all stylesheets or Ctrl+P to re-compile for production (minified CSS).
Hope that clears up the situation.
Comment #8
superjerms CreditAttribution: superjerms commentedActually tried the "defaults via .info" route already (second bullet above).
I had been on 2.6, and it wasn't having issues like this, but it was really choking on compass commands. I could always try 2.7, but is there a way to force sasson to use compass instead of phamlp? I thought I vaguely recalled something, but couldn't find anything when I was looking around after moving to the new server.
I'm using workarounds right now, but wanted to loop you in. I'm really liking Sasson, and hope to contribute in whatever way I can :)
Comment #9
erutan CreditAttribution: erutan commentedI used the ruby compiler when working locally, I'd just sass-watch the folder in my subtheme and uncheck the compile settings in the theme UI on the server. If you want to use a full compass install you could just create a new compass project in that folder and tweak the config.rb if/as needed.
Comment #10
tsi CreditAttribution: tsi commented@erutan, this is about v3.x where you don't need to manually
watch
the files since Sasson is compiling using the original ruby compiler (and Assetic).Comment #11
erutan CreditAttribution: erutan commentedThe post above mine mentioned using 2.6 and wanting to try out 2.7 using out the ruby compiler, so my comment addressed that. :)
Comment #12
tsi CreditAttribution: tsi commentedPlease try again with the latest 7.x-3.x-dev (wait for it to update, shouldn't take more than 12h), there was a big change in this commit - I hope it won't break anything you already did.
Comment #13
superjerms CreditAttribution: superjerms commentedSorry about the long delay. Those changes in the last update nuked the old theme, and I didn't get a chance to start a new one till now.
I'm working from a fresh install, in a different environment than before (on my mac, MAMP, D7.18, latest sasson3x dev). I've got a bunch of modules, but none of them are enabled. It's pretty much stock, other than disabling core color/toolbar/shortcut/update_manager/comment and enabling admin_menu and module_filter.
For testing, I'm configuring variables ($gutter-width: 20px; $columns: 24; $sidebar-first: 2; $sidebar-second: 5) in the mytheme/sass/mytheme.scss and verifying the changes using a variation of your earlier code:
body:before {
background: orange;
display: block;
padding: 20px;
content: "Total columns: #{$columns}. 1st Sidebar: #{$sidebar-first}. 2nd Sidebar: #{$sidebar-second} col."
}
That SCSS returns the correct subtheme values.
With all of that in place, there are still problems.
As before, the grid that is turned on through admin (appearance>sasson-subtheme>settings>development) is stuck on the salsa default settings, and ignores subtheme variables. Also as before, I can manually create a grid using @include salsa-background in my subtheme, and it has the correct gutters/columns/widths.
Another (new) problem: no matter what I do, the grid renders the sidebars incorrectly. The SCSS I posted above does output the correct values for $sidebar-first and $sidebar-second, but the sidebars themselves are still pulling their settings from the base Sasson settings (inspecting in FireSASS, the sidebars are 25% wide, from sasson-base.scss - line 34).
If I redeclare the @include grid($sidebar-first, 0) from within my subtheme.scss, it works.
So, to summarize, all of the base Sasson SCSS is ignoring (or probably, rendering before) any variable updates I have made within the subtheme SCSS.
Comment #14
superjerms CreditAttribution: superjerms commentedOk, figured it out. I was trying to override the variables in my subtheme.scss instead of making a duplicate of ../sasson/sass/salsa/sass/_settings.scss
For what it's worth... between my overrides not working, and the fact that there's two _settings.scss (one in the root sasson's base sass folder and the other in the salsa's sass folder), it might be a bit confusing to other people than just me.
If nothing else, you might include a _settings.scss in the SUBTHEME folder, to make it obvious that people need to update the setting.
Comment #15
tsi CreditAttribution: tsi commentedThank you, a settings file in the sub-theme makes perfect sense ,I'll add that. If you can think of anything else that might make that more clear please share...
Comment #16
superjerms CreditAttribution: superjerms commentedOn further review, I think there's an actual bug here.
Your css will only outputs !default values (defined in sites/all/themes/sasson/sass/salsa/sass/_settings.scss), instead of sasson's or your subtheme's overrides. Note that the salsa settings file does not define sidebars, which is where the error is coming from.
Bug?
Comment #17
superjerms CreditAttribution: superjerms commentedOne other thing, while I'm still thinking about the whole partials thing. You mentioned earlier that debug shouldn't be necessary for the page refreshes. My question would be, does Assetic compile a production css file if I update a partial, but don't touch the subtheme.scss? It seems as though my "partials" changes only show up if I resave the subtheme.scss
For example:
I dunno if this all is a bug or intended behavior, but that's why I had debug on. It forces Sasson to re-examine subtheme.scss even if I haven't saved it (e.g. i only saved partials/_test.sass). Obviously, I can't do that once the site is in production, but it's faster than resaving subtheme.scss repeatedly.
Comment #18
tsi CreditAttribution: tsi commentedYour touching two different issues:
#16 - if you didn't
@import "settings"
into subtheme.scss before importing _test.sass, then you shouldn't expect to have the settings available to you in your test partial. that is expected and if that is the case, then no issue here.#17 - that is a real issue, Sasson can only check the last modified date of the file it is currently compiling, it doesn't know of the imported partial and if they have been modified, so it doesn't recompile your subtheme.scss until you save it again. I don't have a real solution for this problem but we do have a nice work-around - when pressing ctrl+c in your browser your sass files will be re-compiled, or you can even use Ctrl+p and compile for production (output minified CSS with no debug info), I use that before pushing to production. anyway, using the debug option is an overkill since it will re-compile everything, always, no matter what you were working on.
Comment #19
superjerms CreditAttribution: superjerms commented#16 - I happened to figure that out on my own a couple hours after posting last night. I hadn't been importing _settings.scss at all, just assumed that it'd be found on its own. A quick solution there could be to mention settings in the comment on line 28 of SUBTHEME.SCSS, such as:
#17 - True, but alt-c/alt-p don't trigger a page css refresh (even though they do trigger the success message). I assumed this was by design? I guess a helpful addition would be to make those shortcuts also trigger a full page refresh.
Debug is overkill; I was just saving myself a keystroke by using it to force the refresh. Sure, it'd make for a long day if I have several users at once making page requests on a production site, but it saves me a step in my local environment and staging server.
Comment #20
tsi CreditAttribution: tsi commentedSure, alt-c/alt-p should re-compile your sass files *and* refresh your browser window, I never had issues with it, open a new issue if that doesn't work as expected.
Another alternative to the 'debug' checkbox is adding a line to your .info file, it will cause that specific file to always recompile as opposed to the checkbox forcing *all* your files to recompile:
styles[sass/filename.scss][options][recompile] = true
Comment #21
erutan CreditAttribution: erutan commented#19 - +1 for including that @import for _settings.scsss.
I'm running a dev site on v3.x now and I'm getting some compiling errors I'm going to toss up a new issue for.
Comment #22
tsi CreditAttribution: tsi commentedCleaning up.
So much have changed lately in the 3.x branch that this issue is probably irrelevant.
You are welcome to try the latest v3.x
Comment #23
cyxair CreditAttribution: cyxair commentedcomment moved