[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-21 Thread Álvaro
If you know the line-height in pre element you can use it to create your custom background with repeating-linear-gradient. In the vanilla theme the (inherit) line-height is 20px, then you can use something like this ``` pre { background: repeating-linear-gradient(#f5f5f5, #f5f5f5 20px, #e0e0e0 20

[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Eric Shulman
1. `<__txt__>` is a *parameter reference* syntax that can only be used within macro definitions. It is similar to `$txt$`, which is a reference to the value of the `txt` macro parameter passed into the macro. However, while occurances of `$txt$` are automatically replaced by the value passed

[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Justin H.
That works! I can generally grasp how this works, though I'm not familiar with <__txt__>splitregexp[\n]] the only time I've seen \n is to create a new line in python, is it doing the same here? On Sunday, February 20, 2022 at 8:15:49 PM UTC-5 Eric Shulman wrote: > If the content of your ``

[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Eric Shulman
If the content of your `` is stored in a separate tiddler or field, you can force the creation of child `` elements, so that `nth-child(even)` can be applied successfully. Give this a try: ``` \define nthchild(txt,bg:"lightgray") \whitespace trim .myClass div:nth-child(even) { background:$bg$;

[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Justin H.
Ah, well- that's a bummer haha Thank you! On Sunday, February 20, 2022 at 7:30:21 PM UTC-5 Eric Shulman wrote: > Although HTML `` elements can display multiple lines of text, each > line is not a separate child element. > Thus, a CSS rule such as `nth-child(even)` doesn't have any effect within

[tw5] Re: Method of using "nth-child(even)" with ""?

2022-02-20 Thread Eric Shulman
Although HTML `` elements can display multiple lines of text, each line is not a separate child element. Thus, a CSS rule such as `nth-child(even)` doesn't have any effect within the `` element. -e On Sunday, February 20, 2022 at 4:13:04 PM UTC-8 justin.hu...@gmail.com wrote: > Hello all, titl