External Stylesheets

The ESS Actions have received an upgrade. You may now use hand-coded
CSS as your styles in addition to the original system where a page or
pages within your site were converted into stylesheets to be shared by
other pages in your site.

When you apply the Use External Stylesheets Action to your page, you
will see a new checkbox in the interface titled ‘Use Site Pages as
Stylesheets’. This defaults to true, so as to not disturb any legacy
sites. But if you un-check it, you will now be able to select hand-
coded stylesheets directly and apply up to 4 of them to your page.
(Each stylesheet may be set for either All media, or Screen or Print.)
Freeway will manage the upload and linking of these files automagically.

Check it out here:

http://www.actionsforge.com/projects/view/44-external-style-sheets

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Does it still output the styles that are embedded in Freeway’s inline CSS if External StyleSheets are turned off?

Before I replace any of the actions I have now, I’d like to know.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

If you apply the Use External Stylesheets Action to a page, you can set it to use a hand-coded stylesheet and delete all Freeway-generated styles from that page. If you apply the Create External Stylesheet Action to a page in your site, there is a new control to supress the inclusion of Freeway-generated styles – thereby only using the hand-coded styles.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Perfect, just what I was looking for.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Scratch that perfect. I just replaced the old one and tried to apply it to a new document and i get a javascript error of:

ESS-Convert to StyleSheet
missing ) in parenthetical

and the following line is underlined in red:

var mynewcode = (fwParameters['remove']fwBoolValue) ? dummy : dummy.fwAddRaw(stripCSS_Styles(myStyle));

Anybody else get this? Again, new Freeway document…no other actions applied or any new items created. Blank slate.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

sorry, typo in the Action. Should read

fwParameters['remove'].fwBoolValue

with a dot between the parameter and the attribute name.

I’ll fix it in a few minutes.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It’s fixed, and I took down the broken version. The Convert to Style
Sheet should be 2.01, if you have already downloaded the broken one.

Just to add a bit to the discussion of this Action suite, here’s how I
use it (and thus how I imagined other would use it).

First, the Convert to Style Sheet is a bit of a lame duck any more.
When I wrote this, the problem was that you couldn’t get Freeway to
create an external stylesheet at all. It does this trick now, out of
the box. But it still has a bit of use in the cases where you might be
assembling a page out of template parts or partials. If you have
carved up a page into little bits that get run through a server
process and merged on the fly, you might find that a bit of text from
one page is referencing a CSS style that doesn’t exist on the parent
page where this assemblage is taking place. So by pasting a bit of
reference text into your “style” page and applying the Action to that
page, you can create a stylesheet containing the missing styles, and
then inject that back into the main shell page where these template
partials are being used.

Second, the Extra Styles button was added to Convert to Style Sheet in
order to allow you to easily hand-code a few extra styles into a sheet
that was largely created by letting Freeway write the styles, not as a
general editing environment. After all, if you want to hand-code CSS,
the fwBigPrompt control is hardly the place for it. There’s no syntax
highlighting, not even tabs are allowed – totally primitive, like
coding in System 4 SimpleText. Now that you can attach regular files
(coded in a proper editor, like CSSEdit or a programmer’s text editor)
there’s really no need for this side of the suite to exist besides
converting Freeway-drawn styles into an external reference.

So if you want to make up a bunch of hand-coded styles, just create a
new sheet in a real editor, save it as a file somewhere on your disk,
and then in Use External Style Sheets 2.0, un-check Use Site Pages As
Stylesheets and simply attach your .css files directly. No copy and
paste into a separate page required.

Walter

On Jan 25, 2009, at 5:25 PM, waltd wrote:

sorry, typo in the Action. Should read

fwParameters[‘remove’].fwBoolValue

with a dot between the parameter and the attribute name.

I’ll fix it in a few minutes.

Walter


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

On 26 Jan 2009, 1:04 am, waltd wrote:

So if you want to make up a bunch of hand-coded styles, just create a
new sheet in a real editor, save it as a file somewhere on your disk,
and then in Use External Style Sheets 2.0, un-check Use Site Pages As
Stylesheets and simply attach your .css files directly. No copy and
paste into a separate page required.

The first two parts of the action seem to work now, but I can’t seem to get the above part to work correctly. The idea is great due to lots of copying and pasting. What the problem lies in is that selecting the CSS file is grayed out when I goto select is as a CSS file that I created in CSSEdit. I even tried giving it a manual ending of .css and it still wouldn’t take.

I’ve noticed that the version bar on the bottom says 2.0, but I deleted the old one and installed the new one. Should it say 2.01? I’d really like to get that to work if possible.

Anyone else experiencing this?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The only Action that changed was Convert to Style Sheet, the other
Action (and thus its version) was not affected. Each Action file (or
bundle) may contain multiple Actions. Each Action has a version, but
they work independent of one another.

Walter

On Jan 26, 2009, at 3:50 AM, Dan J wrote:

I’ve noticed that the version bar on the bottom says 2.0, but I
deleted the old one and installed the new one. Should it say 2.01?
I’d really like to get that to work if possible.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Please follow these steps and see if it works for you.

  1. Use CSSEdit to create a CSS file. Save it somewhere on your Mac or
    a networked server.
  2. In Freeway, apply the Use External Style Sheet Action to the page.
  3. Un-check ‘Use Site Pages As Stylesheets’ in the Actions palette.
  4. Choose your CSS file using the CSS picker (switch to Select…,
    navigate to the file you created in step 1, Okay the dialog).

I suspect that you didn’t do #3 above, but that’s just a guess.

Walter

On Jan 26, 2009, at 3:50 AM, Dan J wrote:

The first two parts of the action seem to work now, but I can’t seem
to get the above part to work correctly. The idea is great due to
lots of copying and pasting. What the problem lies in is that
selecting the CSS file is grayed out when I goto select is as a CSS
file that I created in CSSEdit. I even tried giving it a manual
ending of .css and it still wouldn’t take.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I just went through the steps, it doesn’t work. I went and created, and saved, a document in CSSEdit. Applied the action to the Freeway page, unchecked the box for “Use Site Pages As StyleSheets”, tried to choose the CSS file I made on the desktop and it’s still grayed out.

I really don’t think this works. Has anyone else gone through and got it to work?

Walt, if you want to see a video of what I’m doing then I can create one here.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What version of Freeway are you using? I can send you a document where everything is linked up, and it really does work.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hang on, I just found your bug. I had set the type property to css,
which works as long as you haven’t used a tool like CSSEdit that sets
a Type and Creator code on the files. I was able to attach a “generic”
css file that I downloaded from a site, but not a file created with
CSSEdit. I’ll post a fixed version in a minute.

Walter

On Jan 26, 2009, at 4:07 PM, Dan J wrote:

I just went through the steps, it doesn’t work. I went and created,
and saved, a document in CSSEdit. Applied the action to the Freeway
page, unchecked the box for “Use Site Pages As StyleSheets”, tried
to choose the CSS file I made on the desktop and it’s still grayed
out.

I really don’t think this works. Has anyone else gone through and
got it to work?

Walt, if you want to see a video of what I’m doing then I can create
one here.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
List Options | FreewayTalk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Okay, the fixed version has been uploaded to ActionsForge and all’s
well again.

Walter

On Jan 26, 2009, at 4:32 PM, Walter Lee Davis wrote:

Hang on, I just found your bug. I had set the type property to css,
which works as long as you haven’t used a tool like CSSEdit that
sets a Type and Creator code on the files. I was able to attach a
“generic” css file that I downloaded from a site, but not a file
created with CSSEdit. I’ll post a fixed version in a minute.

Walter

On Jan 26, 2009, at 4:07 PM, Dan J wrote:

I just went through the steps, it doesn’t work. I went and
created, and saved, a document in CSSEdit. Applied the action to
the Freeway page, unchecked the box for “Use Site Pages As
StyleSheets”, tried to choose the CSS file I made on the desktop
and it’s still grayed out.

I really don’t think this works. Has anyone else gone through and
got it to work?

Walt, if you want to see a video of what I’m doing then I can
create one here.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
List Options | FreewayTalk


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It works now. Thanks for staying dedicated to fixing it out.

It even puts it in the Resources folder. Too bad there isn’t a way to put it in the CSS folder with the other CSS documents, but I have no clue how hard that would be.

Thanks again Walter.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Impossible unless Softpress add to the API for Action writers.
Furthermore, if you set your document to use external stylesheets,
your Actions can’t see what styles are set in them, either.

Walter

On Jan 26, 2009, at 6:28 PM, Dan J wrote:

Too bad there isn’t a way to put it in the CSS folder with the other
CSS documents, but I have no clue how hard that would be.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Furthermore, if you set your document to use external stylesheets,
your Actions can’t see what styles are set in them, either.

That means you will have to use dual style sheets for certain action elelments; the external that Freeway generates and the hand job external? Bummer…


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

True, I’d trade in some of these iPhone features for better CSS handling. The mobile redirection action doesn’t even work right.

Who knows, perhaps Softpress is going to drop a shocker that will appease the masses. Unlikely, but do-able.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

But, where ARE these styles after I do this? I simply must be missing
something. I went through Dan’s video twice, doing exactly has he
showed, including using CSS Edit, but I could not get it to work. Or,
I could not figure out HOW it works. Even when I copied all my styles
from CSS Edit into the javascript window, nothing happened. Aren’t the
styles supposed to then appear in the FW styles palette? If not, how
do I apply them to my text? Dan’s example used the H1 tag, which is
already in there, but what about styles that aren’t there? Aren’t they
supposed to “appear” somewhere so we can use them? I just can’t get my
head around this, and I really, really want to.

Now, with the new version, I don’t even have to use the Convert to
Stylesheet Action if I’m just using an external file, correct? I tried
that just now and have attached the stylesheet. It does indeed get
published into the Resources folder, but again, where are they for me
to apply them?


Robin Stark


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

The reality is that you first have to create the styles in Freeway and then you can add more styles to them later.

The process I would suggest is to design your site without “External StyleSheets” checking in the Document setup and then when you’re done with the site, I’d view it in Safari (view source) and copy the chunk of CSS that is inline between the sections and paste that into CSSEdit. Then you’d want to make your style changes and then in Freeway either attach the style-sheet using the updated action or just copy and paste it the other way into the Javascript pop-up. Then make sure that the “Remove Document Styles” is checked in the “Convert to StyleSheet” action options and then check the box to “Remove Document Styles” in the “Use External StyleSheets.”

The short version is that it’s a beast process to do and it could be a lot easier to do if this was in-program.

Beyond the other feature requests out there, I think this one needs to absolutely be implemented first. If you’ve read the reviews from Freeway 3 up to 5, the single most thing they say would take Freeway to the next level would be better CSS integration.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options