Refactored recomputeStyles events