hi,
i'm glad to see that you are using Assetic to directly integrate with sass + compass from the command line.
i think using tokens that replaced before calling compass might work, but it ties sass code to a Sasson specific syntax and makes sass files contain non-standard syntax. it would be interesting if you could instead pass real variables to the compass compiler, see
https://groups.google.com/forum/?fromgroups=#!topic/compass-users/EnLdRjfDbac.
also it would be great if this capability could be abstracted from sasson, so that you can integrate it with any base theme you'd like to use. currently Sasson integrates a lot of third-party code, i'd rather like to see this being put together in a more modular way (assetic module, libraries module, ...)
regards,
dasjo
Comments
Comment #0.0
dasjoUpdated issue summary.
Comment #1
tsi commentedThe 'Sasson tokens' or hook_sasson_alter was used heavily in Sasson 2.x, in 3.x we rarely use it and the hook was left only as an optional API function. stylesheets are not going through it by default, only if
'sasson_alter' => true.If there is a better way, I'll gladly use it but this is in very little use in Sasson's core so I'm not going to put too much effort into this. you can see I've already commented on that issue with no feedback.
Comment #2
dasjoi see, from my point of view, being able to parametrize sass would be the only reason to integrate sass compiling with drupal.
Comment #3
tsi commentedI agree, this a great feature, but keep in mind that it is very limited since stylesheets should be aggregated and cached.
The better place for truely dynamic CSS IMO would be using inline drupal_add_css.
Anyway, I'm not against this in any way, can you get it to work?
Comment #4
dasjoaggregating & caching stylesheets wouldn't affect the method that i am imagining. my idea is the following:
- theme settings can be turned into variables that get passed to the compass during compiling process
- this allows to override sass variables, if use the default! flag
- the compiled css is complete, can be cached & aggregated as normal. it doesn't use anything like tokens, as the variables already got processed during the compass compilation process
does that make sense? using drupal_add_css is to late, as the benefit would be to being able to use theme-defined variables within sass. this would allow to configure grid layout settings, colors etc.
i don't really have time to work on this right now. at the moment we are using omega 4. when working on this i think i'd go for a module-driven approach, see also my reasoning at the issue summary.
Comment #4.0
dasjoup
Comment #5
tsi commentedCleaning up.
We are now using much more Sass settings variables and much less theme settings for these kind of settings
You are welcome to try the latest v3.x