Results 1 to 6 of 6

Thread: ST 2.1.0 RC1 - Naming conflict in _color.scss

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1

    Default ST 2.1.0 RC1 - Naming conflict in _color.scss

    I was using the following scss in my application.scss file.
    Code:
    .x-field-select.x-item-disabled .x-component-outer {  @include filter(brightness(50%));
    }
    Since updating I now get the following response:
    Code:
    error application.scss (Line 15 of _color.scss: 50% is not a color for `red'
    I've traced it down to line 14 of resources/themes/vendor/compass-recipes/stylesheets/recipes/_color.scss

    Code:
    @function brightness($color) {
        $r: red($color) / 255 * 100;
        $g: green($color) / 255 * 100;
        $b: blue($color) / 255 * 100;
    
    
        $brightness: (($r * 299) + ($g * 587) + ($b * 114)) / 1000;
    
    
        @return $brightness;
    }
    It seems to only be used by one another recipe s.scss and is causing a conflict with a CSS3 native property.

  2. #2
    Sencha User Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3

    Default Escaping something in SASS

    I've been trying to figure out a way, in case in the future other properties have this issue I can go about escaping them. Is there any way to escape something in sass so that it won't try and run a function that is named the same?

  4. #4
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159

    Default

    The brightness function takes one parameter which is a color. You are passing it a percentage which is why compass spits an error. It returns the brightness of a specified color.

    If you want to change the lightness of a color, you can use the compass function adjust-lightness. More information here: http://compass-style.org/reference/c...just-lightness
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

  5. #5

    Default

    I'm actually trying to use the CSS3 Filter attribute. In standard CSS it would like like filter : brightness(59%); but this conflicts with functions that have been introduced in RC1. the sass functions should be changed to have a namespace. color_brightness for example.

    Jordan

    Quote Originally Posted by rdougan View Post
    The brightness function takes one parameter which is a color. You are passing it a percentage which is why compass spits an error. It returns the brightness of a specified color.

    If you want to change the lightness of a color, you can use the compass function adjust-lightness. More information here: http://compass-style.org/reference/c...just-lightness

  6. #6
    Sencha User rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159

    Default

    Sorry about that, I should have read your post properly.

    I'll investigate and get back to you. Thanks.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •