Skip to content
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

[] operator does not return usable ruleset values. #3382

Closed
seven-phases-max opened this issue Apr 4, 2019 · 5 comments
Closed

[] operator does not return usable ruleset values. #3382

seven-phases-max opened this issue Apr 4, 2019 · 5 comments

Comments

@seven-phases-max
Copy link
Member

seven-phases-max commented Apr 4, 2019

Map operator seems to not return anything reasonable if the value of interest is a ruleset.

Example:

@typography: {
    @h1: {
        font:         roboto;
        font-weight:     300;
        font-size:    9.6rem;
        line-height:  9.6rem;
        text-transform: none;
    }
}

#usage {
    @x: @typography[@h1];
    r: @x[font]; // err: could not evaluate variable call @x
    @x();        // err: could not evaluate variable call @x
}

Expected:
@x value should be a proper DR for both subsequent statements to work.

@stale
Copy link

stale bot commented Aug 2, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@matthew-dean
Copy link
Member

Didn't see this before. Yeah, that's a proper bug.

@tijmenvangurp
Copy link

tijmenvangurp commented Jul 15, 2020

I am experiencing the same issue.

In codepen here it works what I am trying todo
https://codepen.io/tijmic/pen/bGExdpq?editors=1111

But in the context of semantic-ui using https://github.com/gulp-community/gulp-less it does not work.

I get the same error: could not evaluate variable call @x

@matthew-dean
Copy link
Member

It seems that this was fixed with other fixes. The latest version of Less (3.12.2) does not have this issue. The output is, as expected:

#usage {
  r: roboto;
  font: roboto;
  font-weight: 300;
  font-size: 9.6rem;
  line-height: 9.6rem;
  text-transform: none;
}

@matthew-dean
Copy link
Member

Closing as fixed.

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

No branches or pull requests

3 participants