Skip to content

Problem on variables with calc on the name #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
celiolatorraca opened this issue Dec 22, 2016 · 2 comments
Closed

Problem on variables with calc on the name #35

celiolatorraca opened this issue Dec 22, 2016 · 2 comments

Comments

@celiolatorraca
Copy link

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;
  }
}
@MoOx
Copy link
Contributor

MoOx commented Dec 22, 2016

That's a bug indeed. Please report this bug to https://github.com/MoOx/reduce-css-calc.
A PR with a failing test will be even better ;)

@ben-eb
Copy link
Member

ben-eb commented May 8, 2017

@ben-eb ben-eb closed this as completed May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants