Customizing CSS for the administration interface
The Kentico Xperience administration interface is styled using the Bootstrap framework, based on a series of LESS stylesheets.
If you need to extend or override the styling of the administration interface (for example when developing a custom module), add your custom styles into the custom.less file in the App_Themes\Default\Bootstrap folder of your administration web project.
Note: The custom.less file is explicitly intended for customization, and is never modified by upgrades or hotfixes.
Compiling the LESS code
Modifying LESS files does not have an immediate effect on the styles in the administration interface. You also need to compile the LESS code into CSS files, which are then linked into the administration interface pages.
For example, you can use Visual Studio and the Grunt task runner to set up automatic LESS compilation:
- Download the Gruntfile.js and package.json files.
- Copy both files into the CMS folder of your administration web project.
- Open your solution in Visual Studio.
- Include the new files into the CMSApp project:
- Click Show all files at the top of the Solution Explorer.
- Select the Gruntfile.js and package.json files.
- Right-click one of the files and select Include in Project.
- Right-click package.json and select Restore Packages.
- Wait until the required packages are installed.
- Save the CMSApp project.
- Close and then reopen the solution.
You can now see a watch task in the Visual Studio Task Runner Explorer. When you modify the custom.less file, the styles are automatically compiled into the CSS that is applied to the administration interface.