Nobu Posted on Jul 24, 2021 How to use kebab case for class name of css in Next.js #css #nextjs Precondition If I write kebab case like below, it will be error. className={styles.company-logo} Enter fullscreen mode Exit fullscreen mode Solution This will work. className={styles['company-logo']} Enter fullscreen mode Exit fullscreen mode Reference https://stackoverflow.com/questions/61794899/using-kebab-case-css-classnames-in-css-sass-modules-when-using-next-js Top comments (1) Subscribe Personal Trusted User Create template Templates let you quickly answer FAQs or store snippets for re-use. Submit Preview Dismiss Collapse Expand johnson-byjus johnson-byjus johnson-byjus Follow Joined Dec 6, 2019 • Feb 1 '22 Dropdown menu Copy link Hide Did u solve this.? Code of Conduct • Report abuse Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well Confirm For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Did u solve this.?