Most examples of how to use placeholders in Sass are very simplistic and don’t really show why you might want to use them beyond some programmer-y sense of obligatory correctness. You usually see something like this:
Which compiles to:
That’s obviously not super useful, so I was wondering what placeholders are really for. Turns out you can use placeholders as part of more complex selectors, and then those get passed down to the extending selector.
That probably doesn’t really make sense, so let’s use an example:
Now we’re starting to see the use.
You can even have multiple selectors using the same placeholder.
That definitely seems useful now. I hope this encourages you to be a little more interesting when using placeholders!