From eb7388b549f4407f89ba6fceac0d2d33241f6810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 11 Nov 2019 16:50:01 +0000 Subject: [PATCH] docs: relax CSS context match for pretty tables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We currently only render pretty tables if they have the "top_table" class set. All of our tables set this, except for the ACL & migration doc tables, which should have set it, and the API reference which does not want it. Simplify life by rendering all tables in a pretty style and remove the need for the "top_table" class entirely. A small rule turns off the pretty style for the API reference where tables are a hack used to render enums with horizontal alignment. Reviewed-by: Michal Privoznik Signed-off-by: Daniel P. Berrangé --- docs/aclpolkit.html.in | 20 +++++------ docs/genaclperms.pl | 2 +- docs/libvirt.css | 75 ++++++++++++------------------------------ docs/migration.html.in | 2 +- docs/newapi.xsl | 4 +-- 5 files changed, 35 insertions(+), 68 deletions(-) diff --git a/docs/aclpolkit.html.in b/docs/aclpolkit.html.in index 68e6d399b2..4a8877d5e7 100644 --- a/docs/aclpolkit.html.in +++ b/docs/aclpolkit.html.in @@ -64,7 +64,7 @@

virConnectPtr

- +
@@ -80,7 +80,7 @@
Attribute

virDomainPtr

- +
@@ -104,7 +104,7 @@
Attribute

virInterfacePtr

- +
@@ -128,7 +128,7 @@
Attribute

virNetworkPtr

- +
@@ -152,7 +152,7 @@
Attribute

virNodeDevicePtr

- +
@@ -172,7 +172,7 @@
Attribute

virNWFilterPtr

- +
@@ -196,7 +196,7 @@
Attribute

virSecretPtr

- +
@@ -232,7 +232,7 @@
Attribute

virStoragePoolPtr

- +
@@ -256,7 +256,7 @@
Attribute

virStorageVolPtr

- +
@@ -317,7 +317,7 @@

Connection Driver Name

-
Attribute
+
diff --git a/docs/genaclperms.pl b/docs/genaclperms.pl index e20b4c11c3..0de2cfad4d 100755 --- a/docs/genaclperms.pl +++ b/docs/genaclperms.pl @@ -85,7 +85,7 @@ foreach my $object (sort { $a cmp $b } keys %perms) { my $olink = lc "object_" . $object; print <$class -
Connection Driver
+
diff --git a/docs/libvirt.css b/docs/libvirt.css index 399404ca54..d2e1842b62 100644 --- a/docs/libvirt.css +++ b/docs/libvirt.css @@ -161,37 +161,37 @@ p.image { text-align: center; } -.top_table { +table { border-collapse: collapse; min-width: 60%; margin-left: auto; margin-right: auto; } -.top_table th { +table th { background: rgb(0, 95, 97); color: rgb(255, 255, 255); padding: 0.5em; } -.top_table th a { +table th a { color: inherit; text-decoration: inherit; } -.top_table td, .top_table th { +table td, table th { border: 1px solid rgb(60, 133, 124); } -.top_table td { +table td { padding: 4px; } -.top_table tr:hover td, .top_table col:hover td { +table tr:hover td, table col:hover td { background: #eeeeee; } -.top_table tr td:hover { +table tr td:hover { background: #c5dbd8; } @@ -289,42 +289,12 @@ img.diagram { margin-right: auto; } -table.data th, table.data td { - padding: 0.3em; -} -table.data { - border-spacing: 0px; -} - -table.data thead th { - background: rgb(178,178,178); - text-align: center; -} - -table.data { - border: 1px solid black; - border-collapse: collapse; -} - -table.data thead tr th { - border: 1px solid black; -} - -table.data tr.head th { - border-left: 1px solid black; - border-right: 1px solid black; -} - -table.data tbody td { - background: rgb(240,240,240); -} - -table.data tbody td.y { +table tbody td.y { background: rgb(220,255,220); text-align: center; } -table.data tbody td.n { +table tbody td.n { background: rgb(255,220,220); text-align: center; } @@ -377,6 +347,18 @@ table.data tbody td.n { text-decoration: none; } +.api table td,.api table th { + border: 0px; +} + +.api table tr:hover td, .api table col:hover td { + background: inherit; +} + +.api table tr td:hover { + background: inherit; +} + dl.variablelist > dt { display: block; float: left; @@ -392,21 +374,6 @@ dl.variablelist > dt:after { content: ": "; } -table.acl { - margin: 1em; - border-spacing: 0px; - border: 1px solid #ccc; -} - -table.acl tr, table.acl td { - padding: 0.3em; - border: 1px solid #ccc; -} - -table.acl thead { - background: #ddd; -} - div.description pre.code { border: 1px dashed grey; background-color: inherit; diff --git a/docs/migration.html.in b/docs/migration.html.in index 7c345b65b7..355f0e89af 100644 --- a/docs/migration.html.in +++ b/docs/migration.html.in @@ -257,7 +257,7 @@ combinations.

-
Permission
+
diff --git a/docs/newapi.xsl b/docs/newapi.xsl index 670879dc48..0dc4f7ae52 100644 --- a/docs/newapi.xsl +++ b/docs/newapi.xsl @@ -43,7 +43,7 @@
Access control parameter checks
-
Before migration
+
@@ -56,7 +56,7 @@
Access control return value filters
-
Object
+
Object