Sha256: 09ff198e1a9f0a38350b65a889df98c9f440d9266483a85067a79cd752002b7e

Contents?: true

Size: 814 Bytes

Versions: 2

Compression:

Stored size: 814 Bytes

Contents

@mixin fontcustom-font-face($map) {
  @font-face {
    font-family: glyph-font-name-quoted($map);
    src: glyph-font-sources($map);
    font-weight: normal;
    font-style: normal;
  }
}

// generates icon classes in the format icon-<font-name>-<glyph-name>
// for each glyph in the font.
//
// $map          must be a glyph map
// $glyph-names  must be a space-separated list of glyph names
// $base-class    should be the css class to @extend
@mixin glyphs($map, $glyph-names, $base-class: false) {
  $name: glyph-font-name($map);
  @each $glyph-name in $glyph-names {

    $index: index($glyph-names, $glyph-name);
    $class_name: "icon-#{$name}-#{sanitize-symbol($glyph-name)}";

    .#{$class_name} {
      @if $base-class { @extend #{$base-class}; }
      &:before { content: glyph($index); }
    }

  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
compass-fontcustom-1.3.0 stylesheets/_fontcustom.scss
compass-fontcustom-1.2.0 stylesheets/_fontcustom.scss