In an ideal world, you do not need to create plugs for different os. However, sometimes this will require a specific design - especially with style form elements.
If you really need to, the following script will set the class in the html element:
(function (flags, app) {
os('Win', 'os-win');
os('Mac', 'os-mac');
if (document.documentElement) {
document.documentElement.className += flags.join(' ');
}
function os (s, f) { if (app.indexOf(s) !== -1) flags.push(f); }
}([''], String(navigator && navigator.appVersion)));
You can do this in the html header, which means that the page will not be re-rendered after the initial load.
css Mac:
.os-mac
. , .