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

Add !default to overriding vars in bootstrap / foundation presets? #23

Open
ghost opened this issue Oct 16, 2016 · 3 comments
Open

Add !default to overriding vars in bootstrap / foundation presets? #23

ghost opened this issue Oct 16, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2016

Yo Jack!

I'm using $grid-framework: 'bootstrap', but found that I can't override values once these vars have been set. (In particular I've been trying to override the gutter value). Reckon you could chuck !default on all of these vars?

@if $grid-framework == 'bootstrap' {
$grid-name: 'col-' !default;
$base-grid-name: 'xs' !default;
$column-gutter: 15px !default;
$auto-column-gutters: true !default;
$right-name: 'push' !default;
$left-name: 'pull' !default;
$breakpoints: (
'sm': 480px,
'md': 768px,
'lg': 1024px,
'xl': 1180px
);
}

@jackmcpickle
Copy link
Owner

Hey @aaronmccaffery, unfortunately sass doesn't let you override defaults already set. Just investigating now but it seems you could use !global instead which is stronger that !default but then gives you the power to still override.

@jackmcpickle
Copy link
Owner

Hmm. Catch seems to that !global is stronger than $vars set above it too.
Which means the output that is generated would be already set. Thinking a way to output the grid with a mixin might be a easier way to add control.

@ghost
Copy link
Author

ghost commented Oct 16, 2016

Yo!

Yeah, I ended up adding !default to the relevant bootstrap lines, then
setting $column-gutters before including flex_e_ble and it all worked out
fine, for now. :)

Let me know if there's a better way and I'll have a crak with it tomorrow.
Catch you in the morning mate!

On Sun., 16 Oct. 2016, 11:17 pm Jack McNicol, [email protected]
wrote:

Hmm. Catch seems to that !global is stronger than $vars set above it too.
Which means the output that is generated would be already set. Thinking a
way to output the grid with a mixin might be a easier way to add control.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#23 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AD7ionZ1Jjait1sozhdG3WF5ppeR8_9oks5q0hz5gaJpZM4KX715
.

Regards,

Aaron McCaffery
Designer / Software Developer
Ignite Media

M: 0415 408558
W: ignitemedia.com.au

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

No branches or pull requests

1 participant