orenyk
I was wondering if you could comment on the use of commas to separate mixin parameters, and why they’re not used consistently. For example, the size
mixin does use commes, e.g.:
@include size(50px, 100px);
but the margin
mixin does not and only uses spaces to separate parameters, e.g.:
@include margin(20px null);
Finally, the position
mixin actually combines both, with the type of position separated from the top
, left
, etc declarations with a comma, but the positioning declarations themselves are space separated, e.g.:
@include position(absolute, 0 1em null null);
I’m guessing this has something to do with the fact that margin
and the positioning declarations take a variable number of inputs and proceed accordingly, but I was hoping you could expand on that and explain why you couldn’t just use comma-separated parameters instead. Thanks!