Sha256: 0a1c47e1fd91254806323b4410e45a5788ceb253618ac30d932fcabb5f9f0d90

Contents?: true

Size: 881 Bytes

Versions: 41

Compression:

Stored size: 881 Bytes

Contents

/// Builds a selector for a motion class, using the settings defined in the `$motion-ui-classes` and `$motion-ui-states` maps.
/// @param {String|List} $states - One or more strings that correlate to a state.
/// @param {Boolean} $active - Defines if the selector is for the setup or active class.
/// @return {String} A selector that can be interpolated into your Sass code.
/// @access private
@function -mui-build-selector($states, $active: false) {
  $return: '';
  $chain: map-get($motion-ui-classes, chain);
  $prefix: map-get($motion-ui-classes, prefix);
  $suffix: map-get($motion-ui-classes, active);

  @each $sel in $states {
    $return: $return + if($chain, '&.', '#{&}-') + $prefix + $sel;

    @if $active {
      $return: $return + if($chain, '.', '#{&}-') + $prefix + $sel + $suffix;
    }

    $return: $return + ', ';
  }

  @return str-slice($return, 1, -3);
}

Version data entries

41 entries across 41 versions & 4 rubygems

Version Path
foundation-rails-6.9.0.0 vendor/assets/scss/motion-ui/util/_selector.scss
foundation-rails-6.6.2.0 vendor/assets/scss/motion-ui/util/_selector.scss
bedrock_sass-0.2.2 assets/_vendor/motion-ui/util/_selector.scss
foundation-rails-6.6.1.0 vendor/assets/scss/motion-ui/util/_selector.scss
foundation-rails-6.5.3.0 vendor/assets/scss/motion-ui/util/_selector.scss
bedrock_sass-0.2.1 assets/_vendor/motion-ui/util/_selector.scss
foundation-rails-6.5.1.0 vendor/assets/scss/motion-ui/util/_selector.scss
locomotivecms_wagon-2.4.1 generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss
bedrock_sass-0.2.0 assets/_vendor/motion-ui/util/_selector.scss
locomotivecms_wagon-2.4.0 generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss
foundation-rails-6.4.3.0 vendor/assets/scss/motion-ui/util/_selector.scss
locomotivecms_wagon-2.4.0.rc2 generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss
locomotivecms_wagon-2.4.0.rc1 generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss
locomotivecms_wagon-2.3.0 generators/foundation/public/stylesheets/foundation6/motion-ui/util/_selector.scss
bedrock_sass-0.1.9 assets/_vendor/motion-ui/util/_selector.scss
bedrock_sass-0.1.8 assets/_vendor/motion-ui/util/_selector.scss
bedrock_sass-0.1.7 assets/_vendor/motion-ui/util/_selector.scss
bedrock_sass-0.1.6 assets/_vendor/motion-ui/util/_selector.scss
bedrock_sass-0.1.5 assets/_vendor/motion-ui/util/_selector.scss
bedrock_sass-0.1.4 assets/_vendor/motion-ui/util/_selector.scss