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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, this works as expected.
Only the number
0is an exception, it is allowed in the spec. But other numbers are not allowed forlengthproperties. This had me confused.Please close this bug as invalid; I am not able to close it myself.
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.