About changing the style of checkbox


Topic: About changing the style of checkbox

wuohyeah pro premium priority asked 4 months ago

https://mdbootstrap.com/docs/vue/forms/checkbox/

I want to reverse the color in checkbox style, is there any possible way to do that? Here are the screenshots below:

Expected behavior Expected style: enter image description here

Actual behavior Actual style: enter image description here

Resources (screenshots, code snippets etc.)


Bartosz Cylwik staff answered 4 months ago

Hi! You can play around the css styles for the .form-check-input[type=checkbox]:checked class and its after and before pseudoclasses

for example

.form-check-input[type=checkbox]:checked {
    background: transparent
}

.form-check-input[type=checkbox]:checked::after, .form-check-input[type=checkbox]:checked::before {
    border-color: blue;
}

You may also want to change the style on focus state. Best Regards!


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Vue
  • MDB Version: MDB5 5.0.0
  • Device: PC
  • Browser: chrome
  • OS: windows11 pro
  • Provided sample code: No
  • Provided link: Yes
Tags