[Pro] Clearfix Action

Hi the devs,

we know, that floating inline divs need a clearfix in order to work properly. We usually would do this with the overflow:hidden (parent-div) to achieve.

But there is one slightly problem with it:

Asumed the floating div has a menu with submenus, the submenu will be cut-off by the overflow:hidden. To fix I created the following style:

and gave the parent-div the “class”=“clearfix”

Would it make sense to actionize this? I’m asking you cause I am lost in things like this?

Cheers

Thomas


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

This could make a great Action, I’ll see if I have a moment to do this, or maybe Tim wins the race, since he gets to start earlier in the day than me…

Walter

On Jul 25, 2012, at 5:50 AM, Thomas Kimmich wrote:

Hi the devs,

we know, that floating inline divs need a clearfix in order to work properly. We usually would do this with the overflow:hidden (parent-div) to achieve.

But there is one slightly problem with it:

Asumed the floating div has a menu with submenus, the submenu will be cut-off by the overflow:hidden. To fix I created the following style:

gist:3175347 · GitHub

and gave the parent-div the “class”=“clearfix”

Would it make sense to actionize this? I’m asking you cause I am lost in things like this?

Cheers

Thomas


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


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

I’ve not had much time to look at this but here is a quick draft of this as an Action;
http://www.freewayactions.com/code/?f=Clearfix.fwaction

Let me know if it can be improved and when we’re done I’ll add it to ActionsForge.

Thomas, I had to remove the period from the :after content as it was causing the parent item to display larger than the child items.
Regards,
Tim.

On 25 Jul 2012, at 12:50, Walter Lee Davis wrote:

This could make a great Action, I’ll see if I have a moment to do this, or maybe Tim wins the race, since he gets to start earlier in the day than me…


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


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

Hi guys,

Here’s an alternative clearfix:

.cf:after {
    content:"";
    display:table;
    clear:both;
}

Or, if you want to support older browsers:

/* For modern browsers */
.cf:before,
cf:after {
    content:"";
    display:table;
}

.cf:after {
    clear:both;
}

/* For IE 6/7 (trigger hasLayout) */
.cf {
    *zoom:1;
}

Source:
http://www.css-101.org/articles/clearfix/latest-new-clearfix-so-far.php

On 25 Jul 2012, at 14:28, Tim Plumb wrote:

I’ve not had much time to look at this but here is a quick draft of this as an Action;
http://www.freewayactions.com/code/?f=Clearfix.fwaction

Let me know if it can be improved and when we’re done I’ll add it to ActionsForge.

Thomas, I had to remove the period from the :after content as it was causing the parent item to display larger than the child items.
Regards,
Tim.

On 25 Jul 2012, at 12:50, Walter Lee Davis wrote:

This could make a great Action, I’ll see if I have a moment to do this, or maybe Tim wins the race, since he gets to start earlier in the day than me…


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


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


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

Well, this was just what we were talking about earlier:

var thisDiv = fwDocument.fwTags.fwFind(“div”,fwItem);

ought to include all of the div-like HTML5 elements as well as div.

Walter

On Jul 25, 2012, at 9:28 AM, Tim Plumb wrote:

I’ve not had much time to look at this but here is a quick draft of this as an Action;
http://www.freewayactions.com/code/?f=Clearfix.fwaction

Let me know if it can be improved and when we’re done I’ll add it to ActionsForge.

Thomas, I had to remove the period from the :after content as it was causing the parent item to display larger than the child items.
Regards,
Tim.

On 25 Jul 2012, at 12:50, Walter Lee Davis wrote:

This could make a great Action, I’ll see if I have a moment to do this, or maybe Tim wins the race, since he gets to start earlier in the day than me…


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


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


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

Thanks Walter. I guess the question is what process you want to run first. Rather than updating all of the existing Actions that target divs to work with these HTML5 items the HTML5 Elements Action could simply rename the target items at the end of the publishing process. Unfortunately it would compete with a lot of other Actions that also like to run at the end of the publishing process. Already this is becoming a crowded area for Actions.

For the moment I’ve updated the Clearfix Action to include the HTML5 items as well as added a folder variant that will apply the class to any parent item that has floated children. Can you think of a situation where this wouldn’t be required by default. My intent is to create a ‘set and forget’ Action that corrects the disconnect between the design view and the preview for items with floated content.
http://www.freewayactions.com/code/?f=Clearfix.fwaction
Regards,
Tim.

On 25 Jul 2012, at 17:15, Walter Lee Davis wrote:

Well, this was just what we were talking about earlier:

var thisDiv = fwDocument.fwTags.fwFind(“div”,fwItem);

ought to include all of the div-like HTML5 elements as well as div.

gist:3177014 · GitHub


FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


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

Maybe, if you really want this to be fire-and-forget, you would skip the item-action altogether, and just have the page- and folder-action variants. That seems to be the easiest route. Again, take a look at the Prototype methods in CSS3 Shadow Action (and other Scripty Actions). hasClassName() and friends will help abstract out the middle of your Action.

Walter

On Jul 25, 2012, at 1:22 PM, Tim Plumb wrote:

Thanks Walter. I guess the question is what process you want to run first. Rather than updating all of the existing Actions that target divs to work with these HTML5 items the HTML5 Elements Action could simply rename the target items at the end of the publishing process. Unfortunately it would compete with a lot of other Actions that also like to run at the end of the publishing process. Already this is becoming a crowded area for Actions.

For the moment I’ve updated the Clearfix Action to include the HTML5 items as well as added a folder variant that will apply the class to any parent item that has floated children. Can you think of a situation where this wouldn’t be required by default. My intent is to create a ‘set and forget’ Action that corrects the disconnect between the design view and the preview for items with floated content.
http://www.freewayactions.com/code/?f=Clearfix.fwaction
Regards,
Tim.

On 25 Jul 2012, at 17:15, Walter Lee Davis wrote:

Well, this was just what we were talking about earlier:

var thisDiv = fwDocument.fwTags.fwFind(“div”,fwItem);

ought to include all of the div-like HTML5 elements as well as div.

gist:3177014 · GitHub


FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


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


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

Hi Walter,
That really helped trim a lot of the fat of the Action that was essentially duplicated functionality. Here’s the updated Action;
http://www.freewayactions.com/code/?f=Clearfix.fwaction

Changes;

  • Uses common functions to do more of the grunt work
  • Now includes a page Action
  • Places the page variables under the action namespace (something I hope the FW API will add sometime soon) to try and prevent variable clashes

I’m done with this Action. If anyone wants to have a go then feel free otherwise i’ll upload it to ActionsForge.
Regards,
Tim.

On 25 Jul 2012, at 18:28, Walter Lee Davis wrote:

Maybe, if you really want this to be fire-and-forget, you would skip the item-action altogether, and just have the page- and folder-action variants. That seems to be the easiest route. Again, take a look at the Prototype methods in CSS3 Shadow Action (and other Scripty Actions). hasClassName() and friends will help abstract out the middle of your Action.


FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


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

Looks really good, Tim. Nicely done!

Walter

On Jul 25, 2012, at 3:19 PM, Tim Plumb wrote:

Hi Walter,
That really helped trim a lot of the fat of the Action that was essentially duplicated functionality. Here’s the updated Action;
http://www.freewayactions.com/code/?f=Clearfix.fwaction

Changes;

  • Uses common functions to do more of the grunt work
  • Now includes a page Action
  • Places the page variables under the action namespace (something I hope the FW API will add sometime soon) to try and prevent variable clashes

I’m done with this Action. If anyone wants to have a go then feel free otherwise i’ll upload it to ActionsForge.
Regards,
Tim.

On 25 Jul 2012, at 18:28, Walter Lee Davis wrote:

Maybe, if you really want this to be fire-and-forget, you would skip the item-action altogether, and just have the page- and folder-action variants. That seems to be the easiest route. Again, take a look at the Prototype methods in CSS3 Shadow Action (and other Scripty Actions). hasClassName() and friends will help abstract out the middle of your Action.


FreewayStyle.com - Free Freeway templates and parts to download, use and explore - http://www.freewaystyle.com


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


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

Quick Info for Tim:

This wooorks :slight_smile:

So cool - guys, thanks for solving this so quick.

Cheers

Thomas


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

Hi guys,

am not sure why (but pretty convinced) that the action is spitting out an invalid property based on this:

Is it meant to create a global (asterisk) class-style, maybe - instead of this singular class style?

Cheers

Thomas


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

It’s correct. The star is used to target IE6 and IE7 only. If you went with “zoom: 1” then all browsers would use it – and since it’s both non-standard and unnecessary, that would be a bad thing.

Joe


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

The *zoom gets flagged 277 times by Safari as invalid CSS when I use the Bootstrap framework. I wish there was a better way to trigger hasLayout in IE. I usually use overflow:hidden, but that has its own issues, and keeps you from doing anything clever with absolute positioning.

Walter

On Apr 17, 2014, at 8:15 AM, Joe Billings wrote:

It’s correct. The star is used to target IE6 and IE7 only. If you went with “zoom: 1” then all browsers would use it – and since it’s both non-standard and unnecessary, that would be a bad thing.

Joe


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


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

A lot of people seem to use an underscore in place of a star. Does that also get flagged by Safari?

Joe

On 17 Apr 2014, at 13:29, Walter Lee Davis email@hidden wrote:

The *zoom gets flagged 277 times by Safari as invalid CSS when I use the Bootstrap framework. I wish there was a better way to trigger hasLayout in IE. I usually use overflow:hidden, but that has its own issues, and keeps you from doing anything clever with absolute positioning.

Walter

On Apr 17, 2014, at 8:15 AM, Joe Billings wrote:

It’s correct. The star is used to target IE6 and IE7 only. If you went with “zoom: 1” then all browsers would use it – and since it’s both non-standard and unnecessary, that would be a bad thing.

Joe


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


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


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

I don’t know. I figure the boys and girls at Twitter have used whatever gets the layout to work, and are taking the error report as a geek-world problem. I suppose I could try a find-and-replace and see if the layout falls to pieces.

Walter

On Apr 17, 2014, at 9:02 AM, Joe Billings wrote:

A lot of people seem to use an underscore in place of a star. Does that also get flagged by Safari?

Joe

On 17 Apr 2014, at 13:29, Walter Lee Davis email@hidden wrote:

The *zoom gets flagged 277 times by Safari as invalid CSS when I use the Bootstrap framework. I wish there was a better way to trigger hasLayout in IE. I usually use overflow:hidden, but that has its own issues, and keeps you from doing anything clever with absolute positioning.

Walter

On Apr 17, 2014, at 8:15 AM, Joe Billings wrote:

It’s correct. The star is used to target IE6 and IE7 only. If you went with “zoom: 1” then all browsers would use it – and since it’s both non-standard and unnecessary, that would be a bad thing.

Joe


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


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


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


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

underscore isn’t flagged in Safari and (as far as I can see) even the artwork didn’t explode :slight_smile: so all fine (however I can’t judge if it works a treat - but think so.

Cheers

Thomas


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

Thanks for being the nose-cone. That totally works here as well.

Walter

On Apr 17, 2014, at 10:43 AM, Thomas Kimmich wrote:

underscore isn’t flagged in Safari and (as far as I can see) even the artwork didn’t explode :slight_smile: so all fine (however I can’t judge if it works a treat - but think so.

Cheers

Thomas


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


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