Monday 15 March 2010

sass - import compass sprite images in one file css and @extend it in another? -



sass - import compass sprite images in one file css and @extend it in another? -

i have icons folder, utilize compass sprites images:

@import "compass/utilities/sprites"; @import "icons/*.png"; @include all-icons-sprites(true);

this in /stylesheets/global/icons.css.scss file

now, in /stylesheets/application/index.css.scss file need use:

@extend .icons-foo;

i include global/ folder before application/ in application/index.css.scss :

/* *= require_tree ../global *= require_tree . */

but have error :

".bar" failed @extend ".icons-foo". selector ".icons-foo" not found.

the solution it's repeat first block set in post in application/index.css.scss.

but if set manualy "icons-foo" in class of dom element, class match , works...

how not repeat same instruction? how can import 1 time sprite , used them in other file?

import sass sprite extend compass

No comments:

Post a Comment