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