BinaryStudioAcademy / bsa-2024-outreachvids

Create personalized sales videos using generated video content and AI-generated avatars.
http://bsa-2024-outreachvids-dev.eu-north-1.elasticbeanstalk.com/
8 stars 0 forks source link

Testing and deciding on styling approach #127

Closed stefano-lacorazza closed 2 months ago

stefano-lacorazza commented 3 months ago

First we must decide the styling approach: direct styling in component, prop styling or custom theme using chakra.

Alblupynos commented 3 months ago

Could you add a small example for each approach, please I think we have one more variant with class and id styling or maybe some of your approaches means that?

stefano-lacorazza commented 3 months ago

Styling Comparison

All example code can be found in frontend/src/bundles/style-comparison.

Inline Styling

Inline styling involves applying styles directly to the element in the return statement using the style or sx attributes.

Pros:

Cons:

Prop Styling

Prop styling involves passing styles as props to the component, allowing dynamic and reusable styling. They can be passed as style or sx properties.

Pros:

Cons:

Chakra Theme Styling

Chakra theme styling involves defining styles in a theme object to expand Chakra's default theme and applying them to components using the ChakraProvider and theme props.

Pros:

Cons:

CSS Modules Styling

CSS Modules styling involves creating a CSS file with the .module.css extension and importing it into the component. This ensures that styles are scoped locally to the component.

Pros:

Cons:

o-nedashkivska commented 2 months ago

I guess we can close this ticket because we already decided on styling approach and created a separate ticket for that https://github.com/BinaryStudioAcademy/bsa-2024-outreachvids/issues/164