Load custom css in functions.php causing library issue

If you are echoing this code straight from functions.php it would output way before anything else. It is too early in the load process.

In most cases enqueue API functions should be used to output assets.

Outside of that it is impossible to guess what precisely might it be breaking and how. Examining browser console for errors and such might net some information to go on.