Best Practice?: CSS/JS Code in Shortcode

Should custom CSS and/or javascript which deals ONLY with whatever is in the desired shortcode only be shipping within the shortcode? Or should it be in the higher level layout templates? Does it matter?

1 Like

I would try to include it with the shortcode, if possible. I value a lean site, without loading resources unless they are required.

1 Like