This is implemented with more general rules:

X op (C ? P : Q) -> C ? (X op P) : (X op Q)

// if X op P and X op Q both simplify

(C ? P : Q) op Y -> C ? (P op Y) : (Q op Y)

// if P op Y and Q op Y both simplify

The tests include some other cases where these more general rules apply.