Move md-cell display logic to css

Which technically is less code, allow nice css extension (never hide md input) , 
and should allow to share more code between code and text cell later.