Page 1 of 1

Image classes?

Posted: Wed Jan 03, 2018 6:46 pm
by kgajda
Does oxygen give you enough flexibility to apply individual class tags to images? ie: <img src="something.png" class="unity-img"> so that I can create a class for css styling for some images but not others?

Re: Image classes?

Posted: Thu Jan 04, 2018 12:54 pm
by bogdan_cercelaru

Yes, you can obtain a custom CSS class in the generated output using the @outputclass attribute in the DITA topic. The value of this attribute will be found in the resulted @class attribute in the output.
For example, if your DITA topic contains

Code: Select all

<image href="path/to/image" outputclass="mystyle"/>
the resulted output contains

Code: Select all

<img class="image mystyle" src="path/to/image"/>