In this how-to we will go through how to setup the Mendix UI Framework and do our first styling changes by just using CSS.
After completing this how-to you will know:
- How to create a new App
- How to create your own theme with just CSS
- How to make your first styling changes
Before you can start with this how-to, make sure you have completed the following prerequisites.
2. Create a new App in the Mendix Modeler
In this chapter we will create a new app and select a theme from the New App selector.
- Open the Mendix Modeler.
Create a New App from the My Apps screen in the Mendix Modeler.
Select a theme for your app.
You can now deploy your app (F5)
3. Open your project in the text editor
- Open your App Project Folder in your text editor by choice.
Navigate to the folder theme and you will find the css files in the folder styles\css.
There are two subfolders in our styles\css folder.
a. Lib, this folder contains our library file that contains all the default styling from the Mendix UI Framework. It’s best practise to not alter this file.
b. Custom, the custom file contains a preset of CSS elements and a copy of the library file but empty. Here we want to make our custom changes
Let’s open up the custom.css file. We always want to work from this file so we can always look back at the library.css file to see how the original theme used to be.
Let’s change the color of our topbar. Find the CSS element .**region-topbar **as you can see in the screenshot below.
Let’s do a simple change by making the topbar red. Insert the following line as in the example below:
Let’s redeploy our application and look at the result!
Congratulations, you made your first theme change.
4. Related Content
- Scout and Windows 10 Workaround
- Layouts and Snippets
- Filtering Data on an Overview Page
- Setup Mendix UI Framework with just CSS
- Setup Mendix UI Framework
- Setting Up the Navigation Structure
- Setup Mendix UI Framework with Koala
- Creating your first two Overview and Detail pages
- Finding the Root Cause of Runtime Errors