mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-05-11 14:53:44 -07:00
Document alternating table row styling (#9713)
* Document alternating table row styling Resolves issue #8738 (and explains why my old wiki row styles were swapped). * Make note more prominent Use note macro for note Co-authored-by: Mario Pietsch <pmariojo@gmail.com> --------- Co-authored-by: Mario Pietsch <pmariojo@gmail.com>
This commit is contained in:
parent
a3acbaa2f1
commit
3983086b96
1 changed files with 11 additions and 0 deletions
|
|
@ -79,3 +79,14 @@ The following is a table with maximum width. It contains [[TextWidget]]s with ma
|
|||
| Cell1|<$edit-text tiddler="$:/temp/test-table-input" tag="input" field="test"/> |
|
||||
|^ [[Link to a tiddler]]<br>some more text|<$edit-text tiddler="$:/temp/test-table-input" field="text"/> |
|
||||
""">>
|
||||
|
||||
!! Table with Alternating Row Styles
|
||||
|
||||
You will need to create your own stylesheet. See [[Using Stylesheets]]. The idea is to create rules using `:nth-of-type(even/odd)`. For example:
|
||||
|
||||
```
|
||||
.myclass tbody tr:nth-of-type(even) { background-color: <<color tiddler-editor-fields-even>>; }
|
||||
.myclass tbody tr:nth-of-type(odd) { background-color: <<color tiddler-editor-fields-odd>>; }
|
||||
```
|
||||
|
||||
<<.note """~TiddlyWiki automatically applies classes `evenRow` and `oddRow` to table rows. However, use of these classes is not recommended. Rows start as 'even' (opposite to that expected) and all the rows of the table are considered to be a single combined set of rows, regardless of if they appear in the header, footer, or body.""">>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue