private function SassExtentionsCompassFunctionsUrls::clean in Sassy 7
3 calls to SassExtentionsCompassFunctionsUrls::clean()
- SassExtentionsCompassFunctionsUrls::font_url in phamlp/
sass/ extensions/ compass/ functions/ urls.php - SassExtentionsCompassFunctionsUrls::image_url in phamlp/
sass/ extensions/ compass/ functions/ urls.php - SassExtentionsCompassFunctionsUrls::stylesheet_url in phamlp/
sass/ extensions/ compass/ functions/ urls.php
File
- phamlp/
sass/ extensions/ compass/ functions/ urls.php, line 102
Class
- SassExtentionsCompassFunctionsUrls
- Compass extension SassScript urls functions class. A collection of functions for use in SassSCript. @package PHamlP @subpackage Sass.extensions.compass.functions
Code
private function clean($url, $only_path) {
if (!$only_path instanceof SassBoolean) {
$only_path = new SassBoolean('false');
}
$url = substr($url, 0, 2) === './' ? substr($url, 2) : $url;
return $only_path
->toBoolean() ? $url : "url('{$url}')";
}