Skip to content

named colours behave oddly when used in variables #558

@blowback

Description

@blowback

There's something odd going on with named colours. They're meant to be "indistinguishable from unqoted strings".

@function is_gold($c) {
    @if ($c == gold) {
        @return 'yes';
    }
    @return 'no';
}

div {
    foo: is_gold(gold);
    bar: is_gold(white);
}

sass gives me:

div {
  foo: "yes";
  bar: "no"; }

sassc gives me:

div {
  foo: 'no';
  bar: 'no'; }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions