CSS

The CSS files reside in the css/ folder and should be included in the template:

  1. <?php
  2. // include one file
  3. style('myapp', 'style'); // adds css/style.(s)css
  4. // include multiple files for the same app
  5. style('myapp', array('style', 'navigation')); // adds css/style.(s)css, css/navigation.(s)css
  6. // include vendor file (also allows array syntax)
  7. vendor_style('myapp', 'style'); // adds vendor/style.(s)css

Note

SCSS is supported natively. You can migrate your files by simply renaming your .css files to .scss. The server will automatically compile, cache and and serve it. The priority goes to the scss file. So having two file with the same name and a scss & css extension will ensure a retro compatibility with <12 versions as scss files will be ignored by the server.

Web Components go into the component/ folder and can be imported like this:

  1. <?php
  2. // include one file
  3. component('myapp', 'tabs'); // adds component/tabs.html
  4. // include multiple files for the same app
  5. component('myapp', array('tabs', 'forms')); // adds component/tabs.html, component/forms.html

Note

Keep in mind that Web Components are still very new and you might need to add polyfills