Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Support for Sass-Maps #37

Open
natterstefan opened this issue Jun 8, 2021 · 1 comment
Open

Support for Sass-Maps #37

natterstefan opened this issue Jun 8, 2021 · 1 comment

Comments

@natterstefan
Copy link

Hey @madyankin,

first of all, thanks for creating this plugin, and thanks to all the contributors as well. I got a question and I saw that I was not the first one who asked this (see #26).

Sass Maps are not supported at the moment, are they?

Example

// @see https://www.digitalocean.com/community/tutorials/sass-each-loops
// @see https://www.digitalocean.com/community/tutorials/sass-sass-maps
$map: (
  h1: 20px,
  h2: 16px,
  h3: 14px
);

@each $element, $size in $map {
  #{$element} {
    font-size: $size;
  }
}

Thanks for your help in advance, I appreciate it.

ArnaudWeyts added a commit to teamleadercrm/ui that referenced this issue Jan 6, 2022
there are some breaking changes in this version that we make use of: madyankin/postcss-each#37
@ryansch
Copy link

ryansch commented Oct 5, 2022

I needed this functionality while porting a large legacy project so I wrote it: https://www.npmjs.com/package/postcss-each-in-map

It merely converts things to @each syntax for this plugin to pick up.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants