Question · HTML and CSS course · Module 7: SASS

Default Mixin Parameter in SASS

How do you set a default value for a parameter in a SASS mixin?

Answer options

  • @mixin shadow($size default 10px) { ... }
  • @mixin shadow($size || 10px) { ... }
  • @mixin shadow($size: 10px) { ... }
  • @mixin shadow($size = 10px) { ... }

You can check the correct answer by solving this task in the CodeWorlds game.