Element attributs specified in CSS are not triggered in Webhelp Responsive output
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 6
- Joined: Fri Aug 19, 2022 10:53 am
Element attributs specified in CSS are not triggered in Webhelp Responsive output
Hi,
In our documentation we are using two two ways of images in our topics: one for general screenshots (placement=break) and one for icons/buttons (placement=inline).
Now, for the 1. scenario we have specified in our CSS
Like this, the images are not stuck directly under or above certain text elements.
But now I would like to address both scenarios with different CSS rules by using their attribute.
However, the HTML5 output doesn't recognize the attribute, hence the following CSS will not apply to the images:
How can I achieve that this differentiation in both my image types?
Thanks,
Josie
In our documentation we are using two two ways of images in our topics: one for general screenshots (placement=break) and one for icons/buttons (placement=inline).
Now, for the 1. scenario we have specified in our CSS
Code: Select all
.image {
margin-bottom: 0.5em;
margin-top: 0.5em;
}
But now I would like to address both scenarios with different CSS rules by using their attribute.
However, the HTML5 output doesn't recognize the attribute, hence the following CSS will not apply to the images:
Code: Select all
*[class~='topic/image'][placement='break'] {
margin-bottom: 0.5em;
margin-top: 0.5em;
}
*[class~='topic/image'][placement='inline'] {
display : inline ;
vertical-align: baseline;
}
Thanks,
Josie
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Element attributs specified in CSS are not triggered in Webhelp Responsive output
Post by julien_lacour »
Hi Josie,
The placement attribute has no equivalent in HTML (see <img> specification) so it is not copied into the output. Instead you can use the outputclass attribute which is copied into the element class.
FInally you need to match the additional class value into your CSS:
I removed the display property as it is the default image display anyway.
Regards,
Julien
The placement attribute has no equivalent in HTML (see <img> specification) so it is not copied into the output. Instead you can use the outputclass attribute which is copied into the element class.
FInally you need to match the additional class value into your CSS:
Code: Select all
*[class ~= 'topic/image'][class ~= "placement-break"] {
margin-bottom: 0.5em;
margin-top: 0.5em;
}
*[class ~= 'topic/image'] {
vertical-align: baseline;
}
Regards,
Julien
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service