compute a style property for an HTML element