wie funktioniert $icon-font-path arbeitet in bootstrap scss?

Ich habe vor kurzem angefangen mit bootstrap SCSS auf meine Knoten Projekt. Also ich habe app/bower_components/bootstrap-sass/lib/_glyphicons.scss zum Beispiel.

Blick auf meine CSS-Ausgabe sehe ich Dinge wie:

@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/some\/path\/project\/app\/bower_components\/bootstrap-sass\/lib\/_normalize\.scss}line{font-family:\0000332}}
audio,
canvas,
video {
  display: inline-block;
}

Ich habe 2 Fragen:

  1. Wie es scheint, ein Sicherheits-Loch. Jeder kann sich ableiten, etwas über meine OS-und Verzeichnis-Struktur einfach durch einen Blick auf mein CSS. Was ist der richtige Weg, um diese Sicherheitslücke zu schließen?
  2. Wie funktioniert es? Ich habe fast verstanden, aber ich bin etwas fehlt. Blick auf die SCSS, ich sehe bootstrap ist mit $icon-font-path die anscheinend verwandelt sich in dieser absoluten Pfad. Blick auf compass-Dokumentation, sehe ich, dass Sie absolute Werte, aber keine $icon-font-path

Dies ist das Stück code ich beziehe mich auf:

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('#{$icon-font-path}#{$icon-font-name}.eot');
  src: url('#{$icon-font-path}#{$icon-font-name}.eot?#iefix') format('embedded-opentype'),
       url('#{$icon-font-path}#{$icon-font-name}.woff') format('woff'),
       url('#{$icon-font-path}#{$icon-font-name}.ttf') format('truetype'),
       url('#{$icon-font-path}#{$icon-font-name}.svg#glyphicons-halflingsregular') format('svg');
}

InformationsquelleAutor guy mograbi | 2013-10-18

Schreibe einen Kommentar