PDF Customization: Styling step troubleshooting

plnrlt
Posts: 2
Joined: Thu Feb 06, 2020 1:29 pm

PDF Customization: Styling step troubleshooting

Post by plnrlt » Wed Feb 12, 2020 5:58 pm

Hello,

I am using the "DITA map PDF - Based on HTML5 and CSS" transformation scenario in Oxygen 21.1 and I cannot manage to style the content of my <steptroubleshooting> tag. In the previous version, I didn't have to do anything and the content was styled as it is displayed in the editor, but now it is displayed as plain text and goes on the same line than the text of my step if there is no step result.

I found out how to style my <tasktroubleshooting> tags by adding the following lines in p-topic.css:

Code: Select all

*[class~="task/tasktroubleshooting"]:before {
  content: "Dépannage : ";
  font-weight: bold;
  }
  *[class~="task/tasktroubleshooting"]{
 background-color: rgba(0,0,0,0.1);
        display:block;
        background-size:contain;
        padding-left:10px;
        padding-right:10px;
        padding-top:10px;
        padding-bottom:10px;
  }
I'd like to apply the same style to my <steptroubleshooting> tags but I can't find how.

I tried to replace "tasktroubleshooting" by "steptroubleshooting" in the code above, as I saw that *[class~="task/stepresult"]{ is used to style the <stepresult> tags and that the <stepresult> and <steptroubleshooting> tags are on the same level in the .merge.xml file generated with my pdf, but it didn't work.

I also tried to use the "troubleshooting/remedy" class, with no success. I also tried a lot of other things I cannot remember and were more desperate attempts than real logical solutions, but (obviously) none worked.

Do you have any idea of what class I need to use here?

In advance, thank you

plnrlt
Posts: 2
Joined: Thu Feb 06, 2020 1:29 pm

Re: PDF Customization: Styling step troubleshooting

Post by plnrlt » Wed Feb 12, 2020 7:03 pm

If that may help someone, I found how to bypass the problem by using <note type="trouble"> instead of <steptroubleshooting>, and I styled this tag in p-styling.css:

Code: Select all

div.trouble > span.note__title{
    content: "Dépannage : " !important;
    font-weight: bold;
}

div.trouble{
        background-color: rgba(0,0,0,0.1);
        display:block;
        background-size:contain;
        padding-left:10px;
        padding-right:10px;
        padding-top:10px;
        padding-bottom:10px;
}

julien_lacour
Posts: 138
Joined: Wed Oct 16, 2019 3:47 pm

Re: PDF Customization: Styling step troubleshooting

Post by julien_lacour » Thu Feb 13, 2020 11:40 am

Hello,

Please note that you can debug your PDF output by using the .merged.html file generated in the output folder during the transformation.

Any CSS modification is applied and visible directly on this file. This is the best way to check what selector should be used to match to your content.

Regards,
Julien

Post Reply