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

bug: sass is erroring when light color is removed #8266

Closed
brandyscarney opened this issue Sep 28, 2016 · 4 comments · Fixed by #8907
Closed

bug: sass is erroring when light color is removed #8266

brandyscarney opened this issue Sep 28, 2016 · 4 comments · Fixed by #8907
Assignees
Milestone

Comments

@brandyscarney
Copy link
Member

When the light color is missing from the $colors map, Sass is throwing the following error:

[20:51:46]  Sass Error: line: 80, column: 3


  The value `` must be a color.
  If you are setting the value as a map make sure
  both the base and contrast are defined as colors.

  For example:

  $colors: (
    primary:    #327eff,
    secondary:  (base: #32db64, contrast: #000),
  );

This should not happen unless primary is removed, and it needs a better description for that use case.

@brandyscarney brandyscarney added this to the 2.0.0-rc.1 milestone Sep 28, 2016
@brandyscarney brandyscarney self-assigned this Sep 28, 2016
@alan-agius4
Copy link
Contributor

alan-agius4 commented Sep 29, 2016

the issue is caused because the light is required because it's being used in the ionic.theme.dark.xx.scss and fab.xx.scss

@brandyscarney brandyscarney modified the milestones: 2.0.0-rc.3, 2.0.0-rc.2 Nov 4, 2016
manucorporat pushed a commit that referenced this issue Nov 7, 2016
…8907)

* fix(sass): remove usage of colors other than primary, improve error

fixes #8266

* refactor(sass): add variables to override all modes for fab and input

* refactor(fab): rename Sass variable from in-list to list-button

BREAKING CHANGE:

- `$fab-<mode>-in-list-background-color` ->
`$fab-<mode>-list-button-background-color`
- `$fab-<mode>-in-list-text-color` ->
`$fab-<mode>-list-button-text-color`
- `$fab-<mode>-in-list-background-color-activated` ->
`$fab-<mode>-list-button-background-color-activated`
@ramoncarreras
Copy link

Same problem, now with danger color.

sass: node_modules/ionic-angular/themes/ionic.functions.scss, line: 109
The map color `danger` is not defined. Please make sure the color exists in your `$colors` map. For example:
    $colors: ( danger: #327eff );

Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-rc.3
Ionic CLI Version: 2.1.12
Ionic App Lib Version: 2.1.7
Ionic App Scripts Version: 0.0.46
ios-deploy version: 1.9.0
ios-sim version: 5.0.11
OS: macOS Sierra
Node Version: v7.1.0
Xcode version: Xcode 8.1 Build version 8B62

@marc-lassiter
Copy link

Did you ever figure this out?

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 1, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants