Do you get war bonus for an attack that you lose?

I just lost an attack in clan war (0 stars), but the status up in the corner says I got some bonus (about a third of what I would get for win).
This was my first attack in the war.

Earlier this has been like that you will get no bonus for an attack that you loose in the war. Has this changed recently?

I am sure that this happened to me, I mainly want to know when this change was introduced, and details about percentages etc. Is it 30% or something if you loose, or is it also dependent on how much of the base you have destroyed (like if you destroy 20%, you will get 20% bonus or something..)?


Solution 1:

It happened to me again. I got 0 stars in a war attack!

This time I noticed that in the status screen after the ended attack, it specifically said that I earned 43% of the war bonus. I also noticed that I had destroyed 43% of the base, so it seems this is directly related to how much of the base is destroyed.

CONFIRMED:
See Clash of Clans Wikia - Clan Wars and scroll down to the War Win Bonus section:

If you get no stars in an attack, you only get a reduced bonus whose percentage is equal to the destruction percentage. For example, an attack of 30% without destroying the Town Hall will give 30% of the full War Win Bonus of this base.