I would like to achieve this mixin natively with Susy:
@mixin mainContainer($width, $maxWidth) {
width: $width;
max-width: $maxWidth;
margin-right: auto;
margin-left: auto;
}
How can I do that?
Thanks!
I would like to achieve this mixin natively with Susy:
@mixin mainContainer($width, $maxWidth) {
width: $width;
max-width: $maxWidth;
margin-right: auto;
margin-left: auto;
}
How can I do that?
Thanks!
Copyright © 2021 Jogjafile Inc.
The only reason to use Susy for this mixin is if you want Susy to provide one of those two values. If you plan to pass in both the width and max-width explicitly as arguments, there's no need to involve Susy at all.
I'll assume you do want Susy to provide one of the values, so I'll just guess which one, and let you change it if I guess wrong. In order to use Susy with customized output, you'll use the
container()function instead of thecontainer()mixin: