contradiction in ripple calculation for buck converter
If the current flows through the capacitor then it will charge the capacitor and the voltage will rise, that is the voltage ripple that is being calculated.
That is why it is first calculated as the charge transferred in a cycle, since a capacitor has a direct relationship between charge and voltage.