differentiate between JS and CSS float encoding (fixes #1811)