作者:avici | 来源:互联网 | 2022-12-10 19:35
我有4个SASS文件main.sass
,_fonts.sass
,_variables.sass
,_home.sass
.
main.sass
@import 'fonts'
@import 'variables'
@import 'home'
_fonts.sass
@font-face
font-family: "FontAwesome"
font-weight: normal
font-style: normal
src: url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.eot?v=4.3.0")
src: url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.eot?#iefix&v=4.3.0") format("embedded-opentype"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.woff2?v=4.3.0") format("woff2"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.woff?v=4.3.0") format("woff"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.ttf?v=4.3.0") format("truetype"), url("https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular") format("svg")
_variables.sass
$yellow: #fce001
_home.sass
.container
color: $yellow
text-align: right
.another-container
color: $yellow
text-align: center
&:after
content: '\f0b0'
font-family: FontAwesome
font-style: normal
font-weight: normal
text-decoration: inherit
position: absolute
right: 20px
display: inline-block
font-size: 1.1em
这是我的示例HTML
container
another-container
我正在使用此命令编译我的SASS文件: sass --watch main.sass:style.css
当我检查我的谷歌浏览器检查元素container
或another-container
,它指向_variables.sass
NOT _home.sass
._variables.sass
只包含变量.我希望它指向_home.sass
.
@update我设法找出导致错误的原因,在_home.sass
中content: '\f0b0'
,如果我删除它,源地图指向正确的行,为什么这会导致错误?