FlyingDR / scss-snippets

Collection of helpful SCSS mixins and functions to use into various projects
1 stars 2 forks source link

Potential issue with parsing offsets #28

Open FlyingDR opened 4 years ago

FlyingDR commented 4 years ago

There is an issue with offsets parser in a case if part of offset definition is came from map-get()

$map: (offset: 0 1);
.test {
    @include offset(p map-get($map, offset));
}

Expected result:

.test {
  padding: 0 20px;
}

Actual result:

.test {
  padding: 0 20px 0 20px 0 20px 0 20px;
}

Passing of additional flags as options fixes issue:

@include offset(map-get($map, offset), p);