Need to differentiate an element based on it's subclasses

frodos_pants
Posts: 4

Need to differentiate an element based on it's subclasses

Fri May 12, 2017 8:18 pm

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: 5090

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

Mon May 15, 2017 4:14 pm

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

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

Mon May 15, 2017 4:25 pm

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: 5090

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

Mon May 15, 2017 4:29 pm

Hi Tom,

No problem, thanks for the update.

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

Return to “XHTML”

Who is online

Users browsing this forum: No registered users and 0 guests