Sha256: e56e2f534d9be614fe41f9f2d5c447f18873e8b12e08a28955366931fcd5c0f4

Contents?: true

Size: 766 Bytes

Versions: 1

Compression:

Stored size: 766 Bytes

Contents

// -----------------------------------------------------------------------------
// State constructor
// -----------------------------------------------------------------------------

$bem-state-namespace: 'is' !default;

@function _state($states...) {
    $selector: ();
    $namespace: if($bem-use-namespaces, $bem-state-namespace + '-', '');

    @each $state in $states {
      $ss: &; // Workaround for libsass
      $s: selector-append($ss, '.#{$namespace}#{$state}');
      $selector: append($selector, $s, 'comma');
    }

    $set-current: set-current-context('state', $states, $selector);

    @return $selector;
}

@mixin state($states...) {

    @at-root #{_state($states...)} {
      @content;
    }

    $unset-state: unset-current-context('state');
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bem-constructor-1.0.0 stylesheets/_state.scss