It is possible to have this effect automatically using Conditional Styles. This functionality allows a single style to take on the attributes of other styles depending on the context.