Sha256: 0a053db628263c9a379152fef288c9f35494a13b8b3fe5216baba30bc07a3336

Contents?: true

Size: 1.23 KB

Versions: 13

Compression:

Stored size: 1.23 KB

Contents

// -----------------------------------------------------------------------------
// Context logger
// -----------------------------------------------------------------------------
// Table of contents:
// 1. Store current context
// 2. Clear current context


/// Used to stores the current object being constructed
/// @private

$_bem-current-context: () !global;


// -----------------------------------------------------------------------------
// 1. Store current context
// -----------------------------------------------------------------------------

/// Sets the current object, stores name and generated selector

@function set-current-context($obj, $name, $selector) {
    $new-current: (#{$obj}: (name: $name, selector: $selector));
    $_bem-current-context: map-merge($_bem-current-context, $new-current) !global;

    @return $selector;
}


// -----------------------------------------------------------------------------
// 2. Clear current context
// -----------------------------------------------------------------------------

/// Clears the current object

@function unset-current-context($obj) {
    $new-current: (#{$obj}: null);
    $_bem-current-context: map-merge($_bem-current-context, $new-current) !global;

    @return null;
}

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
bem-constructor-1.0.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.9.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.8.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.7.1 stylesheets/logger/_context-logger.scss
bem-constructor-0.7.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.6.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.5.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.4.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.3.2 stylesheets/logger/_context-logger.scss
bem-constructor-0.3.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.2.0 stylesheets/logger/_context-logger.scss
bem-constructor-0.1.1 stylesheets/logger/_context-logger.scss
bem-constructor-0.1 stylesheets/logger/_context-logger.scss