I think the problem with you example is that you are, effectively, trying to make two :after pseudo-elements on the same div…one with
.grid and a second with
Therefore it doesn’t work.
You would need some other clearfix method
Of course, you don’t actually need this method at all when you could just do this..