[oXygen-user] Different display depending on contents

Pierre Attar
Fri May 6 05:29:42 CDT 2016


Hi Georges,

This work fine but does not exactely fits my requirement which are : as 
soon as *one *item has a contained list *all *first level items ar bolded.
So, if 1 have a first level list of 10 items and only one has a sublist, 
then all the ten items need to be bolded.

Any idea for that ?

Pierre


Le 06/05/2016 12:14, George Bina a écrit :
> Dear Pierre,
>
> There is a CSS level 4 draft that specifies a relational pseudo-class 
> ":has()"
> https://drafts.csswg.org/selectors-4/#relational
> which can be used to provide the functionality that you need.
> The good news is that oXygen implements this, so for example, if you 
> have an XHTML document like
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html>
> <?xml-stylesheet type="text/css" href="test.css"?>
> <html xmlns="http://www.w3.org/1999/xhtml">
>     <head>
>         <title></title>
>     </head>
>     <body>
>
>         <ul>
>             <li>normal</li>
>             <li>Bold!!!
>                 <ul>
>                     <li>1</li>
>                     <li>2</li>
>                 </ul>
>             </li>
>             <li>Normal again</li>
>
>         </ul>
>     </body>
> </html>
>
> then the test.css referred in the file needs to contain
>
> li:has(ul) {
>     font-weight:bold;
> }
>
> in order to render the second list item with bold font.
>
> Best Regards,
> George
> -- 
> George Cristian Bina
> <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
> http://www.oxygenxml.com
>
> On 06/05/16 12:40, Pierre Attar wrote:
>> Hi,
>>
>> For a specific application, I need to parameterize the Oxygen editor in
>> order to have a different display of list items depending on contained
>> lists.
>>
>> More precisely, a level 1 item is bold if there are level 2 items
>> contained in the list.
>> Otherwise, it is regular.
>>
>> I know how to manage that while transforming for publishing bu I don't
>> know how to reprensent that only using Oxygen CSS selectors.
>>
>>
>> Any ideas ?
>>
>> Pierre
>> _______________________________________________
>> oXygen-user mailing list
>> 
>> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20160506/87a0d9e6/attachment.html>


More information about the oXygen-user mailing list