Is it possible to de-select a variant once selected?

I’m wondering if it’s possible to de-select a variant once it has been selected.

E.g.
I click on size large, this selects it.
I click on size large again, this de-selects it.

Many thanks