Applying table class deletes td class

This forum is for all Flare issues not related to any of the other categories.
Post Reply
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Applying table class deletes td class

Post by bobmoon »

I am positive this used to work, but seems to be broken now in v5 and v6. I have some note tables that have a style class applied to each column (in the source it looks like <td class="noteicon"> and <td class="notebody">.

In some cases, I want to apply an "extraspace" class to the entire table that increases the padding. So in Flare I right-click the table block and choose Table Class and pick my "table.extraspace" class. It applies the class to the table tag, but it also removes the class from the td tags.

It didn't used to do this, unless I'm crazy. I have a writer who applied these classes to dozens of tables in her project, and they have the correct class assigned to both the table and td tags. Perhaps this is something that broke in v5? Maybe she did the work in v4.

Thanks for any help. I think it must be a bug.

Bob
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Applying table class deletes td class

Post by LTinker68 »

Are you sure you (or she) did it in that order before? Perhaps she applied the table class first then the td styles afterward. Although I do think the order you did it in shouldn't be a factor. But if you apply the table class and it wipes out the td classes, but you then reapply the td classes, does it in turn blow out the table class?

BTW, what are you trying to apply the padding to? If you're trying to apply more padding to the cells themselves, then applying a table class won't have any effect (unless the td classes don't have any padding attributes defined) because the td classes are closest to the text so their style declarations win.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Re: Applying table class deletes td class

Post by bobmoon »

She definitely did it in that order, because we don't create these note tables from scratch. The writers copy and paste the formatted table (with the td classes assigned) from a set of "canned" examples and then type in the note text. So she would have applied the table class after the fact.

(As a side note, I've started using Flare snippets for this kind of "canned" text, kinda like a Word AutoText entry. I found I could insert a formatted snippet and convert it to text much quicker than opening the topic with canned text and copying and pasting. )

After I assign the table class and it wipes out the td classes, I can re-assign the td classes and they stick.

The table class is intended to increase white space around the table, and it actually applies margin, not padding (I often confuse those). We use the class if the table is inserted between items in a numbered list, since the list items are tighter than paragraphs.

Bob
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: Applying table class deletes td class

Post by LTinker68 »

bobmoon wrote:After I assign the table class and it wipes out the td classes, I can re-assign the td classes and they stick.
Make sure you submit a bug report about that at http://www.madcapsoftware.com/bugs/submit.aspx.
bobmoon wrote:The table class is intended to increase white space around the table, and it actually applies margin, not padding (I often confuse those). We use the class if the table is inserted between items in a numbered list, since the list items are tighter than paragraphs.
As an alternative, you could create a complex selector that modifies the margin values on the table tag if the table is inside a list item. You'd have to create the complex selector manually in the stylesheet file, but it would look something like:

Code: Select all

li table {
   margin-top: 12px;
   margin-bottom: 12px;
}
So you wouldn't need to apply the table class to the table when it's inside a list item -- the complex selector would handle the margins automatically. (Assuming, of course, that the table is actually inside the line item and that you didn't stop a list, insert a table, then restart a list after the table. In that case, you would need to apply a different class to the table.)
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
NorthEast
Master Propellus Maximus
Posts: 6365
Joined: Mon Mar 05, 2007 8:33 am

Re: Applying table class deletes td class

Post by NorthEast »

bobmoon wrote:I am positive this used to work, but seems to be broken now in v5 and v6.
I also use table classes and I can reproduce this in v5 and v6.
I don't think you're going mad, I was probably using v3/v4 when I last did reformatting work on our tables, and I'm sure this didn't happen then.

Applying a class to the table tag (or resetting it) should not affect the classes of any tags inside the table; it's a bug.
bobmoon
Sr. Propeller Head
Posts: 259
Joined: Thu Mar 27, 2008 10:22 am
Location: Atlanta

Re: Applying table class deletes td class

Post by bobmoon »

Dave Lee wrote:I don't think you're going mad, I was probably using v3/v4 when I last did reformatting work on our tables, and I'm sure this didn't happen then.
Thanks for backing me up Dave. I think I must have added these table classes right before we upgraded to v5, so they probably worked when I created them.
Dave Lee wrote:Applying a class to the table tag (or resetting it) should not affect the classes of any tags inside the table; it's a bug.
I submitted it.

Bob
Post Reply