我正在尝试使用 Compass 的 font-face() mixin 将此 CSS 转换为 SASS:
@font-face {
font-family: 'PT Sans';
src: url('../fonts/PTSans/PTS55F_W.eot'); /* IE9 Compat Modes */
src: url('../fonts/PTSans/PTS55F_W.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../fonts/PTSans/PTS55F_W.eot#iefix') format('woff'), /* Modern Browsers */
url('../fonts/PTSans/PTS55F_W.ttf') format('truetype'), /* Safari, Android, iOS */
url('../fonts/PTSans/PTS55F_W.svg#svgFontName') format('svg'); /* Legacy iOS */
}
这是我得到的:
@import "../compass/css3";
@include font-face("PT Sans", font-files('../fonts/PTSans/PTS55F_W.eot', '../fonts/PTSans/PTS55F_W.eot#iefix', '../fonts/PTSans/PTS55F_W.ttf', '../fonts/PTSans/PTS55F_W.svg#svgFontName'));
但我得到这个语法错误:
Syntax error: Invalid CSS after " ": expected "{", was "@include font-f..."
我认为这是我错过的一个愚蠢的简单语法错误,但我一辈子都看不到它。
我错过了什么?