[DON'T MERGE] Rework property getting code in _assert_style_element.

 * Makes the code significantly easier to read.
 * Reduces duplicate code.
 * Runs through get_computed_style better.

# Don't Merge - sending for feedback