add css switch support