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

allow devs to use css modules for styling react components #57

Closed
3 tasks
vanderhoop opened this issue Feb 27, 2017 · 0 comments
Closed
3 tasks

allow devs to use css modules for styling react components #57

vanderhoop opened this issue Feb 27, 2017 · 0 comments
Assignees
Labels

Comments

@vanderhoop
Copy link
Contributor

vanderhoop commented Feb 27, 2017

As a developer who wants the ability to scope css declarations to a particular element,
I want to configure webpack to use CSS modules,
So that I can style my components without polluting the global CSS scope.

Acceptance Criteria:

  • developers are able to import stylesheets into their React component files like so:
    • import styles from "./css_modules/category_column.css"
  • developers are able to reference the styles defined in a css module within their React components like so:
return (
  <section className={styles["category-header"]}>
  </section>
)
  • the classNames are converted to globally unique strings within the app:

Desired Output:

<!-- format: css_module_name__class-name-from-css-module___alphaNumericString -->
<section class="category_column__category-header___3WpoB">
</section>
@vanderhoop vanderhoop self-assigned this Feb 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant