PluginProbe
GetResponse Forms by Optin Cat / 1.5.1
GetResponse Forms by Optin Cat v1.5.1
1.3.4 1.3.5 1.3.6 1.3.8 1.3.9 1.4.0 1.4.1 1.4.2 1.5.0 1.5.1 1.5.2 1.5.4 1.5.5 1.5.6 1.5.7 1.5.8 1.6.1 1.6.2 1.6.3 1.7.0 1.7.1 1.7.2 1.8.0 1.8.1 2.0.0 All 36 releases
getresponse / includes / classes / scssphp / src / Formatter / Compressed.php

Compressed.php in GetResponse Forms by Optin Cat 1.5.1, at includes/classes/scssphp/src/Formatter/Compressed.php

59 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * SCSSPHP
4 *
5 * @copyright 2012-2014 Leaf Corcoran
6 *
7 * @license http://opensource.org/licenses/gpl-license GPL-3.0
8 * @license http://opensource.org/licenses/MIT MIT
9 *
10 * @link http://leafo.net/scssphp
11 */
12
13 namespace Leafo\ScssPhp\Formatter;
14
15 use Leafo\ScssPhp\Formatter;
16
17 /**
18 * SCSS compressed formatter
19 *
20 * @author Leaf Corcoran <leafot@gmail.com>
21 */
22 class Compressed extends Formatter
23 {
24 public function __construct()
25 {
26 $this->indentLevel = 0;
27 $this->indentChar = ' ';
28 $this->break = '';
29 $this->open = '{';
30 $this->close = '}';
31 $this->tagSeparator = ',';
32 $this->assignSeparator = ':';
33 }
34
35 public function indentStr($n = 0)
36 {
37 return '';
38 }
39
40 public function blockLines($inner, $block)
41 {
42 $glue = $this->break.$inner;
43
44 foreach ($block->lines as $index => $line) {
45 if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') {
46 unset($block->lines[$index]);
47 } elseif (substr($line, 0, 3) === '/*!') {
48 $block->lines[$index] = '/*' . substr($line, 3);
49 }
50 }
51
52 echo $inner . implode($glue, $block->lines);
53
54 if (!empty($block->children)) {
55 echo $this->break;
56 }
57 }
58 }
59