Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using $spacing-important as parameter to mixin #7

Open
siiron opened this issue May 24, 2017 · 1 comment
Open

Using $spacing-important as parameter to mixin #7

siiron opened this issue May 24, 2017 · 1 comment

Comments

@siiron
Copy link

siiron commented May 24, 2017

Would it be possible to pass $spacing-important as a parameter to the mixin? Let's say I default want this variable set to false, but in a special context I need to override this and pass in !important?

Example:

// Config:
@spacing-important: false !default;

// SCSS
.foo {
    @include m(4 $spacing-important: true);
}

/* CSS */
.foo {
    margin-top: 24px !important;
    margin-right: 24px !important;
    margin-bottom: 24px !important;
    margin-left: 24px !important;
}

Also, would it be possible to set !important for each direction?

// SCSS
.foo {
    @include m(4 $spacing-important: true, 2, 4, 3 $spacing-important: true);
}

/* CSS */
.foo {
    margin-top: 24px !important;
    margin-right: 12px;
    margin-bottom: 24px;
    margin-left: 18px !important;
}
@jameslnewell
Copy link
Contributor

yeah sure. want to contribute a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants