Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#51 Issue with cascaded properties

0.9.17
closed
RBRi
None
1
2016-05-14
2014-07-28
srn
No

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.

Discussion

  • srn

    srn - 2014-07-28
    • summary: Cascaded properties --> Issue with cascaded properties
     
  • srn

    srn - 2014-07-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -8,7 +8,7 @@
    
     a call to:
    
    -declaration.getPropertyCSSValue(property).getCssText() 
    +declaration.getPropertyCSSValue("background").getCssText() 
    
     results in "rgb(0, 0, 0)", which is the first property. This is in v0.9.14.
    
     
  • RBRi

    RBRi - 2015-03-25
    • Group: 0.9.15 --> 0.9.16
     
  • RBRi

    RBRi - 2015-04-17
    • status: open --> accepted
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2015-04-17

    did some tests with ff; ff overwrites the first background with the second

     
  • RBRi

    RBRi - 2015-04-17

    Have implemented the overwrite behavior;
    a new snapshot build is available;
    please check if this solves your problems.

     
  • RBRi

    RBRi - 2015-04-17

    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
  • RBRi

    RBRi - 2015-04-17
    • status: accepted --> pending
     
  • RBRi

    RBRi - 2015-06-03
    • Group: 0.9.16 --> 0.9.17
     
  • RBRi

    RBRi - 2015-06-03
    • Group: 0.9.17 --> 0.9.16
     
  • RBRi

    RBRi - 2015-06-03
    • status: pending --> closed
    • Group: 0.9.16 --> 0.9.17
     
  • RBRi

    RBRi - 2015-06-03
    • status: closed --> pending
     
  • RBRi

    RBRi - 2016-05-14
    • status: pending --> closed
     
  • RBRi

    RBRi - 2016-05-14

    No more feedback here. Will close this

     

Anonymous
Anonymous

Cancel  Add attachments