You are here

function sassy_bootstrap_sassy_resolve_path_bootstrap in Sassy 7.2

Same name and namespace in other branches
  1. 7.3 sassy_bootstrap/sassy_bootstrap.module \sassy_bootstrap_sassy_resolve_path_bootstrap()

Implementation of hook_sassy_resolve_path_NAMESPACE().

File

extensions/bootstrap/sassy_bootstrap.module, line 6

Code

function sassy_bootstrap_sassy_resolve_path_bootstrap($filename, $syntax = 'scss') {
  $path = drupal_get_path('module', 'sassy_bootstrap') . '/bootstrap/lib/';
  $filename = str_replace(array(
    '.scss',
    '.sass',
  ), '', trim($filename, ' /._'));
  switch ($filename) {
    case '*':
    case 'bootstrap':
      return $path . 'bootstrap.scss';
    case 'forms':
    case 'mixins':
    case 'patterns':
    case 'reset':
    case 'scaffolding':
    case 'tables':
    case 'type':
    case 'variables':
      return $path . $filename . '.scss';
  }
  drupal_set_message(t('Unrecognised stylesheet "@file" requested. Available files are: bootstrap, forms, mixins, patterns, reset, scaffolding, tables, variables.', array(
    '@file' => $filename,
  )), 'error');
  return FALSE;
}