madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 173 forks source link

An Error in Created min.css File #293

Open MarkSky opened 7 years ago

MarkSky commented 7 years ago

Installed product versions

Description

If I use a symbol font in SCSS file, it will to be a strange word in min.css

` @font-face { font-family: 'Glyphicons Halflings'; src: url('../wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot'); src: url('../wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.woff') format('woff'), url('../wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../wwwroot/lib/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); }

label { &::before { content: "\e157"; display: inline-block; font-family: 'Glyphicons Halflings'; } } `

It creats the css file is ture: ` @font-face { font-family: 'Glyphicons Halflings'; src: url("../lib/bootstrap/fonts/glyphicons-halflings-regular.eot"); src: url("../lib/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("../lib/bootstrap/fonts/glyphicons-halflings-regular.woff2") format("woff2"), url("../lib/bootstrap/fonts/glyphicons-halflings-regular.woff") format("woff"), url("../lib/bootstrap/fonts/glyphicons-halflings-regular.ttf") format("truetype"), url("../lib/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); }

label::before { content: "\e157"; display: inline-block; font-family: 'Glyphicons Halflings'; } but the min.css has an error: @font-face{font-family:'Glyphicons Halflings';src:url("../lib/bootstrap/fonts/glyphicons-halflings-regular.eot");src:url("../lib/bootstrap/fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"),url("../lib/bootstrap/fonts/glyphicons-halflings-regular.woff2") format("woff2"),url("../lib/bootstrap/fonts/glyphicons-halflings-regular.woff") format("woff"),url("../lib/bootstrap/fonts/glyphicons-halflings-regular.ttf") format("truetype"),url("../lib/bootstrap/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg");}label::before{content:"";display:inline-block;font-family:'Glyphicons Halflings';} ` ScreenShot

david-hollifield commented 7 years ago

This just bit me...trying to use fontawesome and all the "content:" values were minified into symbols which fail in IE.