Need to differentiate an element based on it's subclasses

frodos_pants
Posts: 4
Joined: Fri Jan 13, 2017 7:35 pm

Need to differentiate an element based on it's subclasses

Post by frodos_pants »

Hi,

I have an author template that has one element, and the css is supposed to trigger an action button based on the existence (or non-existence) of a subclass. For example my xml has:

<section class="level1 practice"> vs. <section class="level1">

I tried selecting with:

[class$="practice"] vs. [class$="level1"]

and

section[class~="level1"][class~="practice"] vs. section[class~="level1"]:not([class~="practice"])

but no luck. Any thoughts?

Thanks,
Tom
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Need to differentiate an element based on it's subclasses

Post by Radu »

Hi Tom,

Using ~= should be enough to test if the @class attribute contains an atomic value in it.
So you have this problem when customizing the editing in the Oxygen Author visual editing mode, right?
Could you post a small sample XML document + CSS stylesheet?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
frodos_pants
Posts: 4
Joined: Fri Jan 13, 2017 7:35 pm

Re: Need to differentiate an element based on it's subclasses

Post by frodos_pants »

Hi Radu,

Thanks for your reply. I'm sorry I bothered you. Shortly after I posted this I realized I had a typo that was causing the issue. I looked around, but I couldn't find a way to cancel this posting.

Thanks again, and sorry for wasting your time,
Tom
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Need to differentiate an element based on it's subclasses

Post by Radu »

Hi Tom,

No problem, thanks for the update.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply