One way to easily and abstractly append styles directly to the head is by using a script on window load. However, it is crucial to parse and verify the format of the appended style to prevent any security attacks. By adding styles in this manner, you are essentially granting every web user access to manipulate your stylesheet directly from the head section.
window.onload = function() {
if(document.location.search.indexOf('style=')>-1) {
var style = decodeURI(document.location.search.substring(document.location.search.indexOf('style=') + 6));
if(style.indexOf(',')>-1) { style = style.substring(0,style.indexOf(',')); }
var elem = document.createElement('style');
elem.type='text/css';
elem.innerHTML = style;
document.head.appendChild(elem);
}
};
Another approach is to add style modifications through the URI parameter like
?style=body{background-color:blue;}%20b{color:red;}