我期待着做以下工作,我似乎无法弄清楚如何没有相当数量的小提琴。指南针在同一图标名称下为不同彩色主题创建多个精灵文件
我想为我的主题设置两个图标集。一个黑色。一个白色。我的主题有两种不同的配色方案可供选择。灰色和蓝色。在灰色的主题上,我想要黑色的图标,我想要白色的蓝色主题。
我创建了我原来的黑色图标设置罚款和文件夹中已包括他们现在icon/*.png
想什么,我用的是嵌套文件夹的设置,其中我的图标在以下文件夹icon/black/*.png
和icon/white/*.png
的问题,这是我的图标将被命名为像这样black-add
和white-add
那里我真正想要的是icon-add
,使我没有改变我的主题@import icon-sprite(add)
线,我只是包括顶部的正确sprites/_black
或sprites/_white
高级主题sa ss文件。
是否有一些配置我错过,允许我这样做?还是我以错误的方式解决这个问题?
我已经通过创建所有图标的通用图标/ *。png文件夹,然后复制生成的_icon.sass文件并编辑黑白图标来解决此问题。然后在我的灰色主题中包含“精灵/黑色”,在我的蓝色主题中包含“精灵/白色”。这可以工作,但是当你想添加新的图标时,它有点像PITA。
这里任何帮助将不胜感激!
澄清
当前文件夹结构UPDATE。
themes/
images/
default/
icon/
black/
white/
blue/
config.rb
# $ext_path: This should be the path of the Ext JS SDK relative to this file
$ext_path = "../"
# sass_path: the directory your Sass files are in. THIS file should also be in the Sass folder
# Generally this will be in a resources/sass folder
# <root>/resources/sass
sass_path = File.dirname(__FILE__)
# css_path: the directory you want your CSS files to be.
# Generally this is a folder in the parent directory of your Sass files
# <root>/resources/css
css_path = File.join(sass_path, "..", "css")
images_path = File.join(sass_path, "..", "themes", "images", "default")
generated_images_dir = File.join(sass_path, "..", "themes", "images", "default")
generated_images_path = File.join(sass_path, "..", "themes", "images", "default")
http_generated_images_path = File.join("..", "themes", "images", "default")
sprite_load_path = File.join(sass_path, "..", "themes", "images", "default")
# output_style: The output style for your compiled CSS
# nested, expanded, compact, compressed
# More information can be found here http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#output_style
output_style = :compressed
# We need to load in the Ext4 themes folder, which includes all it's default styling, images, variables and mixins
load File.join(File.dirname(__FILE__), $ext_path, 'themes')
重读我的配置文件,它就像我希望拥有多个条目sprite_load_path或带走的“默认”的加入。
感谢您的答复。这是我认为它应该是结构起初的一些图像是这样的。我看不出有什么配置罗盘来支持这个结构来创建精灵的正确途径。我将用我目前的结构更新我的问题并配置指南针。 – 2012-07-31 19:45:26
在更新我的岗位我想我看到我要去哪里错了。正是这种sprite_load_path = File.join(sass_path, “..”, “主题”, “图像”, “默认”)引起多数民众赞成我的问题。只是打开我的设置,以适应你的结构。但我认为你已经明白了! – 2012-07-31 20:01:26