[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Custom colors for admonitions
Brett,
The simple answer is to add
<xsl:attribute name="border">1pt solid
blue</xsl:attribute>
or a variation of it. However, I have found that you will need to also deal with the title box as
well or it will look a bit weird. So below you will see my admonition section
that you should be able to modify to suit your needs.
Regards
Dean Nelson
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" > <!-- Admonitions --> <xsl:param name="admon.graphics"
select="'1'"/>
<xsl:param name="admon.textlabel" select="'1'"/> <xsl:param name="admon.graphics.extension" select="'.svg'"/> <xsl:param name="admon.graphics.path" select="'http://docbook.sourceforge.net/release/xsl/current/images/'"/> <!-- Normal -->
<xsl:attribute-set name="admonition.properties"> <xsl:attribute name="background-color"> <xsl:choose> <xsl:when test="ancestor-or-self::tip" >#FFFFFF</xsl:when> <xsl:when test="ancestor-or-self::note" >#FFFFFF</xsl:when> <xsl:when test="ancestor-or-self::important">#B5FFB5</xsl:when> <xsl:when test="ancestor-or-self::caution" >#FAFA8C</xsl:when> <xsl:when test="ancestor-or-self::warning" >#FFADAD</xsl:when> <xsl:otherwise>#000000</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:attribute name="keep-together.within-column">always</xsl:attribute> <xsl:attribute name="padding">5pt</xsl:attribute> <xsl:attribute name="padding-top">-5pt</xsl:attribute> <xsl:attribute name="border">1pt solid blue</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set
name="admonition.title.properties">
<xsl:attribute name="keep-together.within-column">always</xsl:attribute> <xsl:attribute name="background-color">#E0E0E0</xsl:attribute> <xsl:attribute name="text-align">left</xsl:attribute> <xsl:attribute name="padding">5pt</xsl:attribute> <!-- <xsl:attribute name="border">1pt solid blue</xsl:attribute> removed to avoid double line --> <xsl:attribute name="border-top">1pt solid blue</xsl:attribute> <xsl:attribute name="border-left">1pt solid blue</xsl:attribute> <xsl:attribute name="border-right">1pt solid blue</xsl:attribute> </xsl:attribute-set </xsl:stylesheet> In a message dated 4/28/2014 7:24:58 P.M. Pacific Daylight Time,
brettd43@gmail.com writes:
Hi, |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]