Just put it in quotes:
<p data-bind="text: property, css: { 'with-dash': property().length > 0 }"></p>
Here’s an updated fiddle.
As a side note, you don’t need the > 0 since a length of 0 will evaluate to false, and any other length will evaluate to true:
<p data-bind="text: property, css: { 'with-dash': property().length }"></p>