Menu

#63 Dimension-less values are not accepted

wont-fix
nobody
None
1
2014-12-14
2014-12-10
mercury
No

A rule such as:

  div {
     right: 10;
  }

doesn't work, because right: 10 isn't accepted. However, right: 10px works fine.

Discussion

  • mercury

    mercury - 2014-12-11

    Sorry, this works as expected.

    Only the number 0 is an exception, it is allowed in the spec. But other numbers are not allowed for length properties. This had me confused.

    Please close this bug as invalid; I am not able to close it myself.

     
  • Radek Burget

    Radek Burget - 2014-12-14

    You're right, non-zero values should not be accepted without a unit. However, some browsers do accept dimension-less values as pixel lengths at least in some compatibility modes. Therefore, there is the CSSFactory.setImplyPixelLength(boolean b) function that should switch the parser to the 'quirks' mode where the dimension-less values are accepted.

     
  • Radek Burget

    Radek Burget - 2014-12-14
    • status: open --> wont-fix
     

Anonymous
Anonymous

Add attachments
Cancel