var cssFile = document.createElement('link'); cssFile.rel = 'stylesheet'; cssFile.href = "styles.css"; // or path for file {themes('/styles/mobile.css')} document.head.appendChild(cssFile); // append css to head element