React-dates: Would you accept a PR migrating node-sass to css-modules?

Created on 4 Oct 2017  路  5Comments  路  Source: airbnb/react-dates

Hi, our current project hasn't global css classes, we obfuscate everything with css modules, we added node-sass only to be able to work with react-dates.

The idea:

  • Migrates global classes with node-sass to scoped classes with css modules
  • Use CSS Customer Properties for theming instead of node-sass variables
  • Allow classNames to allow advanced theming

What do you think about it?

Most helpful comment

@ljharb's approach is the right one! :) a react-with-styles interface to support css modules would be a great addition.

All 5 comments

No; a) airbnb doesn't use CSS modules, and b) #722 will convert to use react-with-styles, where you can create your own react-with-styles-interface-css-modules and use CSS Modules all you like.

@ljharb's approach is the right one! :) a react-with-styles interface to support css modules would be a great addition.

I had to put node-sass dependency to the project to be able to use this module, with react-with-styles-interface-css-modules will it still be needed?

That's up to that interface (which does not yet exist).

Thank you :)

Was this page helpful?
0 / 5 - 0 ratings