Skip to content

Commit e23f56f

Browse files
HTML: image without width deisplayed at natural size if possible
1 parent 36ab4a0 commit e23f56f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

xsl/pretext-html.xsl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5827,7 +5827,13 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
58275827
</xsl:variable>
58285828
<xsl:variable name="layout" select="exsl:node-set($rtf-layout)" />
58295829
<!-- div is constraint/positioning for contained image -->
5830-
<div class="image-box">
5830+
<div>
5831+
<xsl:attribute name="class">
5832+
<xsl:text>image-box</xsl:text>
5833+
<xsl:if test="$layout/width-native = 'auto'">
5834+
<xsl:text> image-box__auto-width</xsl:text>
5835+
</xsl:if>
5836+
</xsl:attribute>
58315837
<xsl:attribute name="style">
58325838
<xsl:text>width: </xsl:text>
58335839
<xsl:value-of select="$layout/width"/>

0 commit comments

Comments
 (0)