How to change the color of the checkmark in a checkbox

For support and discussion related to templates, themes, and imagesets in phpBB 3.2.
Post Reply
User avatar
durangod
Registered User
Posts: 789
Joined: Tue Nov 03, 2009 1:26 pm
Location: USA East Texas
Name: Dave

How to change the color of the checkmark in a checkbox

Post by durangod »

Hi i have a light grey checkmark in my checkbox's and i cant see it with my old eyes. How do i change the color to black.

here is what i have tried in the forms.css file


input[type="checkbox"]:checked {
color: #000000;
}


and


input[type="checkbox"]:checked {
background-color: #000000;
}


and



input[type="checkbox"] {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
height: .8rem;
width: .8rem;
background-color: #fff;
}
input[type="checkbox"]:checked {
background-color: #000000;
}


and i cleared my cache but it wont change... how is this done please :) thanks
Username is short for durango d (durangodave)
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: How to change the color of the checkmark in a checkbox

Post by Lumpy Burgertushie »

viewtopic.php?p=14210311#p14210311

maybe that will help.

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
Hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 1065
Joined: Wed Dec 30, 2009 8:14 am
Name: Michael Miday
Contact:

Re: How to change the color of the checkmark in a checkbox

Post by Hanakin »

this is not possible simply as the checkbox is a browser restricted element https://stackoverflow.com/questions/243 ... tever-i-do.

The only way to do it is to replace the default checkbox with a custom one as I have done here https://github.com/hanakin/base-l/blob/ ... .scss#L185 see it in action here https://codepen.io/hanakin/pen/XYpawP
Post Reply

Return to “[3.2.x] Styles Support & Discussion”