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

Support for css-modules? #567

Closed
antoligy opened this Issue May 8, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@antoligy

antoligy commented May 8, 2016

Hey,

Love what you're doing here. Is support for css-modules planned?

My current workaround to import Grommet styles into a project using css-modules is to import and extend it via a grommet.scss-global file, and to add a new webpack loader for this file extension which disables CSS modules.

@ericsoderberghp

This comment has been minimized.

Show comment
Hide comment
@ericsoderberghp

ericsoderberghp May 9, 2016

Contributor

From a quick scan of css-modules. It seems likes it's along the same lines we've been steering Grommet's stylesheets. Until I have time to look into it further, do you have any suggestions on how grommet could change to make it easier to integrate with css-modules?

Contributor

ericsoderberghp commented May 9, 2016

From a quick scan of css-modules. It seems likes it's along the same lines we've been steering Grommet's stylesheets. Until I have time to look into it further, do you have any suggestions on how grommet could change to make it easier to integrate with css-modules?

@antoligy

This comment has been minimized.

Show comment
Hide comment
@antoligy

antoligy May 12, 2016

Hey! I guess that depends on how Grommet is to be built: If the webpack route is appropriate, then it may be worth attempting to use them wholesale, relying on Webpack's css-loader to transform stylesheets into objects capable of providing class names. (i.e. import styles from ./something.scss allows me to className={styles['chart__axis--x']})

antoligy commented May 12, 2016

Hey! I guess that depends on how Grommet is to be built: If the webpack route is appropriate, then it may be worth attempting to use them wholesale, relying on Webpack's css-loader to transform stylesheets into objects capable of providing class names. (i.e. import styles from ./something.scss allows me to className={styles['chart__axis--x']})

@bryanjacquot

This comment has been minimized.

Show comment
Hide comment
@bryanjacquot

bryanjacquot Jul 6, 2016

Contributor

Related to: #678

Contributor

bryanjacquot commented Jul 6, 2016

Related to: #678

@alansouzati

This comment has been minimized.

Show comment
Hide comment
@alansouzati

alansouzati Aug 10, 2016

Member

For now we will remain with SASS+BEM methodology.

Please save some time to read my journey when investigating CSS in Javascript, including CSS modules.

https://blog.grommet.io/post/2016/08/10/css-in-js-may-not-be-the-solution-to-all-your-problems

Member

alansouzati commented Aug 10, 2016

For now we will remain with SASS+BEM methodology.

Please save some time to read my journey when investigating CSS in Javascript, including CSS modules.

https://blog.grommet.io/post/2016/08/10/css-in-js-may-not-be-the-solution-to-all-your-problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment