Merge pull request #694 from nextcloud/scss-usage

Scss documentation
This commit is contained in:
Morris Jobke
2018-02-27 15:00:12 +01:00
committed by GitHub

View File

@@ -10,13 +10,19 @@ The CSS files reside in the **css/** folder and should be included in the templa
<?php
// include one file
style('myapp', 'style'); // adds css/style.css
style('myapp', 'style'); // adds css/style.(s)css
// include multiple files for the same app
style('myapp', array('style', 'navigation')); // adds css/style.css, css/navigation.css
style('myapp', array('style', 'navigation')); // adds css/style.(s)css, css/navigation.(s)css
// include vendor file (also allows array syntax)
vendor_style('myapp', 'style'); // adds vendor/style.css
vendor_style('myapp', 'style'); // adds vendor/style.(s)css
.. note:: Since the version 12 of Nextcloud, we support ``SCSS`` 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: