You are here

function ctools_css_filter in Chaos Tool Suite (ctools) 6

Same name and namespace in other branches
  1. 7 includes/css.inc \ctools_css_filter()

Filter a chunk of CSS text.

This function disassembles the CSS into a raw format that makes it easier for our tool to work, then runs it through the filter and reassembles it. If you find that you want the raw data for some reason or another, you can use the disassemble/assemble functions yourself.

Parameters

$css: The CSS text to filter.

$compressed: If true, generate compressed output; if false, generate pretty output. Defaults to TRUE.

1 call to ctools_css_filter()
ctools_css_cache in includes/css.inc
Write a chunk of CSS to a temporary cache file and return the file name.

File

includes/css.inc, line 221

Code

function ctools_css_filter($css, $compressed = TRUE) {
  $css_data = ctools_css_disassemble($css);

  // Note: By using this function yourself you can control the allowed
  // properties and values list.
  $filtered = ctools_css_filter_css_data($css_data);
  return $compressed ? ctools_css_compress($filtered) : ctools_css_assemble($filtered);
}