.. _dev-css: CSS === Tuleap uses Sass for its CSS generation. SCSS files are just extended CSS files. It means you can use variables, functions, operations and more in CSS files very easily. It's fully backward compatible with exiting CSS files (you can rename file.css to file.scss, compile file.scss and it'll just work). Please refer to the `Sass documentation `_ for more information. SCSS files should always go in "themes" folders. * For the core, it should go in ``src/themes/BurningParrot/css/`` * For plugins, it should go in ``plugins//themes/BurningParrot/`` Compile SCSS files ------------------ From the root directory of the Tuleap sources (you must have npm installed): .. code-block:: bash $ npm install $ npm run build This command will compile all SCSS files present in ``plugin`` and ``src`` directories. .. important:: * you have to run ``npm run build`` everytime you edit a SCSS file. * CSS files will be git-ignored so there is no use in modifying them. If you are working in Tuleap "core", change your current directory to ``src/`` to run the "npm" commands. If you are working in a plugin for Tuleap, change your current directory to the "root" of that plugin in ``plugins//`` to run the "npm" commands. While you are working, the following command should help you: .. code-block:: bash $ npm run watch .. important:: ``npm run watch`` will automatically rebuild CSS after changes. Best practices for Tuleap ------------------------- When you submit a patch for review, we may request changes to better match the following best practices. Please try to follow them. Files best practices ^^^^^^^^^^^^^^^^^^^^ * Never use the "style" HTML attribute. * Always use a SCSS file. No