Stewart, thanks for the very cogent reply.
So, f-ms is a class added to identify that item as associated with a
master item, and separate it from same-name items whose link to the master
are broken and whose attributes and values are different… is that right?
Like in
#mybox.f-ms { foo: bar; } <-- style of #mybox instances that use
attributes/values from master items
#mybox { otherfoo: otherbar; } ← style of #mybox instances that
break/differ from master items
I get that it must be a complicated process to sort out differences like
this.
While I don’t know what programmers can achieve with the code framework, I
can envision a different process for this.
Freeway Pro has long used a familiar mechanism for preserving the
uniqueness if id names. When you duplicate an item in FWP, the name is
appended… #mybox becomes #mybox1 and so on.
If that same logic were applied to master and instance item styling, then
it should produce cleaner code. For example, every instance of #mybox
that matches the master item #mybox would only need to have its style
code written once in any style location - #mybox { foo: bar; }
When an instance item is changed from the master item, breaking its link
should rename the instance item in the same way duplicating it would, e.g.,
#mybox1 – and would then have its style code written as #mybox1 { foo: bar; }
So, several pages based on the same master but each with this one item
“disconnected” from it’s master version, under this model would produce
style code that looks like this:
#mybox { foo: bar; } <-- style for the master item and all instance
items which remain identical to the master item
#mybox1 { foo: bar; } ← style for the instance item which has been
altered or unlinked from its master item
#mybox1a { foo: bar; } ← style for another instance item which has
been altered or unlinked from its master item
#mybox1a1 { foo: bar; } ← style for yet another instance item
which has been altered or unlinked from its master item
#mybox1a1a { foo: bar; } ← and so on
What Pro6 would have to accomplish to do this is to
-
make sure that all id names on a single instance or master page are all
unique within that page,
-
make sure that all id names on all master pages are unique from all
other id names on all the master pages,
-
make sure that all id names of instance items which are linked to master
items match the id names of their master items,
-
make sure that all id names of all instance items which have been
un-linked from their master items are appended and unique from one another.
This is just coming off the top of my head, so I imagine there are holes to
poke in it – what does anyone else think?
–
Ernie Simpson
On Fri, Feb 8, 2013 at 10:50 AM, Stewart Fellows email@hiddenwrote:
Hi Ernie,
f-lp is a class that is simply used to deal with a specific situation
where we want to remove margins from the last paragraph of text so that if
the div has an undefined height, it will be snug to the bottom of the text,
as it is in Freeway. The style declaration for f-lp is always the same.
f-ms is something of a different beast. By using f-ms as a class on divs
that have been generated from master items, it allows Freeway to remove
this class from instance items whose settings have changed from the master
item without having to reset any CSS properties that are irrelevant for the
instance item.
While your example is reasonable, an example of why Freeway is doing this
is:
Master page/stylesheet:
#m1.f-ms { position:absolute; left:117px; top:73px; width:406px;
min-height:181px; z-index:1; background-image:url(…/**Resources/cts_bw_v2.jpeg)
}
Instance page 1/stylesheet (item has had background-image set to none):
#m1 { position:absolute; left:117px; top:73px; width:406px;
min-height:181px; z-index:1 }
Instance page 2/stylesheet (item uses all the settings of the master item):
// No style declaration necessary
This is as opposed to having to reset the background-image property to
none. This example is not ideal as background-image is reliable to reset,
whereas other properties can be troublesome to reset reliably. It also
allows the same name/id to be used for the div on the instance page.
Removing the class allows Freeway to have free reign over the styling of
the div without having to deal with attributes it may be getting from a
simple id selector for the master style.
We do have intentions to finesse the output in this area - Freeway is
trying to manage this in as reliable and consistent a way as possible in
the output, but there will be improvements possible. An example would be
not outputting f-ms when external stylesheets are off.
Stewart
_____________**
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/**optionshttp://freewaytalk.net/person/options
actionsdev mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options