How do I load it before the parent theme?
I think you are doing it right. If the parent theme is attaching the function responsible for enqueueing its styles to the wp_enqueue_scripts
hook, then your bla_enqueue_child_theme_styles()
function must be being executed first (because you passed -20
as priority) and your styles should be being included first in the page’s source code.
The fact that Materialize’s CSS rules are overriding the parent theme’s may not be related to the order in which the stylesheets are being included, but to the specificity of the selectors being used in those stylesheets.
Cake is likely to be using some kind of CSS framework as well, either one developed by a third party or a custom one. In that case, is very likely that both Cake and Materialize are trying to solve the same problems, but using different methods, creating conflicts in the process.