Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

colors: does not support dashes in theme names #8755

Open
zeruel01 opened this issue Jun 13, 2016 · 9 comments
Open

colors: does not support dashes in theme names #8755

zeruel01 opened this issue Jun 13, 2016 · 9 comments
Labels
P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient type: bug type: docs ui: theme
Milestone

Comments

@zeruel01
Copy link

Actual behavior:

and it got solved, but i wanted to have dynamic themes and it broke

  • What is the expected behavior?
    changing a theme should override the colors of the md-colors based on their values ej { 'background': 'primary-100' } should be a primary of my current theme

CodePen or Steps to reproduce the issue: *
http://codepen.io/zeruel01/pen/ezZVQZ

i got this error i dont know if it helps
http://prntscr.com/bg09k1

  • Angular Version: 1.5.5
  • Angular Material Version: master 11/06/2016

Additional Information:

  • Browser Type: * chrome
  • Browser Version: * lastest
  • OS: * windows 10

could you help me alittle maybe im missing something ? or it really is an error

@EladBezalel
Copy link
Member

@zeruel01 actually this is an interpolation error of mdColors which splits the expressions by -
when you added -theme to your theme you actually failed mdColors
here's a working version.

@topherfangio do you think we should support this edge case?

@zeruel01
Copy link
Author

i see, let me check i still cant understand what did you change, so its a naming issue ?

@topherfangio
Copy link
Contributor

@EladBezalel Correct me if I am wrong, but this appears to fail on any theme that has a dash in it. I think we should support themes like deep-purple, etc. without it failing.

Am I understanding the problem correctly?

@EladBezalel
Copy link
Member

We do support two word themes, but only two words 😅

@zeruel01
Copy link
Author

weird, i wanted to use all the colors included deep-purple or renamed ones
this is kinda specific but i hope you could help me with it

@EladBezalel
Copy link
Member

The problem with your code is that we currently doesn't support dashes in theme name with mdColors

deep-purple and others are available as palettes

@ThomasBurleson
Copy link
Contributor

@EladBezalel - we should either fix this OR document it.

@EladBezalel
Copy link
Member

@ThomasBurleson fixing it will make us write a recursive function that takes each part and check if it's a theme, we can do it but it sounds like an overkill to me.

docs is another option :)

@zeruel01
Copy link
Author

zeruel01 commented Jun 22, 2016

overkill is the best kill 💥
i understand , i will remove slashes and custom names on my project for a while ✌️
hope you could fix it

@ThomasBurleson ThomasBurleson modified the milestones: 1.1.0, - Backlog Nov 29, 2016
@Splaktar Splaktar changed the title mdColors: Dynamic expression breaks when theme is dynamic colors: dynamic expression breaks when theme is dynamic Aug 17, 2018
@Splaktar Splaktar changed the title colors: dynamic expression breaks when theme is dynamic colors: does not support dashes in theme names Aug 17, 2018
@Splaktar Splaktar added type: bug severity: inconvenient P4: minor Minor issues. May not be fixed without community contributions. labels Aug 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P4: minor Minor issues. May not be fixed without community contributions. severity: inconvenient type: bug type: docs ui: theme
Projects
None yet
Development

No branches or pull requests

5 participants