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: Setting filter: brightness outputs an error in cli #5542

Closed
lordgreg opened this issue Feb 20, 2016 · 1 comment
Closed

bug: Setting filter: brightness outputs an error in cli #5542

lordgreg opened this issue Feb 20, 2016 · 1 comment
Assignees
Milestone

Comments

@lordgreg
Copy link

Type: bug

Ionic Version: 2.x

Platform: all

I have this scss for one div in my file:

    .bg {
      padding: 0;
      background-image: url('../../assets/images/bg-placeholder.jpg');
      background-size: cover;
      background-repeat: no-repeat;
      background-color: black;
      position: absolute;
      width: 100%;
      height: 100%;
      filter: brightness(0.5);
      background-size: cover;
    }

This error gets printed in CLI:

 ✗ node_modules\ionic-framework\util\functions.scss
Error: argument `$color` of `red($color)` must be a color

       Backtrace:
        node_modules/ionic-framework/util/functions.scss:6, in function `red`
        node_modules/ionic-framework/util/functions.scss:6, in function `brightness`
        app/app.scss:49
        on line 6 of node_modules/ionic-framework/util/functions.scss
>>   @return (red($color-value) * 0.299 + green($color-value) * 0.587 + blue($col
   -----------^

As soon as I remove the filter: brightness(0.5); part, it starts working. If I select any other filter (opacity, blur,..) it works.

@Ionitron Ionitron added the v2 label Feb 20, 2016
@adamdbradley
Copy link
Contributor

Ok, it's because of a brightness sass function that I recently added, so Sass is using it instead of just the css value. I'll rename the sass function to fix this, thanks.

@adamdbradley adamdbradley self-assigned this Feb 21, 2016
@adamdbradley adamdbradley added this to the 2.0.0-beta.2 milestone Feb 21, 2016
adamdbradley added a commit that referenced this issue Feb 21, 2016
Prefix custom sass color functions with color-
Closes #5542
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 7, 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

No branches or pull requests

3 participants