2014-09-06 68 views
0

有一個非常奇怪的斷點問題。斷點不輸出任何東西

Screen.scss包含了最基本的斷點例子:

@import "breakpoint"; 

    $high-tide: 500px; 

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

這被編譯到:

.johnny-utah { 
     color: blue; 
    } 

好像斷點不返回任何東西。它曾經工作過。

在OS X.10上運行的Compass 1.0.1,Breakpoint 2.5.0和SASS 3.4.3。

我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 
+0

請看看你是否可以在SassMeister(http://sassmeister.com/)上重新創建它, – Snugug 2014-09-06 12:29:20

回答

0

沒關係,這是我最愚蠢的錯誤永遠!

這是一箇舊的項目,我想我是用的斷點,但今天,沒有......我用我自己的mixin稱爲_breakpoint.scss這是這樣的:

@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; }  
    } 
} 

這就是爲什麼什麼也沒有輸出..