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.
Loading...
Related Quiz
- What is the role of the src attribute inside the @font-face rule?
- In a storytelling website, you want an image to slide in and stay in place after the animation finishes. Which properties and values would you primarily consider?
- How can you specify that an animation should run in reverse order?
- You're optimizing a website for better scroll performance. Which CSS property would you use to hint to the browser about an element that will change frequently?
- Which positioning value makes an element positioned relative to its original position?