devedmonton / DES-Website

The Dev Edmonton Society website! We empower Edmonton Developers!
https://devedmonton.com
MIT License
28 stars 74 forks source link

Add reusable form components #215

Closed DerrykBoyd closed 1 year ago

DerrykBoyd commented 1 year ago

What issue is this referencing?

This is a small follow up from https://github.com/devedmonton/DES-Website/pull/206

Rather than adding the scoped css inside the contact form file, we can create custom input and textarea components with some default tailwind classes that can be overwritten. Now we can use these on other pages if needed and get consistent styles.

Have you run the linting command in the README.md?

Have you taken a look at our contributing guidelines?

My node version matches the one suggested when running nvm use?

olimpiuus commented 1 year ago

Yes, it works. For me it is a bit complicated. Not sure that adding new component just for styling is really necessary.

Maybe we can just move scoped form classes into global css (assets/css/tailwind.css) to solve it?

DerrykBoyd commented 1 year ago

Yes, it works. For me it is a bit complicated. Not sure that adding new component just for styling is really necessary.

Maybe we can just move scoped form classes into global css (assets/css/tailwind.css) to solve it?

I don't think this was complicated, just two very simple components that are easy to use.

It's generally considered best practice when using tailwind to stick to their utility classes and not supplement with your own classes /css.

Having a component is also one of their recommended ways to reuse styles. Global CSS usually leads to problems down the line in my experience.

olimpiuus commented 1 year ago

Yes, it works. For me it is a bit complicated. Not sure that adding new component just for styling is really necessary.

Maybe we can just move scoped form classes into global css (assets/css/tailwind.css) to solve it?

I don't think this was complicated, just two very simple components that are easy to use.

It's generally considered best practice when using tailwind to stick to their utility classes and not supplement with your own classes /css.

Having a component is also one of their recommended ways to reuse styles. Global CSS usually leads to problems down the line in my experience.

Oh, thanks for the explanation. It's much clearer for me now☺️