When I started watching this thread, it was pretty interesting. Now there have been many questions and I am not sure what the thread is about anymore. I may still be thinking too much at the other end of it.
When you want to apply a Named style from the Style palette to some text, the difference between whether Freeway applies it as a Class style…
<p class="stylename">Lorum ipsum bibendum nulla sed.</p>
or as a Selection or Span style…
<p><span class="stylename">Lorum ipsum bibendum nulla sed.</span></p>
depends on whether the applied style has any paragraph style properties.
HINT: You can trick Freeway 7x into applying a style to text as a Class style without any paragraph values selected by choosing “Force graphic paragraph” from the Paragraph Styles toggle in the Style Editor then unchecking the box. Freeway will treat the style as a Class style, applied to whole paras and lines of type.
If you want to apply a Named style in the same click and select fashion to an item-- like a div or container-- it doesn’t matter if it has paragraph values selected because it will always be applied as a class style:
Now, it is true that you can apply a style by creating a Class declaration on an item using that item’s Extended
VALUE: stylename1 stylename2
This is particularly useful when you want to apply multiple styles to an item. You can even apply a style from the Styles palette AND add class names via the Extended
<div>dialog this way and Freeway will add them all. BUT there is a catch to using this extended method… Freeway will not generate a Named style it doesn’t see as “applied” to anything in the workspace.
In other words, it doesn’t read your Extended class styles and see them as “applied”. If they are not click applied anywhere else in your workspace, then Freeway will apply the proper class tags to your HTML output, but won’t publish the corresponding CSS code to style it.
We can force Freeway to publish a style by naming it in the Tag field of the Edit Styles window, instead of the normal Name field… the drawback is, obviously, that now we cannot simply apply the style to items the normal way. To address this, I have been creating duplicate styles (only when necessary)… one a Named style for regular application and another Tag style for manual application:
TAG: .align-center /* m */
Freeway ALWAYS publishes the Tag style, so I can count on it when I’ve manually applied a style to an item but not to anything else. The obvious drawback is this redundancy-- besides its aesthetic atrociousness-- is that it also sets up a situation where you can have two conflicting styles with the same name and invite CSS Karma to smack you right upside the head.
So, you must combine your Freeway trickery with efficient planning, working out how to do the least amount of damage. Myself, I have worked out my own comfort level… though I wish Softpress would give me more overt control without forcing me to lead their app around by nose so much.
Now, I think that is a very comprehensive discussion of how to apply styles to things in Freeway-- at least the less exotic methods. What I really wanted to contribute was a discussion of CSS Inheritance and my favorite way of centering all text in a container. I started a tutorial file, but I only have so much energy and so you’ll have to download it and figure out how I used inheritance to style my paragraph text (check out the p style) and the list text style all at once. See how I apply a text style to a container, and how all the unsettled text within inherits that property.
If you are using your browser’s Inspect Element, you can see an item’s style inheritance-- as well as all the sources for the styles used. The User Agent stylesheet is actually your browser-- yes, your browser has a basic stylesheet. This is why unstyled HTML has a style and some people start with a Reset or Normalized stylesheet in their project so they have a “clean slate” as it were. I think you don’t need to worry about that yet.
freewaytalk mailing list
Update your subscriptions at: