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

Add support for color attribute to checkbox #947

Closed
HeavenlyHost opened this issue Aug 4, 2016 · 6 comments · Fixed by #1463
Closed

Add support for color attribute to checkbox #947

HeavenlyHost opened this issue Aug 4, 2016 · 6 comments · Fixed by #1463
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@HeavenlyHost
Copy link

Bug, feature request, or proposal:

How do I bind the color of the checkbox widget, it does not appear to work and is stuck on accent color ?

What is the expected behavior?

to be able to bind the color property to the something in the parent component

What is the current behavior?

stuck on accent color

What are the steps to reproduce?

try and bind the color to something other other than accent

Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: http://plnkr.co/edit/o077B6uEiiIgkC0S06dd

What is the use-case or motivation for changing an existing behavior?

Which versions of Angular, Material, OS, browsers are affected?

Is there anything else we should know?

@szadrutsky
Copy link

Same for me. I am not able to change color/styles tried to change overriding color matrix in core ... No luck

@HeavenlyHost
Copy link
Author

I suspect this is as designed according to Google Material Design spec. Although I do disagree with this. Need to check specs.

@jelbourn jelbourn changed the title why i can't bind checkbox color Add support for color attribute to checkbox Aug 31, 2016
@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent help wanted The team would appreciate a PR from the community to address this issue labels Aug 31, 2016
@jelbourn
Copy link
Member

The checkbox simply doesn't have this feature yet.

@HeavenlyHost
Copy link
Author

@jelbourn do we have an ETA ?

@plyoung
Copy link

plyoung commented Sep 20, 2016

I figured out a hack for now by making a theme. https://github.com/angular/material2/blob/master/docs/theming.md

$theme2: md-dark-theme($primary, $primary, $warn);
@include md-checkbox-theme($theme2);

Here is the full file to give better idea. Stuff at the end basically.

@import '~@angular2-material/core/theming/theming';
@import '~@angular2-material/core/theming/palette';
@import '~@angular2-material/core/core';
@import '~@angular2-material/button/button-theme';
@import '~@angular2-material/button-toggle/button-toggle-theme';
@import '~@angular2-material/card/card-theme';
@import '~@angular2-material/checkbox/checkbox-theme';
//@import '~@angular2-material/dialog/dialog-theme';
@import '~@angular2-material/grid-list/grid-list-theme';
@import '~@angular2-material/icon/icon-theme';
@import '~@angular2-material/input/input-theme';
@import '~@angular2-material/list/list-theme';
@import '~@angular2-material/menu/menu-theme';
@import '~@angular2-material/progress-bar/progress-bar-theme';
@import '~@angular2-material/progress-circle/progress-circle-theme';
@import '~@angular2-material/radio/radio-theme';
@import '~@angular2-material/sidenav/sidenav-theme';
@import '~@angular2-material/slider/slider-theme';
@import '~@angular2-material/slide-toggle/slide-toggle-theme';
@import '~@angular2-material/tabs/tabs-theme';
@import '~@angular2-material/toolbar/toolbar-theme';
@import '~@angular2-material/tooltip/tooltip-theme';

// Include the base styles for Angular Material core. We include this here so that you only have to load a single css file for Angular Material in your app.
@include md-core();

// Define the palettes for your theme using the Material Design palettes available in palette.scss (imported above).
// For each palette, you can optionally specify a default, lighter, and darker hue.
$primary: md-palette($md-blue);
$accent:  md-palette($md-amber, A200, A100, A400);
$warn:    md-palette($md-deep-orange);

// Create the theme object (a Sass map containing all of the palettes).
$theme: md-dark-theme($primary, $accent, $warn);

// Include theme styles for core and each component used in your app.
@include md-core-theme($theme);
@include md-button-theme($theme);
@include md-button-toggle-theme($theme);
@include md-card-theme($theme);
//@include md-checkbox-theme($theme);
//@include md-dialog-theme($theme);
@include md-grid-list-theme($theme);
@include md-icon-theme($theme);
@include md-input-theme($theme);
@include md-list-theme($theme);
@include md-menu-theme($theme);
@include md-progress-bar-theme($theme);
@include md-progress-circle-theme($theme);
//@include md-radio-theme($theme);
@include md-sidenav-theme($theme);
@include md-slider-theme($theme);
@include md-slide-toggle-theme($theme);
@include md-tabs-theme($theme);
@include md-toolbar-theme($theme);
@include md-tooltip-theme($theme);

// --------------------------------------------------------
$theme2: md-dark-theme($primary, $primary, $warn);
@include md-checkbox-theme($theme2);
@include md-radio-theme($theme2);

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature This issue represents a new feature or feature request rather than a bug or bug fix help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants