Skip to content

BEM Modifiers With Number Prefixes #738

@MethodGrab

Description

@MethodGrab

If a Sass 3.3 style BEM modifier starts with a number, it will fail to compile in libsass with the error invalid property name.

Tested against libsass 3.0.2 on SassMeister. Ruby Sass 3.4.9 compiles this without error.
Note: It's just modifier (--) that fails, BEM elements (__) work fine.

For example:

.foo {
  &--bar { color: red; }
  &--1bar { color: blue;}
}

Should compile to

.foo--bar { color: red; }
.foo--1bar { color: blue; }

This example will compile as expected in libsass:

.foo {
  &--bar { color: red; }
  &__1bar { color: blue;}
}

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