Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
2716-improve-table-styling.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2716-improve-table-styling.patch of Package erlang
From 224a1977ac4efc77078adc8490a396805a3dd270 Mon Sep 17 00:00:00 2001 From: Mariano Guerra <mariano@marianoguerra.org> Date: Fri, 21 Oct 2016 16:41:10 +0100 Subject: [PATCH 16/59] improve table styling --- lib/erl_docgen/priv/css/otp_doc.css | 45 ++++++++++++++++++++++++++++++++++++- lib/erl_docgen/priv/xsl/db_html.xsl | 8 ++++--- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/lib/erl_docgen/priv/css/otp_doc.css b/lib/erl_docgen/priv/css/otp_doc.css index b1d18b09d..1ff9bcade 100644 --- a/lib/erl_docgen/priv/css/otp_doc.css +++ b/lib/erl_docgen/priv/css/otp_doc.css @@ -69,7 +69,7 @@ span.code { font-family: mono, Courier, monospace; white-space: pre; font .note, .warning, .do, .dont { border: 1px solid #495057; - margin: 1em 3em; + margin: 1em 0; } .note .label { background-color: #2b8a3e; @@ -161,3 +161,46 @@ footer { } margin: 2em 0; font-size: 1.5em; } + +.doc-table-wrapper{ + width: 100%; +} + +.doc-table{ + min-width: 50%; + margin: 0 auto; +} + +.doc-table-caption{ + margin-top: 1em; + font-style: italic; + text-align: center; +} + +table { + border-collapse: collapse; + min-width: 50%; + margin: 1em; +} + +table, th, td { + border: 1px solid #666; +} + +th, td { + padding: 0.5em; + text-align: left; +} + +tr:hover { + background-color: #f5f5f5; +} + +tr:nth-child(even) { + background-color: #f2f2f2; +} + +th { + background-color: #777; + color: #fefefe; +} diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index bdfd839ca..529d28e88 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -1135,7 +1135,8 @@ <xsl:variable name="tabnum"> <xsl:number level="any" from="chapter" count="table"/> </xsl:variable> - <table border="1" cellpadding="2" cellspacing="0"> + <div class="doc-table-wrapper"> + <table class="doc-table"> <!-- tbody--> <xsl:apply-templates select="row"> <xsl:with-param name="chapnum" select="$chapnum"/> @@ -1147,6 +1148,7 @@ <xsl:with-param name="chapnum" select="$chapnum"/> <xsl:with-param name="tabnum" select="$tabnum"/> </xsl:apply-templates> + </div> </xsl:template> <xsl:template match="row"> @@ -1166,11 +1168,11 @@ <xsl:param name="chapnum"/> <xsl:param name="tabnum"/> - <em>Table + <p class="doc-table-caption">Table <xsl:value-of select="$chapnum"/>.<xsl:value-of select="$tabnum"/>:   <xsl:apply-templates/> - </em> + </p> </xsl:template> -- 2.12.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor