I haven't seen a proper course. In fact I haven't seen a proper course on HTML either. It's sort of like learning how to play chess or a real world language. But you can learn the foundations part by part.
If I find a snippet on SO that I don't fully understand, I check it with CSS Tricks' Almanac, like I would with checking an unknown word against a dictionary.
CSS Tricks seem to cover it very well, and the almanac explains it in detail. A good place to start might be here: https://css-tricks.com/snippets/css/a-guide-to-flexbox/
If I find a snippet on SO that I don't fully understand, I check it with CSS Tricks' Almanac, like I would with checking an unknown word against a dictionary.