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

CSS Modules in gomponents #83

Closed
philippta opened this issue Jun 17, 2021 · 3 comments
Closed

CSS Modules in gomponents #83

philippta opened this issue Jun 17, 2021 · 3 comments

Comments

@philippta
Copy link

philippta commented Jun 17, 2021

Hey @markuswustenberg!

I was just tinkering around with your library again and thought it would be awsome to have something similar to CSS Modules in gomponents. This would be very benefitial for encapsulation and the pain of writing CSS selectors by hand, other options like Tailwind CSS integrate well but can get out of hand pretty quickly.

I created a proof of concept which integrates nicely with your library and I think it would be an awesome addition.
Attached is a screenshot which should demonstrate the look and feel, not necessarily the implementation details.

Please let me know what you think, especially if you could see this being added to gomponents or if it should rather live in its own package.

Cheers ✌🏼

cssmodules

@markuswustenberg
Copy link
Member

Hey @philippta,

that's awesome! 😎 I think it's a good idea to have this. I'm personally a big fan of TailwindCSS and hadn't heard of CSS modules before now, but I can see how they solve the same problem (styling components) quite elegantly, in different ways.

My initial thought is that this would be nice to have in a separate Go module. I've done something similar with gomponents-heroicons and started (but never got far with) gomponents-tailwind, so a gomponents-css-modules or something would make great sense.

My dream with gomponents is to be part of creating a rich ecosystem of view libraries for Go. I always found that cool about using React in Javascript-land, because there's so many great libraries to choose from. I started a gomponents + page on the website to facilitate this, and if you end up creating this, I would love to put the project on there.

What do you think?

@markuswustenberg
Copy link
Member

@philippta did you ever get further with this?

@lobre
Copy link

lobre commented Feb 27, 2023

I know this issue is closed and I am two years late on that, but I do think the concept is interesting. That would be a nice extension to gomponents if someone feels like wanting to tackle this topic!

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

3 participants