Skip to content

Future of CSS Modules #187

Open
Open

Description

@taion

@geelen It looks like you're the primary maintainer here, but I assume your attention is mostly directed toward styled-components now. Who is the current active maintainer of this spec? If there isn't one, what steps can we take toward continued maintenance of this spec?

Activity

  1. geelen commented on Nov 2, 2016

    @geelen
    Member

    Yeah, I've not got terribly much time to put towards either CSS Modules or Styled Components at the moment, but having both certainly doesn't help. Thanks for kicking off this discussion, I'll invite @markdalgleish, @sokra & @joshwnj to chime in as well.

    Personally, I'm not working on particularly big CSS projects at the moment — Front End Center is my main focus rather than consulting/contracting these days. This means I'm not being exposed to some of the problems that are facing users of CSS Modules. Things like contextual overrides (the discussion in #147 I think has lead to some good candidates but I haven't had time to push them forward) are a good example. There are lots of small improvements (things like composition shorthands) that I'd love to see implemented, too. And then there's always the job of improving the documentation across the board, and quite a few PRs that could probably be merged straight away...

    So for me, hacking away in pure-JS land is quite fine for the projects I'm playing with, and I'm definitely interested in exploring what is possible in that space, but I wouldn't suggest using any CSS-in-JS tool over CSS Modules for decent-sized projects in the near term. So that means that there are real issues facing real projects here that are going unsolved by my absence, which is bad.

    So as for "the future of CSS Modules", I think it would be best if I stepped back and let someone (or a few people) with the time and resources to steer it step forward. Any suggestions as to who that might include? Would you like to be involved, @taion?

  2. taion commented on Nov 2, 2016

    @taion
    Author

    cc @jquense

    I think it should definitely be more than one person. A key thing to the appeal of CSS Modules for us is that it's stable and relatively easy to understand – that it's relatively unopinionated, so it's a good default for getting modularization without being as cutting-edge as the CSS-in-JS approaches.

    For my part, at least, I'm not looking for major changes – just considered incremental evolution and maintenance, and I think that's better with multiple people involved.

    I see that @tivac has been pretty active on this repo. I'm not really sure what the landscape for CSS Modules looks like more broadly in terms of users.

  3. tivac commented on Nov 2, 2016

    @tivac

    I ❤️ the CSS Modules spec. I didn't have much luck wrapping my head around the code, unfortunately.

    I'm not particularly interested in taking on any ownership of it, but I am very interested in the continuing spec/format discussions and future direction.

    Definitely watching this thread closely. 👍

  4. markdalgleish commented on Nov 2, 2016

    @markdalgleish
    Member

    I have a very strong sense of guilt over my lack of involvement in this project due to my extremely busy schedule of work and family responsibilities.

    That said, I'd love to get some more people involved, get some more active maintenance happening and keep this project moving forwards. I'm definitely keen to help with all of this, but I feel like we're missing an element of official coordination.

    I propose that our next steps might be to build up a small group of maintainers, maybe start a development focused Slack channel (no questions from users, just coordinating work) and weekly video chat to keep us all on the same page. Is anyone here interested in being a part of this?

  5. markdalgleish commented on Nov 2, 2016

    @markdalgleish
    Member

    To add to that, I've been really inspired by the work of @TheLarkInn in building a really strong developer community around Webpack, where it used to be mostly a one-man show, at least as far as I could tell. Any input he can provide here would be really helpful, since there's a big overlap between the Webpack and CSS Modules communities.

  6. thien-do commented on Nov 2, 2016

    @thien-do

    I can help with issues and documentations. At my company, we are currently use CSS Modules heavily for almost all production products, some of them are decent-size (like a trading apps eco-system). Therefore, I think my hand is dirty enough with CSS Modules to help other people.

    I actually did help some issues in the repo :D And it feel very great. I'm not good at writing specs and implementations, but I think I'm good at solving issues using CSS Modules (since we already meet a lot at my company). So... I volunteer.

    In the far future (or next company, or next pet project), I think I will jump to styled-components train. However, in the next near future, I'll stick a lot with CSS Modules

  7. mightyaleksey commented on Nov 2, 2016

    @mightyaleksey
    Member

    Would like to mension that I (and my team) finally started to use CSS Module on our primary products. For example one them is a big web application for out partners. Unfortunately, I was busy with mirtating to the new technology stack for the past months and had not much time to help in here.

    So would like to say that I'm interested in the future development of CSS Modules and would like to help here :) I'm not good with documenting stuff, but I can help with the code part.

    I agree with @markdalgleish that an element of official coordination is missing. And a focus on the small working group with regular planning could help here. So I would like to join it also :)

  8. dfreeman commented on Nov 2, 2016

    @dfreeman

    I maintain the ember-css-modules integration, which my team uses extensively in our own projects and has also seen decent pickup in the wider Ember community. I suspect I don't have the capacity right now to take on a maintainer role here, but I'm definitely interested in seeing a slightly more formal group of maintainers come together.

    I'd love to see public notes from the weekly meetings and/or (quietly) be a part of the development Slack in order to keep a finger on the pulse of things and see how they're developing :)

  9. taion commented on Nov 2, 2016

    @taion
    Author

    @markdalgleish

    No need to feel guilty! CSS Modules is really good.

    I think @TheLarkInn has done great work on the webpack side as well.

    One contrast I'd like to draw, though, is that I think the CSS Modules spec is very close to complete – like on the order of 90% complete; there are only small things at the margin like #147 that need work, and all of that is a bit separate from the core of CSS Modules as I see it.

    This is different from, say, webpack, which needed fundamental changes in v2. I think CSS Modules just needs a bit of housekeeping and moving forward small things at the margins to fill in the blanks is all.

    @sullenor BTW, take a look at @jquense's css-literal-loader! 😆 It's been a nice little DX improvement for us.

  10. jquense commented on Nov 2, 2016

    @jquense

    👋 I'm also interested in helping out. I think what @taion said echo's my own thoughts and wishes. We really dig CSS modules and would love to help make sure it says up to date, and stable, while also evolving it where needed!

  11. mightyaleksey commented on Nov 3, 2016

    @mightyaleksey
    Member

    @taion I think that it requires courage to switch to the inlined css or smthing css-in-js like :)
    Not sure that my team is prepared for that step 😄

    Anyways it looks really good and I like the idea of using es6 template literals, so you can add a css function to inject styles in runtime without code compilation. Might be useful for the development stage. Also it is easily supported in tests and in the server-side rendering stuff.

    Damn, I like it :)

  12. taion commented on Nov 3, 2016

    @taion
    Author

    @sullenor If you look at @jquense's loader (assuming you're using webpack), it gives you both – the styles are pulled out at build time and treated as if they were separate CSS files. The code just happens to be inlined into the JS file, is all. So using that css template literal with css-literal-loader is the same as making a tiny .css file.

  13. joshwnj commented on Nov 3, 2016

    @joshwnj
    Member

    I propose that our next steps might be to build up a small group of maintainers, maybe start a development focused Slack channel (no questions from users, just coordinating work) and weekly video chat to keep us all on the same page. Is anyone here interested in being a part of this?

    I think this would be really valuable. Happy to pitch in where I can.

  14. kumarharsh commented on Nov 4, 2016

    @kumarharsh

    It's nice to see this discussion being held, as it also gives new or potential adopters a chance to gauge the current scenario and future of this project. I'm just shifting my team from Radium to css-modules. Coming from the CSS-in-JS land, I think there are still a lot of issues which need to be solved for CSS-in-JS to mature, and there is still a good amount of instability in the libraries themselves, where maintainers have pivoted to newer things or the projects have run into some really difficult issues (FormidableLabs/radium#788) (Khan/aphrodite#76), which, after investing a lot of time into it, deflates confidence in the long-term viability of such solutions. CSS-Modules, on the other hand, seems much more stable, and it being as close to normal 'css' as possible also is a great plus.

    I'd like to contribute to this community, but as a newcomer, I'll be happy to observe and learn more about the process and the spec itself.

  15. TheLarkInn commented on Nov 4, 2016

    @TheLarkInn

    Thank you @markdalgleish it's humbling to see these words and the efforts you are putting together here. As I'm already 200% overbooked on time myself with webpack, I can't unfortunately help in regards to this project, but I'm always willing to help give some advice or help however possible with the limited time I have.

  16. 17 remaining items

  17. eduardoinnorway commented on Apr 6, 2017

    @eduardoinnorway

    Any news here? We really like the concept and It would be really sad if it just fades away.

  18. taion commented on Apr 6, 2017

    @taion
    Author

    We'd be up for getting involved and pushing forward some of the stalled proposals. cc @jquense @geelen

  19. mxl commented on May 18, 2017

    @mxl

    @geelen @markdalgleish Hey! Is there final solution regarding the discussion above?
    css-modules-loader-core seems not maintained. If someone is still interested in this project - we should come up with some solution without delay. As @markdalgleish suggested you can start a development focused Slack channel. I'm sure that there are enough developers who can help to maintain css-modules organization projects and I'm one of them. And that's all we need to continue maintaining this wonderful project. I use css-modules in my projects and it's great idea and implementation and it'll be very sad if the project will just die. WDYT?

  20. kumarharsh commented on May 18, 2017

    @kumarharsh

    +1

  21. tivac commented on May 18, 2017

    @tivac

    @mxl

    I went ahead and created a Discord server: https://discord.gg/m2QBEZ5

    has a few folks in it, but not much. No real dev discussions to speak of.

    I'm 100% still interested in the ideas/syntax of CSS Modules, I'm just using them & iterating on them in modular-css since this one seems pretty unloved.

  22. feluxe commented on May 18, 2017

    @feluxe

    There is a lot of focus on CSS in JS right now but I think CSS Module is still a good option.

    I think CSS-Modules is the cleanest and most beautiful solution out there and the only one that allows me to decouple theming from the component entirely (just create a CSS file for each theme, load the one you need via CSS-Modules and pass it to the component via props). You can create hundreds of themes like that without touching the component at all. Thus allowing you to install components via NPM and put your own style on it. In this regard 'styled-components' makes a step back, because each theme needs to be hard-coded into the component.

    I don't think we need another styling-system like 'styled-components', I think all we need is a spec that defines how to use CSS-Modules to put themes on a component consistently.

  23. Undistraction commented on Sep 4, 2017

    @Undistraction

    So what is the future of CSS Modules?

    Edit: Some discussion on the Gitter by maintainers: https://gitter.im/css-modules/maintainers

    sokra's Medium describing Webpack's new CSS Loader asnd ICSS2: https://medium.com/webpack/the-new-css-workflow-step-1-79583bd107d7

    The new Webpack CSS Loader: https://github.com/webpack-contrib/css-loader/tree/new-loader

    Would be great to get an official roadmap up here somewhere.

  24. TrySound commented on Sep 4, 2017

    @TrySound
    Member

    Medium stories is official roadmap. We are waiting landing css as first class citizen in webpack.

  25. Undistraction commented on Sep 4, 2017

    @Undistraction

    @TrySound Thanks for the confirmation. And thanks for your work on CSS Modules. It would be great to add a brief Roadmap to the README so the project doesn't look like it's died.

  26. cowboy commented on Oct 25, 2018

    @cowboy

    So... about the future of CSS Modules. Any status updates? It's a little disconcerting to see no real updates or movement (let alone anything that looks like a real set of best practices around naming conventions, composes, etc) in over a year.

  27. taion commented on Oct 25, 2018

    @taion
    Author

    i’m not sure that doing this is the place of this repo, though. we can always separately work to promulgate our own best practices. for what we’ve been doing so far, CSS modules have just worked and continue to work

  28. jquense commented on Oct 25, 2018

    @jquense

    yeah I don't know that there is actually much more to do here. we've been using css-modules for a few years now and honestly it feels pretty done (as in complete). It effectively scopes css. Other features like variables, etc are best left to Sass, et al. The only thing I think folks really want but is missing is using other css-module classes as selectors. But that really needs a champion with time to make it happen.

  29. huan086 commented on Nov 19, 2018

    @huan086

    My little contribution: now there's Typescript definitions for the various postcss-modules plugins. css-modules can thus be used in webpack.config.ts written Typescript.

    Combined with @jpavon/typings-for-css-modules-loader to make Typescript definitions for the css-modules JSON export, css-modules is totally Typescript friendly now.

  30. vviikk commented on Jun 5, 2019

    @vviikk

    I wrote a little article about how styled-components is the next step in the evolution of css modules. I think there's some useful info in there about the state of CSS. I was a heavy css modules user before moving to styled-components BTW. @geelen is one of the co-authors of that anyway :)

  31. hinell commented on May 15, 2023

    @hinell

    It's May 2023, The project is dead. CSS in JS also got a lot of problems, chckout:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions