Skip to content

Reserved function names #713

@KittyGiraudel

Description

@KittyGiraudel

Sass should throw an error if one tries to create functions called or, and and not. This is an issue I opened in Sass repo a while ago: sass/sass#1265.

Test:

@function and() {
  @return "and";
}

@function or() {
  @return "or";
}

@function not() {
  @return "not";
}

test {
  not: not();
  or: or();
  and: and();
}

Expect:

Invalid function name "and".

Result:

test {
  not: "not";
  or: "or";
  and: "and"; }

Ref: http://sass-compatibility.github.io/#reserved_function_names

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions