Remove image ID tag

I’m looking for some useful ideas for removing the id tag from pass-thru images. Any thoughts?


offtopic mailing list
email@hidden
Update your subscriptions at:

The ID2Class action (which I often recommended and has been permanently ignored by you - my dear stubborn hard rocking’ amigo :slight_smile:

But I think it only works when the image is kept in a wrapping DIV such as so:

<div id="foo">
<img class="f-ms">
<div>

Otherwise it could end in a no properties error message.

Cheers

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:

I know that I tell anyone who will listen-- a diminishing number it seems-- that I use very few actions. Which is true… but I do try a very many of them all. The ones that I do use, I use sometimes very heavily.

That said, I was rooting around in my bag of actions and found this one by Max Fancourt:

CSS: ID to Class
Max Fancourt 2013

This seems to work for me nicely, although the action itself may not be sanctioned for use in the wild.

The problem I’ve had before with the notion of converting ID styles to Class styles is that Classes are groups of items which share the same style-- converting a unique ID style to a unique Class style is just not the same thing.

Removing the id tag from any object is just another way of trimming Freeway’s heavy-handed one-size-fits all even-if-it-doesn’t approach assigning styles to page items. I hate that Freeway still writes the stripped, unused id code into the CSS, but I can create much more flexible style schemes with mix-and-match class styles.


offtopic mailing list
email@hidden
Update your subscriptions at:

That said, I was rooting around in my bag of actions and found this one by Max Fancourt:

I am pretty sure that is the one that Thomas was talking about.

D


offtopic mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

Hi guys,

yep - indeed that’s the one.

And agreed! Printing the unnecessary styles is THE big downside of it at all.

Regarding the ID to class, I wouldn’t judge too hard. I started using it back in version 5+ (spaghetti inline code) and it felt so good simply getting the properties out from there.

And to this time, I was even pretty happy to “rescue” them somewhere (in the head), having the opportunity to either use them external (copy+paste) and/or delete them at all.

Today I don’t check it anymore. Out is out.

What I like as well is the additional class line. This is the timesaver cause I don’t have to go the extended way.

Naturally, we don’t have a perfect world but “the end justifies the meaning” - at least in my little unperfected world.

But I leave no doubt:

In the SuperDIV-action (the one I dream of) ID2class would be one part. And I go one step ahead saying:

I could even think of having this within the inspector.

But you use anonymous, and it will work as well. Cause ID2class IS anonymous - just a lil bit extended. So I wondered why you ask?

Cheers

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:

But you use anonymous, and it will work as well. Cause ID2class IS anonymous - just a lil bit extended. So I wondered why you ask?

Actually, Anonymous doesn’t work on images. I’ve used it forever, I really like it. This one does exactly what I need it to.


offtopic mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options

That’s interesting - but gave it a go (yesterday night and this morning) and am under the impression that it works as expected.

Cheers

Thomas


offtopic mailing list
email@hidden
Update your subscriptions at:

Thomas-- Here’s an update, though I suspect that you and I are the only ones reading this thread. A shame, as I found something really cool…

You have kept saying that the Anonymous action should remove the id attribute from the img element… which is what I also believed to be true. It was only in my latest project that it wasn’t working that way, so I began to doubt if I had remembered it right. So because of your insistence, I went back for a second look at my project and this is what I found.

Both Anonymous and ID-Class failed to remove the id attribute from my project images-- a grid of images which were also links (insert light-bulb moment here) When I removed the link from the image tile, the actions worked fine. Add a link back to the image tile and neither action works.

Bingo!

So, when the img element is wrapped in anchor tags, these actions cannot remove the id attribute of the image. Good to know. But I still want id-less image links.

As a link, I think the img element is actually a child of the <a> link tag-- and I reasoned this might confuse the action logic. So I asked myself,

“Is there a way to wrap the image in link tags after removing the id attribute?”

In trying to visualize an solution, I realized that what I wanted was similar to Walter’s HTML5 Block Link action-- something which wraps a div element with a link.

What!? No way, that would never work on an image…

Never unwilling to try the craziest thing I can think of, I applied the HTML5 Block Link action to a plain pass-thru image in Freeway after first anonymizing it. AND IT WORKED. The id attribute was gone, and the image was properly wrapped in anchor tags. Ta da!

This is doubly helpful because when I normally try to make a floated, inline image into a link-- Freeway creates it as an image map link. Yeech! This method also makes proper a-wrapped image tags out of that mess as well.

I know… cool!


offtopic mailing list
email@hidden
Update your subscriptions at:
https://freewaytalk.softpress.com/person/options