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

Commit

Permalink
feat(theming): warn for same palette as primary and accent
Browse files Browse the repository at this point in the history
closes #1254
  • Loading branch information
rschmukler committed Jan 22, 2015
1 parent dd5b954 commit 1c97333
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/core/services/theming/theming.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,10 @@ function generateThemes($injector) {
THEME_COLOR_TYPES.forEach(function(colorType) {
styleString += parseRules(theme, colorType, rulesByType[colorType] + '');
});
if (theme.colors.primary.name == theme.colors.accent.name) {
console.warn("$mdThemingProvider: Using the same palette for primary and" +

This comment has been minimized.

Copy link
@gkalpak

gkalpak Jan 22, 2015

Member

log should be used instead of console.

"accent. This violates the material design spec.");
}
});

// Insert our newly minted styles into the DOM
Expand Down

0 comments on commit 1c97333

Please sign in to comment.