9
저는 제 자신의 SASS/COMPASS "프레임 워크"에서 일합니다.COMPASS/SASS 변수를 @import "sprite/*. png"경로에 보간하는 방법은 무엇입니까?
모든 이미지가 저장된 폴더의 이름 인 $ sprite라는 변수를 설정했습니다.
이렇게하면 나중에 이미지 대체 및 스프라이트 생성에 replace-with-image-mixin을 사용할 수 있습니다.
@import "# {$ sprite}/*. png"가 작동하면 모든 것이 잘 될 것입니다.
아이디어가 있으십니까?
//sprite images folder name
$sprite: "sprite";
//settings
$sprite-sprite-base-class: ".#{$sprite}" - *works*;
$sprite-spacing: 20px;
$sprite-sprite-dimensions: true;
//generate sprite
@import "sprite/*.png"; - normal path - *works*
@import "#{$sprite}/*.png" - path with a variable in it - *doesn't work*
//mixin
@mixin replace-with-image($imageName){
@include replace-text-with-dimensions("#{$sprite}/#{$imageName}.png");
@extend %dis-ib;
} - *works*
Compass [매우 좁게 가져 오기의 보간 만 지원]처럼 보입니다. (https://github.com/nex3/sass/issues/49) – steveax