agamjotsingh18 / codesetgo

Open Source Website of CodeSetGo
https://codesetgo.netlify.app/
MIT License
76 stars 236 forks source link

Refactoring CSS in the enquiry form to improve consistency and maintainability ✨ #690

Closed Nishitbaria closed 11 months ago

Nishitbaria commented 11 months ago

Description:

I would like to propose some refactoring changes to the CSS code in the enquiry.css file to enhance consistency and maintainability. The changes are as follows:

  1. Moved the justify-content: center; and align-items: center; from the .enquiry-form to the .enquiry class: This modification ensures that the styles for centering elements are consistent for both the form container and its parent. By applying these styles to the .enquiry class, we can ensure that any other elements using the .enquiry class in the future will also be centered.

  2. Removed the .enquiry-form selector from the styles of the title, span, input, and textarea: Since these elements have unique class names (e.g., .title, span, input, textarea), there is no need to include the .enquiry-form selector when targeting them. This simplifies the CSS code and makes it more straightforward to understand and maintain.

  3. Combined the .enquiry-form input.error and .enquiry-form textarea.error styles into a single rule: Instead of having separate styles for inputs and textareas with the .error class, we can combine them into one rule like this: .enquiry-form input.error, .enquiry-form textarea.error. This reduces duplication and improves code readability.

  4. Combined the .enquiry-form input.success and .enquiry-form textarea.success styles into a single rule: Similar to the previous point, we can also combine the styles for inputs and textareas with the .success class into one rule: .enquiry-form input.success, .enquiry-form textarea.success. This further streamlines the CSS code and makes it easier to maintain.

By implementing these changes, the CSS code will become more organized, efficient, and easier to manage. It will also ensure consistency in styles and minimize redundancy in the codebase. These improvements will benefit the long-term development and maintenance of the project.

Nishitbaria commented 11 months ago

Hey @agamjotsingh18 Please Assign me this issue

agamjotsingh18 commented 11 months ago

Sure @Nishitbaria