public function SassExtentionsCompassFunctionsInlineData::inline_image in Sassy 7
File
- phamlp/
sass/ extensions/ compass/ functions/ inlineData.php, line 19
Class
- SassExtentionsCompassFunctionsInlineData
- Compass extension SassScript inline data functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.extensions.compass.functions
Code
public function inline_image($path, $mime_type = null) {
$path = $path->value;
$real_path = SassExtentionsCompassConfig::config('images_path') . DIRECTORY_SEPARATOR . $path;
$url = 'url(data:' . self::compute_mime_type($path, $mime_type) . ';base64,' . self::data($real_path) . ')';
return new SassString($url);
}