@droopydev
Posted
Hi Aviral Sharma!
- "I'd love to know if I have written clean code and written which was not required."
One of the ways to write clean and understandable CSS code is to apply the BEM naming convention.
For example, in your CSS styling, when a person reads ".card1", ".card2" etc, they may not know which card you are referring to. So to make it easily understandable, you can do.
".card--sedan", ".button--suvs"
You can read more about it here: https://css-tricks.com/bem-101/
Marked as helpful
@aviralsharma07
Posted
@droopydev Thank You for telling me this. I'll name classes according to the BEM convention from now onwards.