CLN: simplify Styler copy mechanics and tests
checks an items off #40675 

The current mechanics are unstructured and the tests is not future proof (if new attributes are added tests will not pick these up and fail). This PR generalises the construction and future proofs the tests. No user facing cahnge.
