Currently the cascaded properties are not handled correctly:
Given the CSS declaration:
background: rgb(0, 0, 0);
background: url(img/test.png) no-repeat;
background-size: 190px 48px;
a call to:
declaration.getPropertyCSSValue("background").getCssText()
results in "rgb(0, 0, 0)", which is the first property. This is in v0.9.14.
Cheers.
Anonymous
Diff:
did some tests with ff; ff overwrites the first background with the second
Have implemented the overwrite behavior;
a new snapshot build is available;
please check if this solves your problems.
After doing more testing i decide, simply overwriting is not correct. A consuming application might still need access to all parsed properties/values.
A new snapshot build is available including these changes:
calling getPropertyCSSValue() returns the latest defined value for the provided property; you still have no chance to get all defined values by using this method.
if you like to access all, use the getProperties() method and process all properties your own.
The test method com.steadystate.css.parser.CSSOMParserTest.overwriteProperties() illustrates the details
Last edit: RBRi 2015-04-17
No more feedback here. Will close this