CSS Element with or without an element
Posted: Tue Dec 10, 2013 5:49 pm
Hello,
I'm having problems styling a certain element with or without an attribute differently. The css is part of a project specific framework that contains also a template for new xml files. The framework has the highest priority of all frameworks within the frameworks collection. The oXygen version is 14.1.
In the CSS, in case a) the element has no attribute whereas in case b) the type attribute is specified
If I create a new file using the template of my framework the second selector is always used in the Author mode, when the attribute is found on the element and if it is not found. There is no different styling. If I change the order in the CSS and b) is declared before a) the declaration for b) is still effective, more powerful. Is there a chance to accomplish a different styling?
If I create a new, arbitrary file not using the template of my framework and add the elements <mentioned> and <mentioned type="Z">, the styling of both options is correct, the CSS works.
Maybe there's a problem with the preferences of my framework?
Thanks,
Franziska
I'm having problems styling a certain element with or without an attribute differently. The css is part of a project specific framework that contains also a template for new xml files. The framework has the highest priority of all frameworks within the frameworks collection. The oXygen version is 14.1.
In the CSS, in case a) the element has no attribute whereas in case b) the type attribute is specified
Code: Select all
/* Example for a) */
mentioned{
font-style:italic;
-oxy-placeholder-content:"placeholder XY";
}
Code: Select all
/* Example for b) */
mentioned[type="Z"]{
font-style:italic;
-oxy-placeholder-content:"placeholder Z";
}
If I create a new, arbitrary file not using the template of my framework and add the elements <mentioned> and <mentioned type="Z">, the styling of both options is correct, the CSS works.
Maybe there's a problem with the preferences of my framework?
Thanks,
Franziska