I'm struggling with a something that I called mosaic, because in my opinion is not a pure adaptive grid, but I'm not UX/UI master.
The best way to explain desired result is a blueprint, but what I have achieved is a regular grid layout which doesn't fit my needs.
In few words I tried to implement with flexbox concept(display: flex; flex-direction: row; flex-wrap: wrap;).
I do not think that I need to share my code, because I have chosen inappropriate method. Please, give me the basic idea. By this point, I have come to the conclusion that this can only be achieved with javascript.