LeafoScssPhpFormatterCompressed

SCSS compressed formatter.

Defined (1)

The class is defined in the following location(s).

/inc/ReduxFramework/ReduxCore/inc/scssphp/src/Formatter/Compressed.php  
  1. class Compressed extends Formatter 
  2. public function __construct() 
  3. $this->indentLevel = 0; 
  4. $this->indentChar = ' '; 
  5. $this->break = ''; 
  6. $this->open = '{'; 
  7. $this->close = '}'; 
  8. $this->tagSeparator = ', '; 
  9. $this->assignSeparator = ':'; 
  10.  
  11. public function indentStr($n = 0) 
  12. return ''; 
  13.  
  14. public function blockLines($inner, $block) 
  15. $glue = $this->break.$inner; 
  16.  
  17. foreach ($block->lines as $index => $line) { 
  18. if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') { 
  19. unset($block->lines[$index]); 
  20. } elseif (substr($line, 0, 3) === '/*!') { 
  21. $block->lines[$index] = '/*' . substr($line, 3); 
  22.  
  23. echo $inner . implode($glue, $block->lines); 
  24.  
  25. if (!empty($block->children)) { 
  26. echo $this->break;