Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customising the Icon Color for Custom Controls #20118

Closed
analog-nico opened this issue Jun 14, 2016 · 0 comments
Closed

Customising the Icon Color for Custom Controls #20118

analog-nico opened this issue Jun 14, 2016 · 0 comments

Comments

@analog-nico
Copy link

I tried to style the custom checkbox by setting the color of the check mark to black. I expected that setting $custom-control-checked-indicator-color: $body-color; does the job but it doesn't work.

$custom-control-checked-indicator-color is applied to the color attribute of .custom-control-indicator. With that, I think, the author intended to enable what I want to accomplish. Instead, however, the fill attribute of the background SVG image needs to be changed. But $custom-checkbox-checked-icon as well as $custom-radio-checked-icon hardcode fill='%23fff'.

That said, of course I can now overwrite the $custom-checkbox-checked-icon variable and hardcode a different fill value.

But there is a very neat Sass-based solution that allows to automatically compile the icon with the intended $custom-control-checked-indicator-color value: http://codepen.io/noahblon/pen/xGbXdV

The big question now is if the solution is helpful for everyone. For people like me who only want to change the colors it is definitely good. For people who want to use their own SVG icons might get confused when they just want to paste their own SVG string because they have to understand the function.

@mdo mdo added this to the v4.0.0-alpha.5 milestone Sep 12, 2016
mdo added a commit that referenced this issue Sep 12, 2016
@mdo mdo closed this as completed in #20700 Oct 3, 2016
twbs-savage pushed a commit to twbs-savage/bootstrap that referenced this issue Oct 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants