Custom css is not processed by browser (local)

0
Hi I made several changes in the custom css see in local project folder and saved it. after I deploy again and run locally..i see that the browser still uses the unchanged custom.css...without my changes....how is this possible? what should I do?
asked
8 answers
1

Is the custom.css file included in the index.html you are using?

You need something like this:

 <link rel="stylesheet" href="css/custom.css">

Furthermore (it happend with me a few times) make sure you are editing the right css file in the project folder and not the css of a branch line of that project e.g. =)

answered
1

Are you by any chance using SASS to manage your css files? If so changes made manually to your custom.css might be overwritten (you need to make the changes in the SASS source files)

answered
1

Most times something weird like this happens with theming files the actual theme that is selected in the modeller (see Project settings -> Model -> Theme) is not the same one you're working on. So best to always check if the selected theme is (Default), which means the root of the theme folder is used as input, or a zip file in the theme folder, which means a theme package is selected.

I very much recommend working in the default root by the way and only use packages if you longer need to edit your theme.

answered
1

This explains the relationships between the folders and files:

http://www.mxblog.nl/2016/03/using-sass-with-mendix/

answered
0

I found it...I changed deployment\web\styles\css\custom.css and now it is processed.

i dont get the working though...the theme custom.css makes each time with a deployment a new custom.css in deployment folder?

answered
0

Perhaps this has got to do with browser-caching. Search Google on how to refresh cache(reload without cache) in your specific browser.

answered
0

I tried deleting the cache. But did still not work. Could it be something with syncing files with TortoiseSVN?

What I do is ProjectFolder-main\theme\styles\css\custom -> I adjust in notepad++ and save it. I see the changes. but when I redeploy the app locally ProjectFolder-main\deployment\web\styles\css\custom -> here are not the changes processed (which is visible through inspector in browser). If I change this css I see that the my changes are processed (locally), but after a deployment i see that it is gone again (locally).

So something is overwriting this? Do i change the wrong custom.css file in theme?

answered
0

I tried deleting the cache. But did still not work. Could it be something with syncing files with TortoiseSVN?

What I do is ProjectFolder-main\theme\styles\css\custom -> I adjust in notepad++ and save it. I see the changes in the file. But when I redeploy the app locally ProjectFolder-main\deployment\web\styles\css\custom -> here are the changes not processed (which i confirm through inspector in browser). If I change the deployment custom.css I see that the changes are processed (locally), but after a deployment these are gone again (locally).

So something is overwriting this? Do i change the wrong custom.css file in theme?

answered