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

Signature Mix-Ins Unavailable #329

Closed
computingbets opened this issue Jun 27, 2016 · 10 comments
Closed

Signature Mix-Ins Unavailable #329

computingbets opened this issue Jun 27, 2016 · 10 comments

Comments

@computingbets
Copy link

I checked how Bootstrap uses media queries in the link below, under responsive breakpoints, and it says to use syntax -
@include media-breakpoint-up(sm) { .some-class { display: block; } }
From http://v4-alpha.getbootstrap.com/layout/overview/
When I use "@include media-breakpoint-up" i get an error saying "No mixin named media-breakpoint-up". So, I looked at shakacode/bootstrap-loader#9 but I think the GH issue has to do with custom mix-ins.
Do I need a new version of SCSS?

@RDegnen
Copy link

RDegnen commented Jun 27, 2016

did you pass it a breakpoint? like sm lg etc.,

@computingbets
Copy link
Author

yes - @include media-breakpoint-up (sm){ .question-one { margin-top: 159px; }
Something worth mentioning is that this broke my scss but made the question-one responsive.

@RDegnen
Copy link

RDegnen commented Jun 27, 2016

is it still throwing the error now that it's responsive? Or did it just break all the styles?

@computingbets
Copy link
Author

Still an error. Broke styles. Is responsive.

@RDegnen
Copy link

RDegnen commented Jun 27, 2016

did you forget a closing bracket? Or just not copy it in your question

@computingbets
Copy link
Author

Forgot to copy

@RDegnen
Copy link

RDegnen commented Jun 27, 2016

where are you?

@RDegnen RDegnen assigned RDegnen and unassigned RDegnen Jun 27, 2016
@berziiii
Copy link

https://github.com/berziiii/html-css-sass/tree/solution/assets/styles. You need to define the breakpoint.scss mixin function. See this folder and how we created the function then used it.

@computingbets
Copy link
Author

computingbets commented Jun 27, 2016

Okay, I applied the solution branch to my code and the magic ain't there.
The breakpoint file is copied -

$breakpoints: (
 'tiny':   (max-width:  300px),
 'small':  (min-width:  412px),
 'medium': (min-width:  992px),
 'large':  (min-width: 1200px)
);

@mixin breakpoint($name) {
 @if map-has-key($breakpoints, $name) {
   @media #{inspect(map-get($breakpoints, $name))} {
     @content;
   }
 } @else {
   @warn "Couldn't find a breakpoint named `#{$name}`.";
 }
}

and my version of breakpoint that I'm applying the mix-in to is -

div.question-one {
  clear: left;
  @include breakpoint(small) {
    margin-top: 300px;
  }
  margin-top: 123px;
  position: relative;
  } 

I'm no longer getting errors.

@berziiii
Copy link

So is this solved? If so, please close. Thanks!

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

3 participants