Design comparison
Solution retrospective
Hello Friends, please can you give me a review for my project, and could you help me understand preprocessors because I'm not quite sure how their use, it feels like writing CSS in another language, please what's its actual use. THANKS A LOT
Community feedback
- @FaberBenjaminPosted almost 2 years ago
CSS preprocessors indeed are somewhat a different language. Their goal is to create the actual .css file for you. If you use Sass for example - you don't actually use the .scss file in which you write your designs. Another file (.css) is created by Sass which will be used. There are some reasons to use preprocessors.
In Sass for example you can create custom elements (Mixins) which you can use as much and anywhere in your code as you would like (you don't have to manually type is 100 times).
Also in Sass you can use Variables so you can write your own custom colors and others etc. Tailwind makes it very fast to create styles.
Styled Components lets you write CSS in your JavaScript file (very good for React for ex.) But, the main reason for people to use preprocessors is that is makes your final CSS file consistent. Imagine a company where 50 people write in the .css in a style they wish. Would be kinda chaotic. So many companies use preprocessors because of this.
Hope this was helpful and your Advice generator looks awesome.
Marked as helpful1@ikennarichardPosted almost 2 years ago@FaberBenjamin Thanks a ton Faber!, you really cleared things up for me especially with that last part about 50 people writing in the same CSS. 🙏
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord