Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Issues
  • #20118
Closed
Open
Issue created Jun 14, 2016 by Administrator@rootContributor

Customising the Icon Color for Custom Controls

Created by: analog-nico

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.

Assignee
Assign to
Time tracking