@Random Penguin Looking at the bookface_custom_footer code from your repository, I'd encourage you to create a template in your addon where you build the custom CSS tag using variable interpolation. This way you don't have to care about sanitization, it will be taken care of by Smarty and you won't have to do this kind of risky string concatenation.
If an addon allows admin to add custom CSS/JS then it would have to allow user input as is in such a footer hook, but it isn't the case for your addon where config values govern individual CSS keys, which means it can be taken care of by a template.