In SASS/SCSS, how do you define a mixin?

  • #mixin myMixin() { }
  • &mixin myMixin() { }
  • @mixin myMixin() { }
  • def mixin myMixin():
In SASS/SCSS, a mixin is defined using the @mixin directive followed by the mixin name and parentheses. The correct syntax is @mixin myMixin() { ... }. Mixins are used to encapsulate reusable sets of styles and can take parameters inside the parentheses if needed.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *