There is a disturbing amount of mis-information in this thread. As a sibling commenter writes, deposits have nothing to do with capital.
The Basel regulations are, as the term "risk-weighted assets" which you quoted implies, about the riskiness of assets of the bank.
NB: Loans made by a bank are assets of the bank, and they are risky, that is why Basel regulations are relevant. The corresponding liabilities of the bank are the money that is created in the debtor's accounts when the loan is made. But those liabilities are not part of the Basel computations, because Basel is about risky things. Risks do not come from liabilities, because liabilities are known, certain quantities. Risk only comes from assets.
When a risky asset has to be written off (e.g. loan goes bad), then the asset side of the bank's balance decreases. This is offset by an equal decrease on the liability side of the bank's balance. To be precise, the bank's capital is reduced (yes, capital is a liability).
This makes sense because capital represents the "liability" that the bank has towards its owners. When the bank makes bad decisions, the owners are supposed to pay for it in properly implemented capitalism.
When capital goes below zero, the bank goes bankrupt. Therefore, the ostensible goal of the Basel regulations is to ensure that capital never goes below zero (or, at least, that a lot has to go wrong before that happens).
This is why a risk-weighted sum of the bank's asset (the things that can go bad) is compared to capital (the only liability that can be legitimately decreased).