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

Share methods to set the theme color classes #2394

Closed
devversion opened this issue Dec 24, 2016 · 3 comments
Closed

Share methods to set the theme color classes #2394

devversion opened this issue Dec 24, 2016 · 3 comments
Assignees
Labels
refactoring This issue is related to a refactoring

Comments

@devversion
Copy link
Member

devversion commented Dec 24, 2016

We need to find a way to share the methods, which apply the theme color classes on the components.

Right now we are repeating the same methods for each component.

  • Also we should have a type for the color values like primary | accent | warn
@devversion devversion self-assigned this Dec 24, 2016
@devversion devversion added the refactoring This issue is related to a refactoring label Dec 24, 2016
@david-kerwick
Copy link

Would it be possible to expose this globally so we could use it in any component?
I'm following https://github.com/angular/material2/blob/master/guides/theming-your-components.md at the moment, but it means I need to stick the imports on top of all the components. Having access to a global primary | accent | warn would be great

@devversion
Copy link
Member Author

Would be weird to have a shared code for the theme classes- because we would need our renderer from the DI in that utility. Let's revisit this later.

@devversion devversion reopened this Feb 9, 2017
devversion added a commit to devversion/material2 that referenced this issue Feb 9, 2017
* Currently Angular Material supports Angular v2.2.0, but some components already use methods that are only available in `v2.3.0`.
  This means that Material isn't really compatible with v2.2.0 anymore.

* Since Angular `v.2.3.0` includes a lot of good fixes (like proper metadata inheritance) we should upgrade to `v2.3.0`.
  See angular/angular@f5c8e09

Related to angular#2394
devversion added a commit to devversion/material2 that referenced this issue Feb 9, 2017
* Currently Angular Material supports Angular v2.2.0, but some components already use methods that are only available in `v2.3.0`.
  This means that Material isn't really compatible with v2.2.0 anymore.

* Since Angular `v.2.3.0` includes a lot of good fixes (like proper metadata inheritance) we should upgrade to `v2.3.0`.
  See angular/angular@f5c8e09

Related to angular#2394
devversion added a commit to devversion/material2 that referenced this issue Feb 10, 2017
* Introduces a new `MdThemeable` base class that can be extended by different components to automatically support the `color` input.

* This reduces a lot of repeated code in the different components and it also simplifies maintaining.

Closes angular#2394.
devversion added a commit to devversion/material2 that referenced this issue Feb 10, 2017
* Introduces a new `MdThemeable` base class that can be extended by different components to automatically support the `color` input.

* This reduces a lot of repeated code in the different components and it also simplifies maintaining.

Closes angular#2394.
tinayuangao pushed a commit that referenced this issue Feb 10, 2017
* Currently Angular Material supports Angular v2.2.0, but some components already use methods that are only available in `v2.3.0`.
  This means that Material isn't really compatible with v2.2.0 anymore.

* Since Angular `v.2.3.0` includes a lot of good fixes (like proper metadata inheritance) we should upgrade to `v2.3.0`.
  See angular/angular@f5c8e09

Related to #2394
devversion added a commit to devversion/material2 that referenced this issue Mar 20, 2017
* Introduces a new `MdThemeable` base class that can be extended by different components to automatically support the `color` input.

* This reduces a lot of repeated code in the different components and it also simplifies maintaining.

Closes angular#2394.
@devversion devversion removed the has pr label May 8, 2017
@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
refactoring This issue is related to a refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants