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

Move variables and Bootstrap lines to autoload #1993

Merged
merged 3 commits into from Nov 13, 2017
Merged

Move variables and Bootstrap lines to autoload #1993

merged 3 commits into from Nov 13, 2017

Conversation

MWDelaney
Copy link
Member

See discussion on #1992

@retlehs
Copy link
Sponsor Member

retlehs commented Nov 13, 2017

need to address @import "common/variables"; being removed from main.scss

we could add the variables import to the top of all the other autoload files in sage-installer, but that doesn't work for the 'none' option

..although we could add the autoloader w/ the variables import to the none option ¯_(ツ)_/¯

any ideas?

@@ -1,7 +1,3 @@
@import "~bootstrap/scss/functions";
@import "common/variables";
Copy link
Contributor

@LeoColomb LeoColomb Nov 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, this line can be kept in the main.scss file.
If we remove it, other frameworks variables are not loaded, and ~bootstrap/scss/functions doesn't seem to override variables.

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the concern is using a bootstrap function in your variables

Copy link
Member Author

@MWDelaney MWDelaney Nov 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bootstrap themselves use functions in variables so it's confusing if we can't do the same in Sage.

It would either require repeated explanation on the forum, or a comment somewhere explaining why the following Bootstrap's own example for variable overrides doesn't work.

Copy link
Contributor

@LeoColomb LeoColomb Nov 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can always take the example from zurb/foundation, calling functions.scss inside variables.scss:

https://github.com/zurb/foundation-sites/blob/eaa79c89a8c5dc89f8fa1e6916ce5dea6cc55866/scss/settings/_settings.scss#L63

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean here in sage-installer?

That would work. Is that less messy than including common/variables.scss in each autoload? Is it more or less flexible in the future?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, yes, yes. 😆 👍
At least, it should be, imo.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm comfortable with that solution. @retlehs do you have an opinion on including the BS functions right in the variables.scss file?

And forgive my ignorance, should I do that on this PR or is that a sage-installer only thing?

Copy link
Sponsor Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good to me, you'll want to do that both on this repo (as it should function properly w/ bootstrap without the installer) and sage-installer

@MWDelaney
Copy link
Member Author

I guess nobody can say we didn't thoroughly discuss the solution this time! I'll take a stab at sage-installer tomorrow unless somebody else gets there first <--hint ;)

@retlehs retlehs merged commit 2b53c69 into roots:master Nov 13, 2017
@retlehs
Copy link
Sponsor Member

retlehs commented Nov 13, 2017

updated sage-installer + new version tagged, should be all good now. thanks @MWDelaney & @LeoColomb!

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

Successfully merging this pull request may close these issues.

None yet

3 participants