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

ID vs Class #396

Open
Sam-Kruglov opened this issue Aug 7, 2023 · 0 comments
Open

ID vs Class #396

Sam-Kruglov opened this issue Aug 7, 2023 · 0 comments

Comments

@Sam-Kruglov
Copy link

Hi, I found the following inconsistency. Given this CSS:

#account-list {
  ...

  .account-info {
    ...
  }
}

I can import the info class in a JS-friendly camel case way: styles.accountInfo. But I can't do the same for the list, I have to use the original kebab-cased name: styles['account-list']. Why is that?

I'm using React and have the following dependencies:

"node_modules/css-loader": {
  "version": "6.7.3",
  "dev": true,
  "dependencies": {
    "icss-utils": "^5.1.0",
    "postcss": "^8.4.19",
    "postcss-modules-extract-imports": "^3.0.0",
    "postcss-modules-local-by-default": "^4.0.0",
    "postcss-modules-scope": "^3.0.0",
    "postcss-modules-values": "^4.0.0",
    "postcss-value-parser": "^4.2.0",
    "semver": "^7.3.8"
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant