Page 1 of 1

Changing the Color of <comment> in Author Mode

Posted: Wed Aug 21, 2019 12:22 am
by fabdf
Hi,

Can you tell me how to change the color of the <comment> tag in Author mode in 21.1? I know how to change it for Text mode, but even after following the instructions in your help about how to modify additional CSS selectors, I was unable to change it in Author mode. This is the help topic I referenced: https://www.oxygenxml.com/doc/versions/ ... 2Ccomments

Thanks,
Fabio

Re: Changing the Color of <comment> in Author Mode

Posted: Wed Aug 21, 2019 8:40 am
by Radu
Hi Fabio,

The "oxy|comment" CSS selector is special for matching XML comments like "<!-- some comment -->".
What exactly do you mean by "<comment> tag"? If it's an actual XML element called "comment" then you just match it using the regular selector like:

Code: Select all

comment {color:blue;}
Regards,
Radu

Re: Changing the Color of <comment> in Author Mode

Posted: Thu Aug 22, 2019 11:35 pm
by fabdf
Hi Radu,

Thanks for getting back to me. I mean the DITA XML <comment> tag and how it appears in Author mode in oXygen 21.1. In version 18.0, it used to appear in green. How can we change the color to green in 21.1? It's not a big deal, but some of the authors on our team that use Author mode often are finding it difficult to distinguish the comments from the other text in a topic.

Thanks,
Fabio

Re: Changing the Color of <comment> in Author Mode

Posted: Fri Aug 23, 2019 8:48 am
by Radu
Hi Fabio,

There is no DITA <comment> tag. There is a DITA <draft-comment> tag and there are XML comments (<!--comment text-->). You are probably referring to XML comments because indeed in one version we changed their color from green to gray.
You need to create a custom CSS stylesheet containing:

Code: Select all

@namespace oxy "http://www.oxygenxml.com/extensions/author";

oxy|comment {
     color: green !important;
}
and then extend the DITA framework configuration to use your custom CSS:

https://blog.oxygenxml.com/2016/10/cust ... iting.html

Regards,
Radu

Re: Changing the Color of <comment> in Author Mode

Posted: Fri Aug 23, 2019 5:44 pm
by fabdf
Thanks Radu. We'll try this and let you know if we have any questions.

Fabio