CSS calc() function test. DOM operations.

This button has width of its longest option: , click on it to switch its state.

In classic CSS, even with calc(), such functionality is not achievable.

button.with-text 
{
  border:1px solid red; 
  width: calc( max( text-width( self.child(1):value ),
                    text-width( self.child(2):value ) ) );
}