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

CSS modules classNames are invalid when parent folder is a dynamic route #10468

Closed
maxholman opened this issue Feb 8, 2020 · 3 comments · Fixed by #11795
Closed

CSS modules classNames are invalid when parent folder is a dynamic route #10468

maxholman opened this issue Feb 8, 2020 · 3 comments · Fixed by #11795
Milestone

Comments

@maxholman
Copy link

maxholman commented Feb 8, 2020

Bug report

Describe the bug

When using CSS modules along with dynamic routes that involve a parent folder with
square brackets in the name (dynamic urls), the generated CSS class name/ident also contains the folders square brackets making the class name invalid, and therefore preventing the provided styles from being applied.

For reference, see the relevant code in getCssModuleLocalIdent

Happy to provide a PR if you can give me some guidance on whether to remove, escape, or replace the brackets with an alternative.

To Reproduce

Full repro at https://github.com/maxholman/nextjs-ident-bug

Expected behavior

Generated class names should not contain invalid characters

@Timer Timer modified the milestones: 9.2.2, 9.2.x Feb 14, 2020
@kkomaz
Copy link

kkomaz commented Apr 9, 2020

Has this been addressed @Timer? what is a good work around for this?

@timneutkens
Copy link
Member

it's being worked on @kkomaz, see #11775

@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants