Skip to content

Commit 8abaf07

Browse files
table scroll container (#150)
1 parent d486481 commit 8abaf07

File tree

3 files changed

+1433
-10
lines changed

3 files changed

+1433
-10
lines changed
Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
= Using tables
22

3-
* For markdown content use the following format for tables:
4-
+
3+
== Basic table syntax
4+
Use the following format for tables:
5+
56
[source,adoc]
67
----
7-
Key | Required | Type | Description
8-
---|---|---|---
9-
version | Y | String | Should currently be `2`
10-
{: class="table table-striped"}
11-
----
8+
[.table.table-striped]
9+
[cols=4*, options="header", stripes=even]
10+
|===
11+
| Key
12+
| Required
13+
| Type
14+
| Description
1215
13-
* For asciidoc content use the following:
14-
+
15-
[source,adoc]
16+
| Version
17+
| Y
18+
| String
19+
| Should currently be `2`
20+
|===
1621
----
22+
23+
Looks like:
24+
1725
[.table.table-striped]
1826
[cols=4*, options="header", stripes=even]
1927
|===
@@ -27,4 +35,50 @@ version | Y | String | Should currently be `2`
2735
| String
2836
| Should currently be `2`
2937
|===
38+
39+
== Extra wide tables
40+
41+
If you have a wide table that needs to scroll, wrap it in a scrollable container, as follows:
42+
43+
[source,adoc]
44+
----
45+
[.table-scroll]
46+
--
47+
[.table.table-striped]
48+
[cols=4*, options="header", stripes=even]
49+
|===
50+
| Key
51+
| Required
52+
| Type
53+
| Description
54+
55+
| `++Some very long text that can't wrap so the table needs to scroll++`
56+
| Some data
57+
| Some more data
58+
| Some more data
59+
|===
60+
--
3061
----
62+
63+
Looks like:
64+
65+
[.table-scroll]
66+
--
67+
[.table.table-striped]
68+
[cols=4*, options="header", stripes=even]
69+
|===
70+
| Key
71+
| Required
72+
| Type
73+
| Description
74+
75+
| `++Some very long text that can't wrap so the table needs to scroll++`
76+
| Some data
77+
| Some more data
78+
| Some more data
79+
|===
80+
--
81+
82+
== Advanced table options
83+
84+
There are a lot of options for formatting tables, cell, rows, columns. For more information, see the link:https://docs.asciidoctor.org/asciidoc/latest/tables/build-a-basic-table/[Asciidoctor docs]

0 commit comments

Comments
 (0)