# Skins and Styles for ILIAS The total representation of ILIAS graphical user interface is defined by its skin and style. The skin contains all the necessary files (CSS/SCSS, images, icons, fonts, templates) to determine the visual appearance of ILIAS. A skin contains one or more Styles, which may differ in colors, fonts, spacing and other visual aspects. The default skin of ILIAS is called Delos and contains one Style also called Delos. ## ILIAS System Style DELOS The template folder of ILIAS contains the CSS/SCSS files and templates, which are necessary to build the default system style of ILIAS called Delos. Due to the new build process of ILIAS, the fonts, images and icons are no longer part of this folder. They are now initially located in the components/ILIAS/UI/resources folder and copied to the public/assets folder during the build process. All template files are still located in the templates folder of each component. All files together determine the visual appearance of ILIAS. They differ from content styles, which allow the classes determining the appearance of user-generated content to be adjusted. ## Custom Skins and Styles System styles may be customized by creating custom skin and style. Custom skins must be placed in the directory `./public/Customizing/skin`. A custom skin has to contain at least one style and may include further sub-styles. The sub-styles may be active for different branches of the repository. ### Tools The ILIAS default system style called Delos is written in SCSS, which has to be compiled using the SASS pre-processor to a CSS file that the browser can read. For any larger scale styling project, we recommend that you consider using SASS as well. This way, you can build on and modify all the work that has been done by the community to style the many views and components used in ILIAS. You may want to use the same version of SASS that is referenced in the NPM package.json and automatically installed to `node_modules/` when using `npm install`. This specific SASS version can be executed like this from the ILIAS root: `node_modules/.bin/sass` Alternatively, you can install the latest version of SASS globally with `npm install sass -g`. You can find a starting point for a custom System Style based on the default Delos system style here: [Delos Repository](https://github.com/ILIAS-eLearning/delos) At the point of writing, it does require modification to be recognized as a custom System Style as outlined later in this document. ### Access available skins and Styles through Frontend 1. Navigate to "Administration -> Layout and Styles" of you ILIAS Installation. 2. In a table you see all available System Styles. 3. You may assign users to styles via Actions Dropdown 4. You may set Sub Styles for certain sections of the repository via Actions Dropdown # Creating a custom skin and style ## Quick-Build from the delos repository ### Step 1: Create skin directory If you want to create a new skin quickly, you can use the delos repository as a starting point. To do so, first go to the directory `./public/Customizing/skin`. ``` cd ./public/Customizing/skin ``` ### Step 2: Clone delos repository Then clone the delos repository from GitHub into a new directory, e.g. `MyDelosSkin`. Please note that the correct branch must be selected to match the ILIAS version being used. ``` git clone https://github.com/ILIAS-eLearning/delos.git MyDelosSkin ``` ### Step 3: Switch to correct branch To switch to the correct branch you have to change into the skin directory and switch to the branch you need, e.g. release_10 for ILIAS 10.xx: ``` cd MyDelosSkin git switch release_10 ``` ### Step 4: Finish Now the skin is ready to be used and you can activate it in the ILIAS administration. > **Note:** > The Delos repository contains all CSS, templates, and resource files in their latest > versions. Template changes can lead to malfunctions, so it is recommended to update > custom skins immediately after an ILIAS update. > **Note:** > It's not recommended to modify the delos.css directly. Instead, modify the SCSS files > and compile with sass pre-processor. ## Create a custom skin from scratch ### Step 1: Create skin directory If you want to create a new skin from scratch, you have to go to the skin directory in the public folder. In the skin folder you have to create a new subdirectory for your skin, e.g. MySkin. ``` cd ./public/Customizing/skin mkdir MySkin ``` ### Step 2: Create template.xml File One file that must exist in every skin is the file template.xml. E.g. `./public/Customizing/skin/MySkin/template.xml`. This file contains all necessary information about the skin and its styles. An example file could look like this: ```