There are systems that can automate bringing all of the styles together into a single sheet, but as Todd pointed out, the kinds of things you would need to do to your CSS selectors to make the whole thing work. Here’s the issue as I see it, and this thought exercise may spur someone to an interim solution. (Maybe me, who knows.)
-
If you make your CSS styles using IDs, as Freeway does (and this choice is based upon how the existing page structure is designed – inherited from version 1 all the way up – in Freeway) then you will need to police the IDs for duplication not on a page-by-page basis, but a site-wide basis.
-
If #item1 on page1.html is different in any way from #item1 on page2.html, then you have to do something to namespace these two elements, like rename one to #item1_page2 or something equally ugly. Otherwise, the last version of #item1 in the CSS source order (assuming you just concatenated these stylesheets together into one massive sheet) would “win”, and all elements with that ID would look the same, even if that wasn’t what you designed.
-
If you throw master pages into this mix, then you have to further balance the need for the master style to corral elements across many pages, while still allowing for local differences in those individual child pages.
Freeway encourages you to draw individual items on individual pages, and style those elements and their contents as you please in a visual manner. A hand-coder intent on reducing her total amount of work would create styles based on a hierarchy of styles, possibly based on classnames rather than IDs. Rather than generating near-duplicate style blocks over and over (essentially moving the inline style block out to an external file or the page head) there might be a class to make an element half the width of the page, another to set the font styles to make the text gray and sans-serif (but defer to other, closer selectors like the heading level or tag name to make the more specific decisions about font size or leading). These class-based styles would be stacked up so you might see something like <div class="sidebar half right">whatever</div>
rather than <div id="item#42">whatever</div>
.
An Action or a post-processor cannot possibly untwist designer intent out of the generated HTML. A major interface change would be needed in Freeway itself in order to allow a designer to make repeatable elements and tag them with these sorts of element styles (as separate from the kinds of font or tag styles that Freeway already lets you generate. Imagine if you could select an element and make a class-based style out of it, and then edit that style to make it more or less specific. Now further, imagine if you could create and apply multiple styles on an element and see the result in the design interface.
This is an unbelievably difficult thing to pull off when you don’t have the crutch of HTML. Freeway would have to create an analogue of HTML and CSS rather than what they currently do, which is to create a layout in a WYSIWYG view and then extrapolate HTML and CSS from that at publish time. They are not re-rendering HTML in real time, they save that for an output step, which can take a variable amount of time depending on the complexity of your design. If they were to create HTML in real time, or chop and puree the existing HTML as Dreamweaver and other WYSIWYG editors do, then the output quality would suffer. I have never seen a line of Freeway’s code, but I have a highly-evolved mental model of its inner workings. This is something I wish could be made, but I am not at all sure how or if it could be done.
Walter
On May 3, 2013, at 12:16 PM, Sly wrote:
Thank you chaps.
Yes Todd, I think that’s what Ernie means and I suppose, in a crazy way, might be the best way to pull them all together, so I can then extract them into one css file and then begin to hand code the rest of the site.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options