[Pro] Forcing Freeway to embed CSS inline per HTML tag

Dear Freeway team,

I’m looking for a solution for a small problem we ran into:

is there a way to tell Freeway to embed all CSS on a per-HTML tag way? In context of: no style-tag, but all styles automatically applied to the corresponding style-attributes of the elements.

Thanks in advance!
Regards


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

Your question seems interesting to me, but I’m not sure if you are asking
how to do inline styles, or element styles.

Element styles, sometimes called Tag styles, are styles that apply
themselves automatically to specific html element tags that FWP generates.

Inline styles are something FWP used to do natively. Getting there now is
possible, but not very easy.

Maybe if you can give a clearer example I can help you work this out.


Ernie Simpson

On Thu, Aug 28, 2014 at 9:22 AM, Peter Kotz email@hidden wrote:

Dear Freeway team,

I’m looking for a solution for a small problem we ran into:

is there a way to tell Freeway to embed all CSS on a per-HTML tag way? In
context of: no style-tag, but all styles automatically applied to the
corresponding style-attributes of the elements.

Thanks in advance!
Regards


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

Hey Ernie,

thanks for your reply!
Sorry for the inaccurate description of the problem, let me try again:

Instead of letting FWP generate a summarized CSS-sytle section (either in the header, nor in an external file), I would need it to define each CSS property on each single HTML element.

So instead of the auto generated:

.foobar {foo:bar;}
foo

I’m looking for an automatic

foo

without having to define the style attribute myself.

Hope that was clearer!
Best regards and thanks


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

Hmmm … what version are you using?


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

I would need it to define each CSS property on each single HTML element.

Are you trying to compose an html email?

David


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

Hey, Peter -

That does clear it up nicely, thank you for that.

I’m afraid there is no “automatic” way to do inline styles like that
anymore. There is a “create email” action which moves almost all styles
inline - though you may still find it necessary to clean up the code
manually, depending on exactly what you are looking for.

I can’t yet speak to the latest Freeway version (7), but in versions 6 and
lower, Freeway Pro let’s you manually add styles to a div using the
Extended Item framework. If you (or anyone else listening) tries this way,
let me give a heads up about how FWP interprets and handles extended
styling this way.

When you open the Extended style window for a div item, you will see two
panes DIV and DIV STYLE. Each pane let’s you create new properties, either
for the div as a whole, or as CSS styles for that div.

DIV STYLE is where you normally put new style declarations - in terms of
property (foo) and value (bar). FWP adds these to the CSS for that div,
over-riding anything defined in the Inspector. For example, if you want a
very specific width like

width: 68.7775639%

the Inspector won’t have any of that. Using the Extended style window to
set that property will over-ride the Inspector when FWP generates the page
code. HOWEVER… it is very important to note that FWP does not leave this
extended custom code inline, but instead moves it to the external
stylesheet. I think this is appropriate, but it if you want truly inline
styling you will have to take a slightly different route.

Using the extended DIV tab instead of DIV STYLE, you can add valid
properties to the div element itself - one of which is the STYLE
attribute!!

In the name field add the attribute name (style) to generate the style=" "
part of the equation. Use the value field to paste or type your desired CSS
declarations… properly formatted of course. So, you would type for example
“foo: bar;” making sure your use of syntax followed the rules. This will
now force Freeway to write the div like this:

<div id="item1" style="foo: bar;">

This can suck if you have a long list of declarations to add, but it works.
What it won’t do, however, is keep Freeway from writing it’s own CSS for
that item to the external stylesheet - so those styles remain in the
cascade. Fortunately, inline styles trump all previous styles (except
!important) but any styles in the stylesheet that are not countered in the
inline styles will still apply and may require extra work to achieve the
desired effects.

CSS definitions are valid pretty much wherever you find them, their
placement is only important with respect to their prominence in the Cascade
Order. As Freewayers, we’ve gone from all inline to all external when it
comes to CSS… as strange as it sounds, sometimes I wish we had more choice
over CSS position and therefore control of the Cascade.

Hopes this helps someone!


Ernie Simpson

On Thu, Aug 28, 2014 at 12:35 PM, Peter Kotz email@hidden wrote:

Hey Ernie,

thanks for your reply!
Sorry for the inaccurate description of the problem, let me try again:

Instead of letting FWP generate a summarized CSS-sytle section (either in
the header, nor in an external file), I would need it to define each CSS
property on each single HTML element.

So instead of the auto generated:

.foobar {foo:bar;}
foo

I’m looking for an automatic

foo

without having to define the style attribute myself.

Hope that was clearer!
Best regards and thanks


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