Move styles logic to an extension.