hello. nice to see you. For the first time, I played the role of a 'frontend mentor'. I am looking for a concise and clean code. How can I write cleaner code than the code I submitted? As a beginner, I am very inexperienced. Any feedback is good. Thanks for the good feedback.
Mic-Saw
@Mic-SawAll comments
- @Dopest-HyoSubmitted about 2 years ago@Mic-SawPosted about 2 years ago
This is only your first project and you are already using variables, a rare practice for beginners - well done. Also your project looks great. However, I would have a few suggestions about the organization of the code itself...:
-
It would be good to organize it according to some criteria: https://css-tricks.com/poll-results-how-do-you-order-your-css-properties/
-
When it comes to naming classes - I recommend the BEM method: https://css-tricks.com/bem-101/
-
For larger projects, it is worth dividing the code into several smaller files according to the 7-1 method: https://www.learnhowtoprogram.com/user-interfaces/building-layouts-preprocessors/7-1-sass-architecture (but that's after learning about the SASS preprocessor)
Developing these habits will make your work much easier, especially on larger projects.
Happy Coding!
Marked as helpful1 -
- @marijahavaicSubmitted over 2 years ago
- How do you name your classes and is there any naming convention I could follow?
- Is it better to have a descendant combinator (body p) or class (.text) for styling?
@Mic-SawPosted over 2 years agoOnce you have mastered the BEM notation (and Sass), I suggest you familiarise yourself with the 7-1 method of organising code; it is very useful for more complex projects.
https://www.learnhowtoprogram.com/user-interfaces/building-layouts-preprocessors/7-1-sass-architecture
Marked as helpful0