Did you try Project / Clean deployment directory and empty your cache? Because in pricipal this should work.
Regards,
Ronald
You mentioned that the theme was created in 4.6.1. Unfortunately, you will most likely have to start over with your theme. The upgrade from 4 to 5 introduced major changes to the way elements are structured and the CSS classes that can be targeted.