Not always happy with span

Hi guys,

before making bubbles, help me to understand it correct:

span is preferably used, making parts of a Tag style slightly different - so a “green” word or expression within a paragraph.

<p> This is a text about <span class="green"> clean energy</span> and its ups and downs </p>

creating name style and applying it to the paragraph part done. So far so good.

But let’s say, I’d like to have individual snippets like “center”, “padding” or whatever, Freeway allows me only one class, all additional is turned into span.

which creates:

<p class="text-center f-lp"><span class="text-shade">A small text using style-snippets.</span></p>

rather than simply:

A small text using style-snippets.

I’m about re-usable style snippets that I want to attach to Tag-styles when needed, rather create things like because each snippet can be usable for other Tags as well.

So am I wrong if I say, that the use of this method in Freeway is kinda discussable or am I simply missing something fundamental?

Thanks for any pointers.

Cheers

Thomas


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

Hi Thomas,

A character style will always be applied to a span, regardless of whether that span contains the whole paragraph or not. I’ll get something logged so we can look into it – it would be better to detect if we need the span before outputting it. There may be some ugly edge cases that mean it can’t be done of course (not that I can think of any right now).

Cheers,
Joe

On 12 Jan 2015, at 14:31, Thomas Kimmich email@hidden wrote:

Hi guys,

before making bubbles, help me to understand it correct:

span is preferably used, making parts of a Tag style slightly different - so a “green” word or expression within a paragraph.

This is a text about clean energy and its ups and downs

creating name style and applying it to the paragraph part done. So far so good.

But let’s say, I’d like to have individual snippets like “center”, “padding” or whatever, Freeway allows me only one class, all additional is turned into span.

Text-20150112-151739.jpg

which creates:

A small text using style-snippets.

rather than simply:

A small text using style-snippets.

I’m about re-usable style snippets that I want to attach to Tag-styles when needed, rather create things like because each snippet can be usable for other Tags as well.

So am I wrong if I say, that the use of this method in Freeway is kinda discussable or am I simply missing something fundamental?

Thanks for any pointers.

Cheers

Thomas


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

Thomas, if I understand, you want a Freeway Character Style to be treated
as a normal CSS Class Style (which it technically is).

You are probably familiar with all the obstacles to this, though let me be
pedantic for the sake of others.

  1. You can use an action like AddSelector to add the Character Style to the
    already Paragraph styled text. The problem with this is that Freeway will
    NOT publish any user style that it thinks of as “unused” – iow, not
    applied in the standard way. The workaround for that is to define the style
    as a Tag style, which forces Freeway to publish it – with the downside
    that it now no longer can be applied in the traditional way. The workaround
    for that – which I have pioneered – is to make 2 versions of the style…
    one as traditional and one as Tag (the Tag is named in this way to avoid
    duplicate names - stylename /* manual */ ). This obviously defeats the goal
    of less duplication.

  2. You can use CSS Inheritance to achieve the goal. Apply the Character
    style to a container with the paragraph styled text inside and you will get
    the same mixture of styles as the multiple classes applied to the text. The
    only caveats are properties must be inheritable and not cancelled by CSS
    specificity. Specifically, if the text tags have a color property, that
    will over-ride any color propert applied to the container.

  3. Still the easiest is to just define an additional Paragraph style to
    accommodate the variation (e.g., .align-center, .red, and
    .aligncenter-red).

I share your desire for needless repetition… and the natural simplicity of
CSS.


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

On 12 Jan 2015, 4:28 pm, The Big Erns wrote:

Thomas, if I understand,

Yep, you did :slight_smile:

I share your desire for needless repetition… and the natural simplicity of
CSS.

I’m aware of some workarounds but all have the downside, that they are (usually) not reflected in Freeway’s workspace. I think it should be manageable without any big tweaks to classify paragraph and links (btw), seeing the result when using a WYSIWYG editor and having a bit more control above the output.

Just staring at bootstrap - but you know this already :slight_smile:

Cheers

Thomas


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

OK guys,

let me probably clarify what happens:

This is the page-example (please keep it secret, not ready to roll yet :-)))

http://backstage.kimmich-digitalmedia.com/templates/GridMeister/index.html

The text in view is the first under the hero-image.

####The h2 heading:

It has the basic h2-Tag style applied. On plus, via inspector, the two character styles .text-center and .text-lighten.

Applying the “.text-center” has been turned the “h2” into a new style!!! named h2.center (see the fired out text/dash which is the h2.style1 thing I suppose):

The output is:

<h2 class="center f-fp"><span class="text-lighten">GridMeister is a framework for FreewayPro 7+. </span></h2>

so a classified h2 with a span. My question here:

Why a “new” style?

####The paragraph:

As already shown:

The first character style has this text-mark (whatever it’s called) applied, indicating this as a “class” style? and it indeed is in the output classifying the p-Tag. The second is without leading symbol and wraps this into a span. Further styles will span the span.

The output is:

<p class="text-center f-lp"><span class="text-shade"><br>The magic of simple grids let you create a modern website in light speed. <br>This work has been inspired by Bootstrap and some other great new Apps. <br>It's to extend the unique features in Softpress' FreewayPro7 app which has a pretty nice responsive feature. <br>Suck the power out of it with GridMeister.</span></p>

I am, as already mentioned, not sure what and why - furthermore I’m convinced that I’m doing something fundamentally wrong. So now you got me.

Since Framework-construction is nothing to mind about anymore, text is my new friend :slight_smile:

Cheers

Thomas


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

Hi Thomas,
The first style is a paragraph style and will style the block level item (in this case the paragraph itself). The second style is a character level style and will be applied to your text using spans. In theory Freeway should be intelligent enough to know that the paragraph only contains a single span and push this style up to the parent and apply the class to the paragraph itself.

Your example HTML would then become;

<p class="text-center text-shade f-lp"><br>The magic of simple grids let you create a modern website in light speed. <br>This work has been inspired by Bootstrap and some other great new Apps. <br>It's to extend the unique features in Softpress' FreewayPro7 app which has a pretty nice responsive feature. <br>Suck the power out of it with GridMeister.</p>

Currently Freeway doesn’t do this level of style optimisation although, as Joe mentioned, it certainly could. I’d imagine that an Action could do this work for you quite easily as well.
Regards,
Tim.

On 13 Jan 2015, at 10:37, Thomas Kimmich wrote:

The first character style has this text-mark (whatever it’s called) applied, indicating this as a “class” style? and it indeed is in the output classifying the p-Tag. The second is without leading symbol and wraps this into a span. Further styles will span the span.

The output is:


The magic of simple grids let you create a modern website in light speed.
This work has been inspired by Bootstrap and some other great new Apps.
It's to extend the unique features in Softpress' FreewayPro7 app which has a pretty nice responsive feature.
Suck the power out of it with GridMeister.

I am, as already mentioned, not sure what and why - furthermore I’m convinced that I’m doing something fundamentally wrong. So now you got me.


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


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

Hi Tim,

this would be a lovely and outermost helpful action - just for pleasing the output junkies without disturbing the current workflow. Excellent idea - would you mind to give it a go?

Cheers

Thomas


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

Hi Thomas,
I’ll take a look but I don’t have too much free time at the moment.
Regards,
Tim.

On 13 Jan 2015, at 14:24, Thomas Kimmich wrote:

this would be a lovely and outermost helpful action - just for pleasing the output junkies without disturbing the current workflow. Excellent idea - would you mind to give it a go?


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


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

Hi Thomas,
I’ve created a simple Action that looks for class styles on spans and ‘bubbles them up’ and applies them to the parent object if it can. Although it works with simple examples where there is only one span in a parent paragraph (for example) there are also things that it currently doesn’t look for.

For example;

abc123def

Here style1 could be applied to the parent p tag leaving style2 just applied to '123'. The bit that makes my brain hurt is how to tell which the at the end of the code relates to.

Here’s the Action as it currently stands;
http://www.freewayactions.com/code/?f=Move-span-style-to-parent.fwaction

Apply it to either a parent HTML box or page.

I also wanted to share this with you;
http://www.freewayactions.com/test/thomas-styles/

If you apply the text style to the parent item rather than the text itself leaving just the paragraph style applied to the text then Freeway won’t create a span tag for the text style. Assuming you have a parent item to apply the text style to (you can for HTML items but can’t for headers or list items) then you can do away with the spans altogether.
Regards,
Tim.

On 13 Jan 2015, at 14:24, Thomas Kimmich wrote:

this would be a lovely and outermost helpful action - just for pleasing the output junkies without disturbing the current workflow. Excellent idea - would you mind to give it a go?


FreewayActions.com - Freeware and commercial Actions for Freeway Express & Pro - http://www.freewayactions.com


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

Hi Tim,

apologize for not answering quicker.

####1. A big thanks

Incredible. More than once you wrapped my thoughts into a lil machinery - outermost useful and working in my case. I’ll have a detailed look into your brain hurters.

http://backstage.kimmich-digitalmedia.com/templates/GridMeister/index.html

####2. Styles applied to parent

Indeed - in my case it’d be even the best way to do (if I think as author). But here I’m probably more on the template-trip where I think to do better to apply things where they belong to. But I am wrong, perhaps.

####@Joe

Sorry for not reacting more directly to you. You guys do the best you can for us all and I never expect tweaking on some core functions just for the sake of it (and my unusual wishes in detail). There are for sure reasons you did it as it currently is.

But one thing is still a bit confusing - and this is the appliance of the first character style to a H-Tag which creates a new H-Tag style - and there is nearby nothing (except the parent-object) you can do. Call me pedant - but each line of code to spare is a won line.

The thoughts:

To make text more semantic, I think we do good to think more about the (more or less) new attributes such as block quote, cite, abbr, q, i … rather than the heavy and exclusive use of span. And I do have to take some heavy lessons here for sure.

Cheers

Thomas


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