I am trying to understand how wordpress works. but i am having issue understanding how wp_enqueue_style(), wp_enqueue_script() works in relation to page output.
From my understanding, these functions do not output anything to the page until the template have been loaded because the template might want to register a style/script.
Going through wordpress themes files, i noticed that most of them use echo statements.
So, how does wordpress manage styles, when a particular template might register a style at the end of the theme. Remember that, css styles at always at the top, so logically wp_enqueue_style should have been called or am i the one being illogical?
Read more here: Understanding wp_enqueue_style