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

nested rule with dynamic value doesnt seem to work #445

Closed
kof opened this issue Mar 17, 2017 · 13 comments
Closed

nested rule with dynamic value doesnt seem to work #445

kof opened this issue Mar 17, 2017 · 13 comments
Labels
bug It went crazy and killed everyone.

Comments

@kof
Copy link
Member

kof commented Mar 17, 2017

@xiaofan2406 commented on Fri Mar 17 2017

container: {
    color: props => props.color, // this works
    '&:before' : {
        content: 'text',
        color: props => props.color // this doesn't
    }
}

Did i miss something?


@kof commented on Fri Mar 17 2017

Yeah, works right now only for top level rules. Lets keep this issue for enhancement. Not sure though if it is worth it.

@kof kof added the enhancement No kittens die if we don't do that. label Mar 17, 2017
@kof kof assigned kof and unassigned kof Mar 20, 2017
@jcheroske
Copy link

I would love to see this feature.

@kof
Copy link
Member Author

kof commented Mar 20, 2017

Feel free to take a deeper look and send a pr if you can.

@PolGuixe
Copy link
Contributor

I would love to see this implemented I am trying to build a grid system with JSS and I feel I really need dynamic values in nested rules.

@xiaofan2406
Copy link

@kof Can you please suggest any temporary workaround for this issue?

@kof
Copy link
Member Author

kof commented Mar 28, 2017

Workaround would be to not to use nested rules with function values right now. Will be fixed soon.

@PolGuixe
Copy link
Contributor

@kof When you reckon that it would be available?

@kof kof added bug It went crazy and killed everyone. and removed enhancement No kittens die if we don't do that. labels Apr 3, 2017
@kof
Copy link
Member Author

kof commented Apr 10, 2017

today) part of #444

@kof
Copy link
Member Author

kof commented Apr 10, 2017

Fixed, check out jss 7.0

@kof kof closed this as completed Apr 10, 2017
@xiaofan2406
Copy link

Not sure if I missed anything, but it doesn't seem to work for me.

@kof
Copy link
Member Author

kof commented Apr 18, 2017

Have you installed the latest jss-nested@4.0 as well?

@xiaofan2406
Copy link

yes. I cleared node_modules and reinstalled as well just to be sure. Still not working.

@kof
Copy link
Member Author

kof commented Apr 18, 2017

but did you look into the node_modules/jss-nested/package.json? The thing is I have a test for this case and it works, what do you do different? Can you submit a test?

@xiaofan2406
Copy link

Alright. Turns out mixing npm and yarn can cause some weird version errors. MB, it is working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It went crazy and killed everyone.
Projects
None yet
Development

No branches or pull requests

4 participants