Add table styling
Sphinx 2.0 switches the default HTML build from HTML4 to HTML5. HTML5 deprecates the 'border' attribute for the 'table' element and the HTML5 builder no longer emits this. This has resulted in a lack of borders on tables. Correct this by configuring border styling via CSS and then go a few steps further and start colouring the table header and using zebra stripes on rows to help visually distinguish them further. A sample table is added to the demo documentation so we've something to inspect locally. Change-Id: I79b40bb5700807ac8ad523a6e0a83cd21965346e Signed-off-by: Stephen Finucane <sfinucan@redhat.com> Closes-Bug: #1828265
This commit is contained in:
parent
77ae70abc9
commit
e137ed4f35
|
@ -79,7 +79,8 @@ Here's another example that's python code:
|
|||
if hasattr(app.builder, 'init_templates'):
|
||||
app.builder.init_templates()
|
||||
|
||||
Here's the same example but with ..code-block: ini to test the pygments lexer:
|
||||
Here's the same example but with ``..code-block: ini`` to test the pygments
|
||||
lexer:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
|
@ -91,6 +92,38 @@ Here's the same example but with ..code-block: ini to test the pygments lexer:
|
|||
vncserver_proxyclient_address = 10.0.0.31
|
||||
novncproxy_base_url = http://controller:6080/vnc_auto.html
|
||||
|
||||
Tables
|
||||
~~~~~~
|
||||
|
||||
Here's a sample table:
|
||||
|
||||
.. list-table:: OpenStack projects
|
||||
:header-rows: 1
|
||||
:widths: 10, 10, 60
|
||||
|
||||
* - Name
|
||||
- Role
|
||||
- Description
|
||||
* - Nova
|
||||
- Compute
|
||||
- To implement services and associated libraries to provide massively
|
||||
scalable, on demand, self service access to compute resources, including
|
||||
bare metal, virtual machines, and containers.
|
||||
* - Neutron
|
||||
- Networking
|
||||
- OpenStack Neutron is an SDN networking project focused on delivering
|
||||
networking-as-a-service (NaaS) in virtual compute environments.
|
||||
* - Swift
|
||||
- Object store
|
||||
- Swift is a highly available, distributed, eventually consistent
|
||||
object/blob store. Organizations can use Swift to store lots of data
|
||||
efficiently, safely, and cheaply. It's built for scale and optimized for
|
||||
durability, availability, and concurrency across the entire data set.
|
||||
Swift is ideal for storing unstructured data that can grow without bound.
|
||||
* - ...
|
||||
- ...
|
||||
- ...
|
||||
|
||||
Notices
|
||||
~~~~~~~
|
||||
|
||||
|
|
|
@ -6,11 +6,21 @@ html {
|
|||
table {
|
||||
margin-bottom: 10px; }
|
||||
|
||||
table.docutils {
|
||||
border-collapse: collapse; }
|
||||
|
||||
table.docutils th, table.docutils td {
|
||||
padding: 8px; }
|
||||
|
||||
table.docutils th {
|
||||
padding: 2px; }
|
||||
background-color: #2a4e68;
|
||||
color: #edf2f7; }
|
||||
|
||||
table.docutils td {
|
||||
padding: 2px; }
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
table.docutils tr.row-odd {
|
||||
background-color: #eee; }
|
||||
|
||||
table.docutils caption {
|
||||
font-weight: bold; }
|
||||
|
|
|
@ -6,11 +6,21 @@ html {
|
|||
table {
|
||||
margin-bottom: 10px; }
|
||||
|
||||
table.docutils {
|
||||
border-collapse: collapse; }
|
||||
|
||||
table.docutils th, table.docutils td {
|
||||
padding: 8px; }
|
||||
|
||||
table.docutils th {
|
||||
padding: 2px; }
|
||||
background-color: #2a4e68;
|
||||
color: #edf2f7; }
|
||||
|
||||
table.docutils td {
|
||||
padding: 2px; }
|
||||
border: 1px solid #ddd; }
|
||||
|
||||
table.docutils tr.row-odd {
|
||||
background-color: #eee; }
|
||||
|
||||
table.docutils caption {
|
||||
font-weight: bold; }
|
||||
|
|
Loading…
Reference in New Issue