[oXygen-sdk] Oxygen CSS question

Oxygen XML Editor Support support at oxygenxml.com
Mon Feb 17 00:52:30 CST 2014


Hi Nathan,

You would have two options:

1)

> image[href*="images/"]{
>   border: 1px solid black;
> }
>
> /*THIS SELECTOR HAS LESS PRIORITY THAN THE ONE ABOVE*/
> /*So for the same defined properties it will actually match the cases in which the selector above does not apply*/
> image[href]{
>   border: 2px solid black;
> }

The "image[href*="images/"]" selector has a higher importance than the 
"image[href]" selector so when it will not match, the equivalent values 
for the properties from the "weaker" selector will be used instead.

2) Use the not() CSS 3 selector which was added in Oxygen 15.2:

> image:not([href*="images/"]){
>   border: 3px solid black;
> }

Here are some other CSS features we added in 15.2:

http://blog.oxygenxml.com/2014/01/oxygen-152-new-author-visual-editor-css.html

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 2/15/2014 4:10 AM, Nathan wrote:
> Hi,
>    I have a case where I have to apply differential styles to two sets
> of images based on a substring in the href attribute. To give the use case:
>
>   *    Use case 1 - Apply a certain style to a image element with href
>     containing the images folder - I can easily do this as
>
> image[href*="images/"]{
>     /* Apply style here */
> }
>
>   *    Use case 2 - Apply a different style to anything not fulfilling
>     the above criteria - how would I do a "not equal to" to test for
>     hrefs not containing the "images" sub string?
>
>
>    Is this possible using Oxygen CSS? Sorry if this might be an obvious
> question to someone used to CSS, I am a total CSS newbie.
>
> Thanks a bunch!
> Nathan
>
>
> _______________________________________________
> oXygen-sdk mailing list
> oXygen-sdk at oxygenxml.com
> http://www.oxygenxml.com/mailman/listinfo/oxygen-sdk
>



More information about the oXygen-sdk mailing list