Load CSS files in header of Bones theme?

By the time the shortcode is evaluated as part of the_content the header of the site has already been assembled. This makes it impossible to load scripts or styles in the header anymore.

As s_ha_dum suggests you could pre-process the whole post in the head of the file, but that would probably consume more resources than indiscriminately adding the js+css files to the header.

Another, also quite elaborate, approach would be to hook into save_post and set a postmeta flag indicating whether the shortcode is used in the post. You could then read the flag while still in the head and include the js+css files.

tech