我期待着做以下工作,我似乎無法弄清楚如何沒有相當數量的小提琴。指南針在同一圖標名稱下爲不同彩色主題創建多個精靈文件
我想爲我的主題設置兩個圖標集。一個黑色。一個白色。我的主題有兩種不同的配色方案可供選擇。灰色和藍色。在灰色的主題上,我想要黑色的圖標,我想要白色的藍色主題。
我創建了我原來的黑色圖標設置罰款和文件夾中已包括他們現在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