Adding proper ellipsis and flattening css