Reputation: 1
Question:
How can I change the color of an UIkit icon? Specifically, I want to change the background color of the check box icon.
Here's a link to the UIkit Form documentation.
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.40/css/uikit.min.css" />
<input style="color:red" class="uk-checkbox" type="checkbox">
I want to change the color of the background.
Upvotes: 0
Views: 2124
Reputation: 2489
input.uk-checkbox {
background-color: red;
}
input.uk-checkbox:checked {
background-color: red;
}
input.uk-checkbox:checked:focus {
background-color: red;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.40/css/uikit.min.css" />
<input class="uk-checkbox" type="checkbox">
Because the UIkit applies styling using their framework you wil have to overwrite.
So they use .uk-checkbox {background-color: red;}
, just target from the input as above , input.uk-checkbox {background-color: red;}
.
Upvotes: 2