Here's how I approach the situation: take advantage of the fact that the order of your CSS properties matters. Therefore, in your mixin, define the mapping as an inline block; name it in your element; then, under this call, set the mapping to lock by overriding mixin.
@mixin padded padding: $default-padding-y $default-padding-x display: inline-block .element @include padded display: block
For this reason, I usually call mixins (or extends) at the top of the ruleset.
Or, if you want to dynamically add an inline block style, you can use JavaScript to find out which display property the element has, and then apply the new class accordingly. You donโt need a Sass mixer for this.
source share