[Libreoffice-commits] help.git: 2 commits - help3xsl/default.css help3xsl/online_transform.xsl
Olivier Hallot
olivier.hallot at libreoffice.org
Thu Apr 26 11:51:28 UTC 2018
help3xsl/default.css | 18 +++++++++++++++---
help3xsl/online_transform.xsl | 14 ++++++--------
2 files changed, 21 insertions(+), 11 deletions(-)
New commits:
commit 8bca37f6c6f708fc5f8c1eb4938648e4f5324d4c
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date: Wed Apr 25 00:31:33 2018 -0300
Replace icontable by div + CSS flexbox
Icon tables are detected when the first cell has an image.
Change-Id: I808c814870404dbef696e12c6f30a7611468d2ee
Reviewed-on: https://gerrit.libreoffice.org/53429
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
diff --git a/help3xsl/default.css b/help3xsl/default.css
index ba548c337..cc380ffbf 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -119,15 +119,15 @@ pre,
/* div's for warning, tip and note */
.note,
.tip,
-.warning{
+.warning {
display:flex;
align-items: center;
padding:0.3em;
}
-.noteicon{
+.noteicon {
padding:0.3em;
}
-.notetext{
+.notetext {
padding:0.3em;
}
@@ -136,6 +136,14 @@ pre,
/* Special case of table with one cell*/
.onecell{
}
+/* Special case of icon table*/
+.icontable {
+ display:flex;
+ align-items:center;
+}
+.iconcell {
+ padding:0.3em;
+}
table {
box-shadow: rgba(0,0,0,0.1) 0px 1px 3px 0px;
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 39ad8471a..eeac0cfbe 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -788,7 +788,7 @@
</xsl:choose>
</xsl:template>
<xsl:template match="tablecell" mode="onecell"><xsl:apply-templates/></xsl:template>
-<xsl:template match="tablecell" mode="icontable"><td valign="top"><xsl:apply-templates/></td></xsl:template>
+<xsl:template match="tablecell" mode="icontable"><div class="iconcell"><xsl:apply-templates/></div></xsl:template>
<xsl:template match="tablecell" mode="embedded">
<xsl:choose>
<xsl:when test="paragraph[@role='tablehead']">
@@ -803,7 +803,7 @@
<!-- TABLEROW -->
<xsl:template match="tablerow"><tr><xsl:apply-templates /></tr></xsl:template>
<xsl:template match="tablerow" mode="onecell"><xsl:apply-templates mode="onecell"/></xsl:template>
-<xsl:template match="tablerow" mode="icontable"><tr><xsl:apply-templates mode="icontable"/></tr></xsl:template>
+<xsl:template match="tablerow" mode="icontable"><div class="icontable"><xsl:apply-templates mode="icontable"/></div><br/></xsl:template>
<xsl:template match="tablerow" mode="embedded"><tr><xsl:apply-templates mode="embedded"/></tr></xsl:template>
<!-- TITLE -->
@@ -1229,9 +1229,7 @@
</xsl:when>
<xsl:when test="descendant::tablecell[1]/descendant::image">
- <table border="0" class="icontable" cellpadding="5" cellspacing="0">
- <xsl:apply-templates mode="icontable"/>
- </table>
+ <xsl:apply-templates mode="icontable"/>
</xsl:when>
<xsl:when test="@class='wide'">
commit 3824ac08e61a8f41fde588fd3b6408dec8c244c5
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date: Tue Apr 24 23:52:25 2018 -0300
Replace onecell table by a div
Replace table of type onecell by a div + css
Change-Id: I120a85c96b312d206a8f582c69405aeb5fd80a9c
Reviewed-on: https://gerrit.libreoffice.org/53428
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
diff --git a/help3xsl/default.css b/help3xsl/default.css
index 50023f5fc..ba548c337 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -133,6 +133,10 @@ pre,
/* Table related classes */
+/* Special case of table with one cell*/
+.onecell{
+}
+
table {
box-shadow: rgba(0,0,0,0.1) 0px 1px 3px 0px;
border-collapse: collapse;
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 39b656ef0..39ad8471a 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -787,6 +787,7 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
+<xsl:template match="tablecell" mode="onecell"><xsl:apply-templates/></xsl:template>
<xsl:template match="tablecell" mode="icontable"><td valign="top"><xsl:apply-templates/></td></xsl:template>
<xsl:template match="tablecell" mode="embedded">
<xsl:choose>
@@ -801,6 +802,7 @@
<!-- TABLEROW -->
<xsl:template match="tablerow"><tr><xsl:apply-templates /></tr></xsl:template>
+<xsl:template match="tablerow" mode="onecell"><xsl:apply-templates mode="onecell"/></xsl:template>
<xsl:template match="tablerow" mode="icontable"><tr><xsl:apply-templates mode="icontable"/></tr></xsl:template>
<xsl:template match="tablerow" mode="embedded"><tr><xsl:apply-templates mode="embedded"/></tr></xsl:template>
@@ -1223,9 +1225,7 @@
<xsl:choose>
<xsl:when test="count(descendant::tablecell)=1">
- <table border="0" class="onecell" cellpadding="0" cellspacing="0">
- <xsl:apply-templates />
- </table>
+ <div class="onecell"><xsl:apply-templates mode="onecell"/></div>
</xsl:when>
<xsl:when test="descendant::tablecell[1]/descendant::image">
More information about the Libreoffice-commits
mailing list