Inline image height

MicTie
Posts: 9
Joined: Mon Dec 07, 2020 12:57 pm

Inline image height

Post by MicTie » Tue Jun 01, 2021 6:13 am

Using OxygenXML23.1 and the DitaMap WebHelp Responsive Transformation.

Besides images in various sizes, my project contains hundreds of inline images (mostly icons and buttons) which are specified in dita-topics like this

Code: Select all

<image href="../../Common/images/FREQ.png" height="18px" align="center" id="image_52" alt="WS"/>
The transformation 'overwrites' the height setting via 'wh-responsive-image.css:4' to

Code: Select all

.image {
    max-width: 100%;
    height: auto;
    background-repeat: no-repeat;
}
Besides changing the original 'wh-responsive-image.css' in the Dita-Plugin, is there a way to 'unset' this 'height:auto' so that the originally set height becomes valid again?

Thanks for your help!

Costin
Posts: 734
Joined: Mon Dec 05, 2011 6:04 pm

Re: Inline image height

Post by Costin » Wed Jun 02, 2021 12:38 pm

Hi,

Thank you for the feedback your provided!

I've just logged it in our internal improvements system, so that our developers will analyze it and see if there is something we could implement to improve this behavior.

Meanwhile, I suggest you should avoid modifying any of the plugin's source files directly, because this could conflict with files from a newer version and generate issues when you update the software at a later time.
We do not have a general rule to unset the height property, but you could use your own customization CSS to match specific elements and set a custom height value for them.
For your specific example, you could use something like:

Code: Select all

.image[height="18"] {
height: 18px;
}
You can find more details on how you could use your internet browser's CSS inspector to identify the selectors you should use in your CSS customization and how the custom CSS could be used in a scenario, in this section from the WebHelp User-Guide.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support

MicTie
Posts: 9
Joined: Mon Dec 07, 2020 12:57 pm

Re: Inline image height

Post by MicTie » Wed Jun 02, 2021 12:50 pm

Thank you!
Your solution works fine for me!

Post Reply