Skip to content

v1.0.5

Latest
Compare
Choose a tag to compare
@deioo deioo released this 02 Nov 14:15
· 130 commits to develop since this release

Changelog

Fix an edge case with BEM mixins where using a pseudo-element selector within a modifier would generate the wrong class for the nested elements.


@include b('block') {
  @include m('highlighted:nth-child(2n)') {
      @include e('item') {
        background-color: color(border, light);
      }
  }

// SAME AS

@include b('block') {
  @include m('highlighted') {
    &:nth-child(2n)') {
      @include e('item') {
        background-color: color(border, light);
      }
    }
  }

Before
The generated class name for the item element: .block--highlighted:nth-child(2n) .block--highlighted__item is wrong.

After
The class .block--highlighted:nth-child(2n) .block__item is properly returned for the edge case defined above.