[Pro] Strategies - multiple class styles

Multiple Class Styles in Freeway Pro

I’m interested in coming up with some working strategies for doing things that are common practice for professional web designers but hard to do in Freeway Pro. Today’s topic, multiple class styles.

Freeway Pro User Interface:

For most FWP items applying a style is as simple as selecting a target then clicking the style name from the Style Palette to apply. Logically, the user interface should allow applying multiple styles by either shift or command-click choosing them from the Style Palette in the user interface. Should, but does not.

AddSelector Action:

This action will add a class selector to an html item – replacing any existing class selector. However, you can type multiple classes, separated by spaces, into the Class field. There are a couple major drawbacks to using this action… First, it currently only targets a limited group of elements, overlooking all the new html5 elements. Second, it does not guarantee that Freeway Pro will publish the style you have entered if it does not see the style applied to the page via the user interface.

Extending the Item:

Similarly, the Extended Item function in FWP allows you to create a “class” selector on any html item, allowing you to enter multiple class styles (separated by spaces). The problem with this approach is still FWP not publishing those class styles unless they are already applied in the traditional user interface or by using the Tag Style Cheat to force FWP to publish it.

I’ve always preferred that Freeway Pro be able to handle multiple class styles natively through the “normal” user interface, and although I have outlined two options for accomplishing this common professional web design practice, I am still looking for a better solution (and, as always, hoping the SP guys are paying attention). If anyone has a good working strategy for this, I am open to learning something new.


Ernie Simpson


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

Other than the methods you mentioned I don’t know of any other ways to accomplish what you want, other than, of course, fixing the core app so it can “see” those styles without needing to first apply them to the page.

Todd
http://xiiro.com


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

Thanks Todd, I was just making sure I’d covered me bases.

There is a cheat that I’ve used in the past to force Freeway Pro to publish
un-applied styles, I can probably modify it for this new version.

More work than necessary still, but doable.


Ernie Simpson

On Fri, Feb 1, 2013 at 4:56 PM, Todd email@hidden wrote:

Other than the methods you mentioned I don’t know of any other ways to
accomplish what you want, other than, of course, fixing the core app so it
can “see” those styles without needing to first apply them to the page.

Todd
http://xiiro.com


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

What is it?

Todd

There is a cheat that I’ve used in the past to force Freeway Pro to publish
un-applied styles, I can probably modify it for this new version.

More work than necessary still, but doable.


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

One way to force Freeway Pro to publish a style without actually “applying”
it is to switch the name from the Name field in the Style Editor to the Tag
field (adding a leading period, of course). However, the downside of this
is such styles cannot be applied the normal way.

A better way has been to create an extra page that nobody sees and has no
links to or from. A kind of scratch page then, that has styles applied to
items on it - causing FWP to publish them to the stylesheet for you to
apply everywhere else.


Ernie Simpson

On Fri, Feb 1, 2013 at 6:22 PM, Todd email@hidden wrote:

What is it?

Todd
http://xiiro.com

There is a cheat that I’ve used in the past to force Freeway Pro to
publish
un-applied styles, I can probably modify it for this new version.

More work than necessary still, but doable.


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

Ah yes, I do remember using the second method once … a long time ago … in a galaxy far, far away.

Now I just type my style and move on ; )

Todd

A better way has been to create an extra page that nobody sees and has no
links to or from. A kind of scratch page then, that has styles applied to
items on it - causing FWP to publish them to the stylesheet for you to
apply everywhere else.


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

This was the original reason for the TemplateHelper Action. Later it morphed to include the whole “Partial” system, carving out elements from the donor page and saving them as separate fragments to be added later by a template system or Ajax. What you do in the first case is draw an HTML item on the page, fill it up with instances of your styles, then apply the TemplateHelper to it. The element is removed from the page, but the styles remain.

Walter

On Feb 1, 2013, at 8:12 PM, Ernie Simpson wrote:

One way to force Freeway Pro to publish a style without actually “applying”
it is to switch the name from the Name field in the Style Editor to the Tag
field (adding a leading period, of course). However, the downside of this
is such styles cannot be applied the normal way.

A better way has been to create an extra page that nobody sees and has no
links to or from. A kind of scratch page then, that has styles applied to
items on it - causing FWP to publish them to the stylesheet for you to
apply everywhere else.


Ernie Simpson

On Fri, Feb 1, 2013 at 6:22 PM, Todd email@hidden wrote:

What is it?

Todd
http://xiiro.com

There is a cheat that I’ve used in the past to force Freeway Pro to
publish
un-applied styles, I can probably modify it for this new version.

More work than necessary still, but doable.


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


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

Hello Freeway Community. . .

Over the past few months I have been going deeper with Freeway Pro, semantic markup and styling. Freeway can be a little quirky at times but still love the program, it is amazing what it does and what can be done with it.

In an effort to end up with cleaner markup and styling under the hood as well as add more custom features I have started to do a lot more of the styling by hand.

  1. Is there a way or an action which will cause freeway to display styles that have been applied through extended in the working environment?

  2. If not what are your thoughts regarding a Freeway centric workflow which includes custom styling?

Kind Regards, Dave


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

Apologies Ernie. . .

Accidentally started my post here. The following is a link to a new thread.

http://www.freewaytalk.net/thread/view/142338

Regards, Dave


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

  1. Is there a way or an action which will cause freeway to display styles that have been applied through extended in the working environment?

Not that I know of. I learned to live with it.

  1. If not what are your thoughts regarding a Freeway centric workflow which includes custom styling?

My 5 cents are, displaying custom styles is THE key feature for FreewayX as well as a cool text-editor for MarkUp dialogues. Needless to say that styling should be removed from inspector and there are a couple of more things that I’d like to see. For this reason I call it FreewayX - the mystery :slight_smile:

Cheers

Thomas


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

Going back to my original post, I can say that I have had some measure of
success using the Extended Item to add extra classes to layered html items
(divs).

Review - if you create a class style then click and apply it to a div item,
Freeway Pro outputs that item with the class attribute.

Problem - if you want to apply a second or third class style, Freeway Pro’s
inherent styling directives will likely make this difficult or impossible.

Solution - you can extend the div item to add class attributes… even if you
have applied one attribute the traditional way, this will not overwrite but
add to the class attribute. So if you’ve selected your div and clicked a
class style (say, “boxx”) then extended it on the div tab with name =
“class” and value = “one two” you will get

  div id="item123" class="boxx one two"

Which is great, right? Wrong.

Problem - FWP only publishes styles it thinks are being used - which I find
hypocritical as it publishes all kinds of it’s own styles regardless of
whether they are used, but that’s another topic. So in my example so far,
FWP would publish the “boxx” style, but not the “one” or “two” style.

Solution - There is a way to trick FWP into always publishing a style… that
is to define it as a Tag Style… simply name it in the Tag Style name box
instead of the Class Style box (“Name” in FWP). For class styles named this
way, it’s important to remember the leading period (full-stop) which
defines class styles in CSS. Now FWP will always publish this style.

Potential problem - Freeway will not allow identical names for styles… If
you’ve defined a Class (Name) style, FWP will consider any attempt to
create a Class (Tag) style as a duplicate and disallow it. The easiest
solution is to edit the Class (Name) style by typing it’s name (with the
leading period) into the Tag field THEN deleting it from the Name field

Problem - Class styles defined through the Tag field cannot be applied in
the traditional manner.

Solutions - One way would be to simply always apply the class to objects
through the Extended interface. Cumbersome, yes… and currently a pain for
editing as there is no visual cue to which items have been extended.
Another way would be to leave the style as a regular, applicable Class
(Name) style… as long as it is traditionally applied to one item on the
page (either the regular page or the Master) FWP will publish it. As long
as each of the three styles from the example are traditionally applied to
at least one item (not the same item) then it will be possible to add the
additional classes via the Extended Item interface.

Potential problem - (did you think we were out of the woods by now?) it’s
possible to create a Specificity issue from the order FWP will write the
class styles. If one item is class=“boxx one two” and another is “one two
boxx” conflicting style rules in the first will resolve to the .two style
and to .boxx in the latter. This can be addressed through careful, complex
planning - or by going back to the Tag style method and Extending items
with the correct style order. And that’s as far as I go.

Summary - This looks like a lot of hoops to jump through, but once you get
the hang of it, it’s as tolerable as any other of the FWP workarounds I put
up with.


Ernie Simpson

On Fri, Feb 1, 2013 at 1:27 PM, The Big Erns email@hidden wrote:

Multiple Class Styles in Freeway Pro

I’m interested in coming up with some working strategies for doing things
that are common practice for professional web designers but hard to do in
Freeway Pro. Today’s topic, multiple class styles.

Freeway Pro User Interface:

For most FWP items applying a style is as simple as selecting a target
then clicking the style name from the Style Palette to apply. Logically,
the user interface should allow applying multiple styles by either shift or
command-click choosing them from the Style Palette in the user interface.
Should, but does not.

AddSelector Action:

This action will add a class selector to an html item – replacing any
existing class selector. However, you can type multiple classes, separated
by spaces, into the Class field. There are a couple major drawbacks to
using this action… First, it currently only targets a limited group of
elements, overlooking all the new html5 elements. Second, it does not
guarantee that Freeway Pro will publish the style you have entered if it
does not see the style applied to the page via the user interface.

Extending the Item:

Similarly, the Extended Item function in FWP allows you to create a
“class” selector on any html item, allowing you to enter multiple class
styles (separated by spaces). The problem with this approach is still FWP
not publishing those class styles unless they are already applied in the
traditional user interface or by using the Tag Style Cheat to force FWP to
publish it.

