TW5 table CSS

396 views
Skip to first unread message

David Gifford

unread,
Sep 13, 2014, 7:30:13 PM9/13/14
to tiddl...@googlegroups.com
Hi all

This used to work in older versions of TW5, but hasn't now for a few months. Was there some change in the TW5 stylesheet that rendered this inoperable?

html body.tc-body .bluealtrows tr:nth-child(even) {background-color:#CDF;}
html body.tc-body .bluealtrows tr:nth-child(odd) {background-color:#dae9fe;}

Andreas Hahn

unread,
Sep 13, 2014, 8:08:23 PM9/13/14
to tiddl...@googlegroups.com
Hi David,

I just tried it in 5.0.17-beta and it works fine. Within older versions you would have to change "body.tc-body" to "body.tw-body" since the class prefix was changed in 5.0.16 I believe.

I tested it with the altered prefix on 5.0.13-beta and it seemed to work.

/Andreas
--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

David Gifford

unread,
Sep 24, 2014, 7:27:02 AM9/24/14
to tiddl...@googlegroups.com
Here is an example:

http://recursos.giffmex.org/empty.html#Palabras%20buenas%20y%20malas%20contrastadas%20en%20Proverbios

Has the table class bluealtrows, which is in my stylesheet tiddler (http://recursos.giffmex.org/empty.html#%24%3A%2F_aa%2Faa%2FStyleSheet), tagged correctly. But it does not appear with blue backgrounds that alternate by row.

This used to work up to at least 5.0.12. Now it does not.

Dave

Jeremy Ruston

unread,
Sep 24, 2014, 7:34:36 AM9/24/14
to TiddlyWiki
The problem is that you are targeting the `<tr>` element for the background colours. That works OK, but the `<td>` elements within the rows have their own background colours that lay over the top of the row colours. The fix is to include the `<td>` element:

html body.tc-body .bluealtrows tr:nth-child(even) td {background-color:#CDF;}
html body.tc-body .bluealtrows tr:nth-child(odd) td {background-color:#dae9fe;}

Best wishes

Jeremy.



--
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 post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

Andreas Hahn

unread,
Sep 24, 2014, 7:37:17 AM9/24/14
to tiddl...@googlegroups.com
Hi David,

the reason for that is that you have the following css in yout stylesheet tiddler as well:

/*TABLES BASIC*/

table th, table td {padding: 0 0 0 0;border: 1px solid black;}
table th {padding: 10px; vertical-align:top; background-color:#ddd;font-weight:normal;text-align:left;}
table td {padding: 10px; vertical-align:top; background-color:#fff;}

Therefore all your table cells have a white background and one cannot see the row background. The fix to this is to add a transparent background to your table cells in .bluealtrows :

html body.tc-body .bluealtrows td {padding: 15px; vertical-align:top;border: 2px solid white;background: transparent;}

/Andreas

Andreas Hahn

unread,
Sep 24, 2014, 7:42:57 AM9/24/14
to tiddl...@googlegroups.com
And as always, you're just a minute faster than me.

/Andreas

Jeremy Ruston

unread,
Sep 24, 2014, 7:44:26 AM9/24/14
to TiddlyWiki
On Wed, Sep 24, 2014 at 12:40 PM, Andreas Hahn <www.g...@googlemail.com> wrote:
And as always, you're just a minute faster than me.

Heh! I am very much appreciating your recent work on responding to questions here on the group, by the way, it's always nice to feel that the workload is spread.

Best wishes

Jeremy.
 


/Andreas


--
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+unsubscribe@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

David Gifford

unread,
Sep 24, 2014, 8:15:26 AM9/24/14
to tiddl...@googlegroups.com
Wow, thanks guys!

--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/1XCirmHuEs8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.

To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.



--
David Gifford
Christian Reformed World Missions, Mexico City

Stephan Hradek

unread,
Sep 24, 2014, 9:21:14 AM9/24/14
to tiddl...@googlegroups.com, jeremy...@gmail.com


Am Mittwoch, 24. September 2014 13:34:36 UTC+2 schrieb Jeremy Ruston:
The problem is that you are targeting the `<tr>` element for the background colours. That works OK, but the `<td>` elements within the rows have their own background colours that lay over the top of the row colours. The fix is to include the `<td>` element:

html body.tc-body .bluealtrows tr:nth-child(even) td {background-color:#CDF;}
html body.tc-body .bluealtrows tr:nth-child(odd) td {background-color:#dae9fe;}

One can also try:

html body.tc-body .bluealtrows tr:nth-child(even) {background-color:#CDF;}
html body.tc-body .bluealtrows tr:nth-child(odd) {background-color:#dae9fe;}
html body.tc-body .bluealtrows td { background-color: transparent; }

 
Reply all
Reply to author
Forward
0 new messages