Skip to content

content-exists() is not working. #2842

Open
@chriseppstein

Description

@chriseppstein

I get this error if the function content-exists() is in the mixin, whether or not the mixin is invoked.

input.scss

@mixin test-content-exists() {
  @if content-exists() {
    @content;
  }
  @else {
    content: missing;
  }
}

.foo {
  @include test-content-exists();
}

.bar {
  @include test-content-exists() {
    content: present;
  }
}

Actual results

libsass 3.5.2

Cannot call content-exists() except within a mixin. on line 2 at column 7

Expected result

ruby sass 3.5.6

.foo {
  content: missing;
}

.bar {
  content: present;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions