Topic: Please help customizing theme
I'm trying to customize a new theme changing default values for example buttons and input elements or forms if you like. What I have discovered so far is that the _custom-variables.scss file only changes values made by MDB, not an original bootstrap. So if I'll put there $border-radius-base: 0, buttons and some other elements are getting this value except the form elements, eg input, select etc...
After hours of digging inside all files, I have copied bootstrap scss files in root scss folder of mdb, and included seperate custom.scss file at the beginning for bootstrap itself, and now $border-radius variable is working. But... it seems I'm doing it wrong anyways. There must be some other, official approach of doing this.
_custom_variables.scss (for buttons etc.) $border-radius-base: 0;
_custom_variables-bs.scss (for bootstrap forms) $border-radius: 0; $border-radius-lg: 0; $border-radius-sm: 0;
Is there way to change original bootstrap values without copying these files?
Any ideas?
Marcin Luczak staff answered 4 years ago
Hi,
As this post seems to be related to your previous question: https://mdbootstrap.com/support/jquery/change-border-radius-for-all-elements-using-sass/ I can tell that also in this case you can overwrite default MDB and Bootstrap value by using !important
declaration, inside _custom-variables.scss
file:
$border-radius: 0 !important;
Just please make sure you are using any type of file bundler to compile your .scss
files.
Regards, Marcin
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Free
- Premium support: No
- Technology: MDB jQuery
- MDB Version: 4.19.1
- Device: PC
- Browser: Firefox
- OS: Windows
- Provided sample code: No
- Provided link: No