merge `class` attributes