简体   繁体   English

断点不输出任何内容

[英]Breakpoint does not output anything

Having a very weird breakpoint problem. 有一个非常奇怪的断点问题。

Screen.scss contains the most basic breakpoint example: Screen.scss包含最基本的断点示例:

@import "breakpoint";

  $high-tide: 500px;

  .johnny-utah {
    color: blue;
    @include breakpoint($high-tide) {
      content: 'Whoa.';
    }
  }

This gets compiled to: 编译为:

  .johnny-utah {
      color: blue; 
  }

Seems like breakpoint is not returning anything. 好像断点没有返回任何东西。 It used to work before. 它曾经工作过。

Compass 1.0.1, Breakpoint 2.5.0 and SASS 3.4.3 running on OS X.10. 在OS X.10上运行的Compass 1.0.1,Breakpoint 2.5.0和SASS 3.4.3。

My config.rb is nothing special: 我的config.rb没什么特别的:

# Require any additional compass plugins here.
require 'breakpoint'

# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "stylesheets"
sass_dir = "sass"
images_dir = "images"
javascripts_dir = "javascripts"
fonts_dir = "fonts"

output_style = :nested

# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true

# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
color_output = true


# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
preferred_syntax = :scss

Never mind, this was my most stupid error ever! 没关系,这是我有史以来最愚蠢的错误!

This was an old project and I thought I was using Breakpoint back then, but no ... I used my own mixin called _breakpoint.scss which looked like this: 这是一个旧项目,我当时以为是在使用Breakpoint,但是没有……我使用了自己的名为_breakpoint.scss的mixin,如下所示:

@mixin breakpoint($breakpoint) {
  @if $breakpoint == tablet {
    @media only screen and (min-width: 768px) { @content; }
  }

  @if $breakpoint == desktop {
    @media only screen and (min-width: 1024px) { @content; }
  }

  @else if $breakpoint == big_desktop {
    @media only screen and (min-width: 1280px) { @content; }    
  }
}

That's why nothing was outputted .. 这就是为什么什么都没输出的原因..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM