Pages: 1
Print
Author Topic: Xml comments  (Read 271 times)
gcrews
Member

Posts: 189


« on: October 24, 2011, 11:35:29 AM »

Is it possible to hide xml comments with a CSS?

I know you can toggle them in the options but can it also be done with a CSS?

I am trying to create 2 different CSS for our writers. One for editing that shows comments, prolog, draft-comments conref with gray background, etc.…  The other one I am trying to style as close as possible to what the actual output will look like. Is there any way to hide the comments in the second CSS?
« Last Edit: October 24, 2011, 11:54:40 AM by gcrews » Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1548



WWW
« Reply #1 on: October 24, 2011, 12:14:46 PM »

There is a proprietary (XMetaL-specific) CSS selector for this named $COMMENT, so you can have this in your CSS:

$COMMENT {
  display: none;
}


FYI:
XMetaL's proprietary selectors are $DOCUMENT, $PROCINS, $COMMENT, $MARKSEC

$PROCINS also supports target and data so you can differentiate between different PIs:
http://forums.xmetal.com/index.php?topic=24.0
Logged
gcrews
Member

Posts: 189


« Reply #2 on: October 24, 2011, 12:32:48 PM »

Nope, that does not work. That’s the first thing I tried. The color attribute seems to have an effect and I can make the comments white but the region still shows up.
Logged
gcrews
Member

Posts: 189


« Reply #3 on: October 24, 2011, 12:43:14 PM »

Update: never mind, looks like the comments do not show up in normal regardless.
I guess I don’t need to remove them from tag view since that’s not really like the output.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1548



WWW
« Reply #4 on: October 24, 2011, 01:21:31 PM »

If necessary (sounds like it isn't) there is another way to stop comments from appearing in Tags On view and that is to set this INI variable to false: show_comments
Logged
Pages: 1
Print
Jump to: