Design comparison
SolutionDesign
Solution retrospective
I use SCSS for this project, and I do use mixins. However, class selectors can achieve the same result.
Should I mix them, or should I stick with one of them?
Community feedback
- @andreasremdtPosted over 2 years ago
Nicely done! To answer your question: you can mix them. There's no relation between mixins and classes in Sass. Mixins are just reusable pieces of code that you can apply to any element, no matter if it's via IDs, classes, or tag selectors.
That being said, I'd recommend sticking to classes in most scenarios, as this makes your code easier to read and understand.
Marked as helpful1
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