According to my company theme I want to change blue buttons to red buttons. Any recommendation regarding this customization?
Hope this will help
@Salmanmulani Thanks for your reply but It will change the colors of custom buttons but I want to change the all buttons which are used in ERPNext with blue color. I think you will understand my point of viewâŚ
I can understand if there any solution I found will update you
thanks
Change the color of btn-primary class in desk.min.css
desk.min.css file is auto generated file which is regenerated every time if I change any thing so the change will not be applyâŚAny solution to edit this file I found this file on sites/assets/css/desk.min.css this path⌠Guide me if I wrongâŚdear @shahid
It donât think so that it will auto regenerate every time, and what do you mean by every time? on every update or what?
I have also changed my theme by editing desk.min.css.
You can make a custom app, then add a custom css file to its public folder. E.gâŚ
custom_app/custom_app/public/css/custom.css:
.btn-primary {
background-color: red;
}
Then include that file in custom_app/custom_app/hooks.py
app_include_css = [
"/assets/custom_app/css/custom.css"
]
Then run bench build
Can you clarify me where to make exactly custom_app
give a clarity on this.
Using the below commands:
bench new-app application_name
bench install-app application_name
Regards
Bilal
Ok thank you.
Did it work?
I tried this, but I am not able to have /home/user/frappe-bench/sites/assets/css/desk.min.css updated even after bench build.
I have followed your steps exactly.
Placed the custom.css in /home/user/frappe-bench/apps/custom_app/custom_app/public/css/custom.css
Also created a symbolic link in /home/user/frappe-bench/sites/assets but no difference.
Some understanding on what is the process that takes place to build up desk.min.css and the hierarchy it follows is lacking.
Finally sorted out. Need to create build.json as well. So let me write here how it worked:
hooks.py
app_include_css = [
"/assets/dsr/css/custom.css"
]
custom.css in bench/apps/custom_app/custom_app/public/css
.btn-primary {
background-color: crimson;
border-color: crimson;
}
build.json in bench/apps/custom_app/custom_app/public
{
"css/custom.min.css": [
"public/css/custom.css"
]
}
I need to change the color of the blue buttons to green, the blue ones carry the btn-primary class but I still havenât managed to change the color.
I need help
hi,
try it, it worked for me.
$(â[data-fieldname=general_tab]â).css(âbackground-colorâ, âlightblueâ);
Can you tell me where exactly I change it?
My goal is to change the color of all the blue buttons to green