Hang on a minute. If you are paying the deposit 50:50 then it completely depends when this theoretical split happens as to what is fair.
The maths is a bit complicated at this time on a Saturday morning but the closer you are to the start of this mortgage the closer the split should be to 50:50 because the deposits were 50:50 and in the early years not much of the capital will have been repaid. A split that just divides the original deposits 50:50 and the rest in proportion to mortgage split would be massively biased to A and unfair to B.
In the event of a split, the amount received post-sale after deduction of all fees is made of:
[Amount still owed to bank] + [original deposit] + [capital contributions made] + [increase in house value]
Capital contributions made are only a fraction of the monthly payments, much of which is interest.
Say that it is being bought for £400k now with a mortgage of £340,000 and a deposit of £60,000 and it is sold when the amount still outstanding is £270,000 but house price rises mean the amount received is £470,000.
By the previous suggestions on this thread A would get £30,000+£85,000=£115,000 and B would get £30,000+£55,000=£85,000 but this is ignoring the fact that the growth on investment is significantly due to expansion grown of the value of the initial deposit which was contributed 50:50
I would say that the deposit is split 50:50, the difference between the amount borrowed and the amount still outstanding is split according to contributions and then the remaining equity is split according to the ratio of those amounts added together.
So the difference in what was borrowed and what was still owed is £70,000
Initially before the rest of the equity is split A gets £30,000+42,500=£72,500 and B gets £30,000+£27,500=£57,500 - that is representative of what each of them actually put in. The remaining £70,000 should therefore be split in the ratio 725:575 which simplifies to 29:23 so A gets a further £39,000ish, total £111,500 and B a further £31,000ish total £88,500
In this example the difference from the simpler system isn't much, but the less house price growth and the higher the amount still outstanding is, the more significant the differences will be.
All that said, once kids are in the picture it all has to change anyway as the contribution to the household of childcare effort is worth a huge amount and any splitting agreement must not penalise a partner for contributing less financially due to having contributed more in other ways.