Skip to content

Commit

Permalink
Move CSS 3.0 constructs to a separate file.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhellingman committed Feb 20, 2024
1 parent cf16b1b commit bab80c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions modules/block.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -763,13 +763,14 @@
</xd:doc>

<xsl:template match="p[f:has-rend-value(@rend, 'initial-image')]" mode="css">
<xsl:call-template name="handle-initial-image-css"/>
<xsl:if test="not(f:is-set('pg.compliant'))">
<xsl:call-template name="handle-initial-image-css"/>
</xsl:if>
</xsl:template>

<xsl:template name="handle-initial-image-css">
<xsl:context-item as="element()" use="required"/>
<xsl:if test="generate-id() = generate-id(key('rend', name() || ':' || @rend)[1])">

<xsl:variable name="css-properties" select="f:translate-rend-ladder(@rend, name())"/>
<xsl:variable name="scale-factor" select="xs:decimal(f:get-setting('images.scale'))" as="xs:decimal"/>

Expand Down Expand Up @@ -802,7 +803,6 @@
<xsl:text>color: white;&lf;</xsl:text>
<xsl:text>font-size: 1px;&lf;</xsl:text>
<xsl:text>}&lf;</xsl:text>

</xsl:if>
<xsl:apply-templates mode="css"/>
</xsl:template>
Expand Down
4 changes: 4 additions & 0 deletions modules/css.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
<xsl:value-of select="f:css-stylesheet('../style/layout-html.css')"/>
</xsl:if>

<xsl:if test="not(f:is-set('pg.compliant'))">
<xsl:value-of select="f:css-stylesheet('../style/refine30.css')"/>
</xsl:if>

<!-- Debugging CSS stylesheet. -->
<xsl:if test="f:is-set('debug')">
<xsl:value-of select="f:css-stylesheet('../style/debug.css')"/>
Expand Down
2 changes: 1 addition & 1 deletion style/normalize.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ a {

abbr[title] {
border-bottom: none;
text-decoration: underline dotted;
text-decoration: underline;
}

b, strong {
Expand Down
6 changes: 6 additions & 0 deletions style/refine30.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/* refine30.css - Some CSS 3.0 constructs to refine the presentation, so the main stylesheets can remain CSS 2.1 */

abbr[title] {
border-bottom: none;
text-decoration: underline dotted;
}

0 comments on commit bab80c6

Please sign in to comment.