Skip to content

mix color function has rounding error #552

Closed

Description

@leafo

Compare LESS output and SASS output:

Edit: I prematurely added this, turns out to be a minor rounding error. Feel free to close this.

LESS:

@a: rgb(255,255,255);
@b: rgb(0,0,0);

.mix {
    color: mix(@a, @b, 50%);
}

SASS:

$a: rgb(255,255,255);
$b: rgb(0,0,0);

.mix {
    color: mix($a, $b, 50%);
}

LESS output is #808080 and SASS output is #7f7f7f.

Running less 1.2.0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions