I want to specify two slightly different background colors, one for Mac OS, one for Windows.
there is no property to specify OS used to view webpage, but you can detect it with javascript, here is some example for detecting Operating system :
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
console.log('Your OS: '+OSName);
got it?, now you can play with document.write
to write download stylesheet for specific Operating system. :)
another example, i assumed that you are using jquery.
if (navigator.appVersion.indexOf("Win")!=-1)
{
$(body).css('background','#333');
} else {
$(body).css('background','#000'); // this will style body for other OS (Linux/Mac)
}