}
p, table, body>div, h5 { margin: 1em 0; }
+blockquote {
+ @media (max-width: 28em) { margin: 1em 0.5em; }
+ margin: 1em;
+}
li { margin: 0 0 0 2em; }
dd { margin: 0 0 0 1em; }
font-family: monospace;
font-size: 0.95em;
&:before { content: "% "; }
+ &>span { white-space: nowrap; }
+
+ blockquote & {
+ display: block;
+ text-align: left;
+ padding-left: 3em;
+ text-indent: -3em;
+ }
}
.permalink {
</code></pre>
</xsl:template>
+<!-- For paragraphs containing only kbd elements, wrap in blockquote. -->
+<xsl:template match='xhtml:p[*[last()=count(../xhtml:kbd)]]'>
+ <blockquote>
+ <xsl:copy>
+ <xsl:apply-templates select='node()|@*' />
+ </xsl:copy>
+ </blockquote>
+</xsl:template>
+
+<!--
+ Wrap each word of text in kbd elements in spans, so they can be styled
+ to avoid linebreaks in the middle of option names and other bad places.
+-->
+<xsl:template name='spanify-text' match='xhtml:kbd/text()'>
+ <xsl:param name='text' select='normalize-space(.)' />
+ <xsl:variable name='firstword' select='substring-before($text, " ")' />
+ <xsl:choose>
+ <xsl:when test='$firstword'>
+ <span><xsl:value-of select='$firstword' /></span>
+ <xsl:text> </xsl:text>
+ </xsl:when>
+ <xsl:when test='$text'>
+ <span><xsl:value-of select='$text' /></span>
+ </xsl:when>
+ </xsl:choose>
+ <xsl:if test='$firstword'>
+ <xsl:call-template name='spanify-text'>
+ <xsl:with-param name='text' select='substring-after($text, " ")' />
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
<xsl:template match='copyright'>
<p>
<xsl:text>Copyright © </xsl:text>