<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello,<br>
<br>
As far as I know you can't use any type of editor variables inside
CSS rules, neither custom nor built-in ones. Can you give us more
detains about how is the user changing between different branches?
Maybe we can give some alternatives, like: <br>
- you can have different CSSs associated in the document type and
the user can switch between them using the "Styles" button on the
toolbar (when the branch changes)<br>
- you can use custom pseudo-classes [1]. Firstly, you must have
rules in the CSS to match the pseudo classes, maybe like this:<br>
<br>
rootElement:-ext-branch1-pseudo-class image {<br>
content: url(..path1..)<br>
}<br>
<br>
rootElement:-ext-branch2-pseudo-class image {<br>
content: url(..path2..)<br>
}<br>
<br>
When the branch changes you must set the respective pseudo class.
You can do that dynamically from the JAVA API [1] or by using an
action with TogglePseudoClassOperation [2] or
SetPseudoClassOperation [3].<br>
<br>
[1]
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com/doc/ug-oxygen/#topics/dg-custom-css-pseudo-classes.html">http://www.oxygenxml.com/doc/ug-oxygen/#topics/dg-custom-css-pseudo-classes.html</a><br>
[2]
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/ecss/extensions/commons/operations/TogglePseudoClassOperation.html">http://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/ecss/extensions/commons/operations/TogglePseudoClassOperation.html</a><br>
[3]
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/ecss/extensions/commons/operations/SetPseudoClassOperation.html">http://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/ecss/extensions/commons/operations/SetPseudoClassOperation.html</a><br>
<pre class="moz-signature" cols="72">Best regards,
Alex
--
Alex Jitianu
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com">http://www.oxygenxml.com</a> </pre>
On 07-May-14 1:50 AM, Nathan wrote:<br>
</div>
<blockquote
cite="mid:CAAA7NDha0dr2S==RGK1dhhiJCLMCMnhj5hCM7brYiz-8CKa-Eg@mail.gmail.com"
type="cite">
<div dir="ltr">Hi,
<div> I might be wrong here but I am finding that custom
variables defined in preferences cannot be used in the CSS
(editor variables are fine). If this is true, is there any way
to use custom variables in the CSS? We have a case where a
person might need to select images in different branches of a
version control system and I need to change CSS display based
on the branch selected.</div>
<div><br>
</div>
<div>Regards,</div>
<div>Nathan</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
oXygen-sdk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-sdk@oxygenxml.com">oXygen-sdk@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk">http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk</a>
</pre>
</blockquote>
<br>
</body>
</html>