Skip to content

Problem on variables with calc on the name #35

Closed
@celiolatorraca

Description

@celiolatorraca

Hi,

First of all, thanks for this incredible lib. Saved me lots of sleeping hours.

I'm using it to reduce some calc and use the values into some pseudo-selectors...
Unfortunately i think i probably found a bug.

I have a variable called $offset-calc, and after the postcss-calc runs its replaced to $offset-...

Here is an example of a mixin i made that uses it:

@define-mixin elements-last-row $wrapper-selector, $selector, $row-size, $offset: 0 {
  /* last row, doesn't matter how many cells */
  $offset-calc: calc($offset + 1);
  $wrapper-selector:nth-last-child(-n + $row-size):nth-child($(row-size)n + $offset-calc), /* first element of the last row */
  $wrapper-selector:nth-last-child(-n + $row-size):nth-child($(row-size)n + $offset-calc) ~ $selector { /* all its following elements */
    @mixin-content;
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions