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

Darkmode does not account for Parameter inheritance with the darkClass/lightClass properties #170

Open
ta11ey opened this issue Dec 3, 2021 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@ta11ey
Copy link

ta11ey commented Dec 3, 2021

Darkmode does not work with Parameter Inheritance.

see here for rules of parameter inheritance

Expected Behavior: When you override the darkClass and lightClass at a story level, the classes set from the preview.js level are removed, and vice versa when leaving that story.

Actual Behavior: it will add the new classes defined in the story level parameters without removing the ones you set in preview.js. and then when you go back to a story where you are wanting to fall back to the default parameters it will leave the inherited ones on the classTarget element

@ta11ey ta11ey changed the title Darkmode does not account for Parameter inheritance Darkmode does not account for Parameter inheritance with the darkClass/lightClass properties Dec 3, 2021
@hipstersmoothie hipstersmoothie added the help wanted Extra attention is needed label Dec 5, 2022
@hipstersmoothie
Copy link
Owner

I could see lots of problems coming from this. What if you are looking at a docs view where different components expect different light/dark classes?

Willing to review a PR if you find that's not an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants