Dynamic Table question for Mohammad

94 views
Skip to first unread message

History Buff

unread,
Apr 15, 2021, 7:08:01 PM4/15/21
to TiddlyWiki
Hey Mohammad,

Once again, I can't say enough about your dynamic tables. I love them!

I would like to tweak the styling a bit and can't figure out how to get what I want. I'm using the tbl-expand feature to see the text area and I'd like to style that area differently than the rest of the table. I'd specifically like to change the background color to set it off from everything else. What is the secret sauce that will allow me to do this?

Thanks so much in advance!

Damon

Mohammad Rahmani

unread,
Apr 16, 2021, 12:09:51 AM4/16/21
to tiddl...@googlegroups.com


On Fri, Apr 16, 2021 at 3:38 AM History Buff <damon.p...@gmail.com> wrote:
Hey Mohammad,

Hi Damon,

Once again, I can't say enough about your dynamic tables. I love them!

I would like to tweak the styling a bit and can't figure out how to get what I want. I'm using the tbl-expand feature to see the text area and I'd like to style that area differently than the rest of the table. I'd specifically like to change the background color to set it off from everything else. What is the secret sauce that will allow me to do this?

Shiraz Dynamic table is highly modular. In this case you can edit the $:/plugins/kookma/shiraz/macros/dtables/display-extrecord
For example to have the yellow background hack as below

\define display-extended-record()
<td colspan=<<ncols>>  >

to

\define display-extended-record()
<td colspan=<<ncols>> style="background-color:lightgrey;" > 

 
Best wishes
Mohammad



Thanks so much in advance!

Damon

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/989618de-9403-434e-9df7-675bdb2673ean%40googlegroups.com.

History Buff

unread,
Apr 16, 2021, 3:18:54 AM4/16/21
to TiddlyWiki
Thanks for the suggestion. I may try that at some point, but I prefer not to modify plugin tiddlers if I can avoid it.

After I asked the question, I realized that the tbl-expand feature takes up a whole row (turns out it's every even row). In the style I use for the dynamic tables, I defined the background-color using tr:nth-child(even) and this worked great. Do you foresee any issues with this approach?

Damon

Mohammad Rahmani

unread,
Apr 16, 2021, 12:47:35 PM4/16/21
to tiddl...@googlegroups.com
On Fri, Apr 16, 2021 at 11:48 AM History Buff <damon.p...@gmail.com> wrote:
Thanks for the suggestion. I may try that at some point, but I prefer not to modify plugin tiddlers if I can avoid it.
No worry, this is kind of customization! do it as you like! 

After I asked the question, I realized that the tbl-expand feature takes up a whole row (turns out it's every even row). In the style I use for the dynamic tables, I defined the background-color using tr:nth-child(even) and this worked great. Do you foresee any issues with this approach?


I do not think this works properly as you expand more tiddlers, then this will not work!

History Buff

unread,
Apr 16, 2021, 12:51:21 PM4/16/21
to TiddlyWiki
Interesting. I have not seen that behavior. So far it hasn't mattered how many rows I expand; it seems to work fine and I have had 8 or 10 expanded at the same time. May I ask why you think this might be a problem?

Mohammad Rahmani

unread,
Apr 16, 2021, 12:52:51 PM4/16/21
to tiddl...@googlegroups.com



Best wishes
Mohammad


On Fri, Apr 16, 2021 at 9:21 PM History Buff <damon.p...@gmail.com> wrote:
Interesting. I have not seen that behavior. So far it hasn't mattered how many rows I expand; it seems to work fine and I have had 8 or 10 expanded at the same time. May I ask why you think this might be a problem?

If it works go for that! no problem!

 

History Buff

unread,
Apr 16, 2021, 2:16:43 PM4/16/21
to TiddlyWiki
Thanks. I'll continue doing what I'm doing and will let you know if I come across any issues. I really appreciate the feedback!
Reply all
Reply to author
Forward
0 new messages