Skip to content

Open Type Mixin #57

@grayghostvisuals

Description

@grayghostvisuals
$dlig-boolean: off;
$font-feat: (
  dlig: if($dlig-boolean, 1, null),
  smcp: on,
  c2sc: null,
  liga: off,
  tnum: 'hist'
);

@mixin openType($el, $map) {
  #{$el} {
    @each $lig, $val in $map {
      @if $val != null {
        font-feature-settings: "#{$lig}" $val;
      } @else {
        font-feature-settings: "#{$lig}";
      }
    }
  }
}

@include openType('.element', $font-feat);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions