Sass Sprite不能与@Extended一起使用 [英] SASS sprite not working with @extend

查看:15
本文介绍了Sass Sprite不能与@Extended一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在处理Sass和Sprite,它运行得很好。它从我的图像文件名生成很多类,我可以在我的标记中使用这些类。 但我希望在不更改标记的情况下使用Sprite。

这就是我拥有的

我的图像位于图像/RAW下 其中一个图像名为spr-links.png

在我的css中

@import "raw/*.png"; //Sprite

我应该能够喜欢这个,但什么都没有出来。SASS甚至不会在这个问题上失败

.footer{
    @extend .raw-spr-link;
}

推荐答案

取消注释"relative_assets = true"

# Require any additional compass plugins here.

    # Set this to the root of your project when deployed:
    http_path = "/"
    css_dir = "css"
    sass_dir = "sass"
    images_dir = "images"
    javascripts_dir = "js"

    relative_assets = true

    output_style = :expanded # by Compass.app 
    sass_options = {:debug_info=>false} # by Compass.app 

    line_comments = true # by Compass.app 

这篇关于Sass Sprite不能与@Extended一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