Fix assert_styles() to handle negative values