Automatic calculate size of items