How to change buttons colours using class names and CSS

0
Hi everyone bit of a newbie to Mendix’s way of styling using CSS and have been trying to use guides found online to make this work but they all seem to be out of date now. I’m trying to create a class name for a button for example “button-custom” and then use this over multiple buttons to change the colour. However any guides I’ve found that shows how to do this says to go to “\Documents\Mendix\Test\theme\styles\web\css” and find the custom.css file and edit that with the colour changes I want to make: “.button-custom {     background: red;     border-color: red; }” but I can’t find this file anywhere and any of the files that I edit with that CSS code isn’t changing the colour of the button. Below is a picture of what my directory looks like I was just wondering if anyone can please explain what file I need to be editing to get this to work or if there is an update guide for Mendix 8.8?
asked
1 answers
2

Hi Nathan,

You can add your class(button-class) with custom styles inside the main.css file, it will work as your expectation.
The best way to add your custom styling is to add the new class inside the custom.scss file which will be available in the following folder inside your project theme/styles/web/sass/app/custom.scss and compile your project file using css compiler
Here is one css compiler documentation : https://docs.mendix.com/howto/front-end/calypso

Thanks! 

answered