Distributing custom framework with certain alternative CSS styles turned on by default?

csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

Distributing custom framework with certain alternative CSS styles turned on by default?

Post by csun »

Hello,

I have a question regarding this page:
https://www.oxygenxml.com/doc/versions/ ... css-styles

The figure "Styles Drop-down Menu in a DITA Document" at the bottom of the page shows that a few alternative CSS styles each has a check mark in front of it, e.g. + Full width, +Hints, etc. That's how the CSS styles in my custom framework looks too.

However, after I distribute this custom framework to others, they don't seem to find the alternative CSS turned on by default, i.e. when they click the +Styles drop-down menu, none of the alternative CSS style shows a check mark in front of it.

Is there something that I can do when sharing the custom framework, to allow others have exactly the same alternative CSS styles "checkmarked", under the +Styles drop-down menu?

Thanks,
Charles

P.S. I did some search and found this thread, which might be somewhat related: topic10621.html However, my use case seems to be a bit different as it is more about how to control the default behavior of the shared framework.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Post by Radu »

Hi Charles,

Sorry but I do not have a good workaround to propose you. I added an internal issue to take your suggestion into account.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Post by csun »

Thanks Radu for your reply, and for adding an internal issue about this.
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Post by Radu »

Hi Charles,

I think I got an idea about how to make this work. Let's say your original layer CSS is called "Hide draft comments" but you want them to be hidden from the start. You create an extension of the DITA framework:

http://blog.oxygenxml.com/2016/10/custo ... iting.html

which allows you to contribute a CSS to the default rendering so that draft comments are hidden by default.
You modify the "Hide draft comments" CSS layer to be called "Show draft comments" and point it to your own CSS which shows draft comments.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
csun
Posts: 31
Joined: Wed Dec 20, 2017 9:56 pm

Re: Distributing custom framework with certain alternative CSS styles turned on by default?

Post by csun »

This sounds to be a good workaround; I can give it a try. Thanks!
Post Reply