I’ve always preferred that Freeway Pro be able to handle multiple class
styles natively through the “normal” user interface, and although I have
outlined two options for accomplishing this common professional web design
practice, I am still looking for a better solution (and, as always, hoping
the SP guys are paying attention). If anyone has a good working strategy
for this, I am open to learning something new.


Ernie Simpson


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

Before I can make some helpful additions here, I have to test all this.

On 7 Jan 2014, 4:09 pm, The Big Erns wrote:
Review - if you create a class style then click and apply it to a div item,
Freeway Pro outputs that item with the class attribute.

OK - got this. It’s the only chance to “preview” class styles within the construction as long they are part of the regular styling procedure (not extended style-dialogue) - at least nearby.

Problem - if you want to apply a second or third class style, Freeway Pro’s
inherent styling directives will likely make this difficult or impossible.

Solution - you can extend the div item to add class attributes… even if you
have applied one attribute the traditional way, this will not overwrite but
add to the class attribute. So if you’ve selected your div and clicked a
class style (say, “boxx”) then extended it on the div tab with name =
“class” and value = “one two” you will get

  div id="item123" class="boxx one two"

or you can even use the ID2class action, isn’t it?

Which is great, right? Wrong.

Problem - FWP only publishes styles it thinks are being used - which I find
hypocritical as it publishes all kinds of it’s own styles regardless of
whether they are used, but that’s another topic. So in my example so far,
FWP would publish the “boxx” style, but not the “one” or “two” style.

Solution - There is a way to trick FWP into always publishing a style… that
is to define it as a Tag Style… simply name it in the Tag Style name box
instead of the Class Style box (“Name” in FWP). For class styles named this
way, it’s important to remember the leading period (full-stop) which
defines class styles in CSS. Now FWP will always publish this style.

Hmm - through the naming convention within the “name” dialogue, that’s anyway the method I prefer cause it may happen, that the class style has to match sometimes a pre-defined naming structure such as

div id=item123" class=“script-depending-classname”

Furthermore I am a lazy bone. Fancy extra-styles I tend to fire into the before end head tag (instead of creating them proper line-by-line (or your shorter method :slight_smile: into the stylesheet. Main reason for this is, that I anyway put them together in an external style-sheet and adjust them via code-editor. But there we are:

As long as Freeway can’t illustrate those styles in the preview it doesn’t matter to me - and therefor I don’t care about my methods. But I agree - it’s NOT Freeway-like.

Potential problem - Freeway will not allow identical names for styles… If
you’ve defined a Class (Name) style, FWP will consider any attempt to
create a Class (Tag) style as a duplicate and disallow it. The easiest
solution is to edit the Class (Name) style by typing it’s name (with the
leading period) into the Tag field THEN deleting it from the Name field

Problem - Class styles defined through the Tag field cannot be applied in
the traditional manner.

Solutions - One way would be to simply always apply the class to objects
through the Extended interface. Cumbersome, yes… and currently a pain for
editing as there is no visual cue to which items have been extended.
Another way would be to leave the style as a regular, applicable Class
(Name) style… as long as it is traditionally applied to one item on the
page (either the regular page or the Master) FWP will publish it. As long
as each of the three styles from the example are traditionally applied to
at least one item (not the same item) then it will be possible to add the
additional classes via the Extended Item interface.

Potential problem - (did you think we were out of the woods by now?) it’s
possible to create a Specificity issue from the order FWP will write the
class styles. If one item is class=“boxx one two” and another is “one two
boxx” conflicting style rules in the first will resolve to the .two style
and to .boxx in the latter. This can be addressed through careful, complex
planning - or by going back to the Tag style method and Extending items
with the correct style order. And that’s as far as I go.

Summary - This looks like a lot of hoops to jump through, but once you get
the hang of it, it’s as tolerable as any other of the FWP workarounds I put
up with.

Ernie Simpson

On Fri, Feb 1, 2013 at 1:27 PM, The Big Erns

You started already the “small suggestion for future …” list which is great. The gist is, that the Pro version requires more Pro features - but as well more Pro users.

For this reason, I’m doing screencasts. The latest 5 episodes are starting with a view “behind the scenes” and one of the goals is to get more people “to the final table”. They are neither well moderated nor even entertaining. The abilities to express myself are strangely limited but I can share my point of view - by this means to prevent ourselves from questions like:

“Can this be done in Freeway?” or “… btw, a hmm what’s a DIV?”

Cheers

Thomas


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

And naturally I forgot as ever another small thing:

Doing WYSIWYG means ID dominated working to make sure not to screw up things. By all downsides of this method, it has even a benefit:

Write less. Theoretically you can “style” out one box with all fancy stuff in it an re-use it via copy and paste. Other methods had to introduce SASS and LESS or even YAML and HAML (gosh) for this.

Cheers

Thomas


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