Fix and test parsing of number values; fix bug when getting contrast rat...

...io properties where elements without a text node as first child were being ignored