As I understand astronomy, planets formed as follows. Heavy elements created in supernova are blown into interstellar space.
Eventually, gasses, including a small proportion of heavy elements, condenses out of interstellar space into clouds that collapse under their own weight and steadily increase in density. Big clouds get hot and dense enough to ‘ignite’ and become stars. Smaller clouds become planets. A small cloud that is near a star has the light elements boiled off and ends up as a small rocky planet like Earth, other small clouds hold on to their light gasses and end up as large gaseous planets like Jupiter.
Fine, but there must be some minimum size for an object to be to condense out as something solid because gravity is a very weak force. Something small like a comet has very little mass – presumably it originated as a very small cloud - but how did it get to be compact? I know that comets do break up from time to time, but they must be reasonably solid bodies to survive the rigours of a highly elliptical orbit and to have the fissures discovered from which they outgas. So, how do comets form?
Also, what about interstellar dust? Unless I have misunderstood, this is made up of tiny solid particles that exist in enormous clouds in deep space. How can a grain of dust form from basic gaseous elements?