On Jul 15, 2008, at 12:17 AM, Chris Parrish wrote:

You can solve item #2 using <r:stylesheet> and multiple stylesheet files. Just like you can use the <r:javascript> to reference multiple libraries and create a one-script-to-rule-them-all master to just serve up one library file, you can also incorporate many stylesheets into one master.

So you could create:

where main.css includes:
... some stylesheet definitions...
<r:stylesheet name="main-colors.css" />
... the rest of your style definitions ...

then you'd just stick all your colors in... wait for it... "main- colors.css"

Sorry for the noise. I didn't realize that this was in there.

Of course what's missing there is the neat UI grouping that parts tabs afford. But what's also missing is the hassle of building, testing, and maintaining a parts structure (abstract_controller really keen on managing has-many sub-models and I have to build my own new table structure since Parts isn't really designed for subclassing).

Originally, I debated page parts but decided that, since the audience was more technical, making them mentally keep track of several separate stylesheets that aren't conveniently visible via tabs seemed acceptable and worth the trade off (after all if they can keep track of CSS rules and their impact on the page, they can juggle 3 or 4 files).

I agree. It's not really worth the effort and the existing tags which I overlooked are just fine.

Now, having said all that. Are you using my Sass filter plugin? If not, I might consider it. Sass has a notation for setting document- wide constants so you could, say, declare all your color info at the very top and maybe get by with only one stylesheet. From the Sass documentation:

I haven't yet looked at it. I haven't used Sass much. I like some of the features that it adds, but it removes some control and I'm not ready to tackle it yet since I've run into trouble with Haml and the Help extension (it has some lines that are completely ignored by Haml... but they shouldn't be).

I'll respond to item #1 in a separate email.

Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to