O mapa SCSS não será compilado no Compass [duplicado]
Esta pergunta já tem uma resposta aqui:
O Sass 3.3 é compatível com o Compass? 3 respostasEu escrevi uma variável de mapa SCSS e uma@each
loop para atribuir ícones diferentes aos links de download de arquivos, vistos abaixo.
$file-icons: (
"application/vnd.ms-excel": "../images/ico-excel.png",
"application/pdf": "../images/ico-pdf.png",
"image/tiff": "../images/ico-img.png",
"image/gif": "../images/ico-img.png",
"image/png": "../images/ico-img.png",
"image/jpeg": "../images/ico-img.png",
"application/x-shockwave-flash": "../images/ico-flash.png",
"audio/mpeg": "../images/ico-audio.png"
);
@each $file in $file-icons {
img[title="#{nth($file, 1)}"] + a:hover {
background: url("#{nth($file, 2)}") right top no-repeat;
}
}
Quando eu testo isso emSassmeister, ele compila exatamente como eu espero:
img[title="application/vnd.ms-excel"] + a:hover {
background: url("../images/ico-excel.png") right top no-repeat;
}
img[title="application/pdf"] + a:hover {
background: url("../images/ico-pdf.png") right top no-repeat;
}
img[title="image/tiff"] + a:hover {
background: url("../images/ico-img.png") right top no-repeat;
}
img[title="image/gif"] + a:hover {
background: url("../images/ico-img.png") right top no-repeat;
}
img[title="image/png"] + a:hover {
background: url("../images/ico-img.png") right top no-repeat;
}
img[title="image/jpeg"] + a:hover {
background: url("../images/ico-img.png") right top no-repeat;
}
img[title="application/x-shockwave-flash"] + a:hover {
background: url("../images/ico-flash.png") right top no-repeat;
}
img[title="audio/mpeg"] + a:hover {
background: url("../images/ico-audio.png") right top no-repeat;
}
Estou usando o Compass para este projeto. Quando eu usocompass compile
, Estou tendo o erro a seguir.
user@machine:~/project$ compass compile
error sass/style.scss (Line 2 of sass/_partial.scss: Invalid CSS after "...n/vnd.ms-excel"": expected ")", was ": "../images/ic...")
create stylesheets/style.css
Não tenho certeza do que está causando esse erro. Poderia estar relacionado a como os novos mapas são para Sass, e talvez o Compass ainda não o suporte totalmente?