Coding task · HTML and CSS course · Module 7: SASS
Creating SASS Mixins
Mixins are reusable code blocks - like rituals performed by priests in every temple. @mixin name { ... } defines it, @include name; uses it. They can accept parameters just like functions!
Task
Create @mixin flex-center { display: flex; justify-content: center; align-items: center }. Use it: .card { @include flex-center; }, .hero { @include flex-center; height: 100vh }. Add @mixin shadow($size) with a parameter!