MadLittleMods / MadLittleMods/postcss-css-variables

Defining variable in a mixin fails and crashes

Open
#132 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
JavaScript
Stars
551
Forks
63
PR merge metrics
No merged PRs in 30d

Description

Defining a variable in a mixin crashes when forEach is called on an undefined variabale.

```
> Cannot read properties of undefined (reading 'forEach')
```

To reproduce: in the playground at https://madlittlemods.github.io/postcss-css-variables/playground/

```
@define-mixin foo {
--line-height: 100px;
line-height: var(--line-height);
}
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash in the linked playground with the provided @define-mixin example, then use the undefined forEach error to locate the relevant plugin entry point. Done means the example no longer crashes and the mixin's line-height declaration is processed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.