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

Improve variables #22

Closed
robinpoort opened this issue Sep 20, 2018 · 1 comment
Closed

Improve variables #22

robinpoort opened this issue Sep 20, 2018 · 1 comment
Assignees
Milestone

Comments

@robinpoort
Copy link
Contributor

Each variable should be used only once outside of other variables.

Incorrect

variables/_type.scss
$line-height: 24px !default;

mixins/_content-block.scss
@mixin content-block($spacing: $line-height, $location: bottom ) {}

Also see:

@mixin content-block($spacing: $line-height, $location: bottom ) {

Correct:

variables/_type.scss
$line-height: 24px !default;
$content-block-margin: $line-height !default;

mixins/_content-block.scss
@mixin content-block($spacing: $line-height, $location: bottom ) {}

In short, do not re-use variables directly on other elements they are meant for but use a middle-variable instead.

@robinpoort robinpoort self-assigned this Oct 2, 2018
@robinpoort robinpoort added this to the Current milestone Oct 2, 2018
@robinpoort robinpoort changed the title More variables Improve variables Oct 18, 2018
robinpoort added a commit that referenced this issue Oct 18, 2018
@robinpoort robinpoort modified the milestones: Current, v4.0.0 Oct 23, 2018
@robinpoort
Copy link
Contributor Author

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