Page 1 of 1

Need to differentiate an element based on it's subclasses

Posted: Fri May 12, 2017 8:18 pm
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

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

Posted: Mon May 15, 2017 4:14 pm
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

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

Posted: Mon May 15, 2017 4:25 pm
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

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

Posted: Mon May 15, 2017 4:29 pm
by Radu
Hi Tom,

No problem, thanks for the update.

Regards,
Radu