diff --git a/phest/index.php b/phest/index.php index 53dc6d5..f88e818 100644 --- a/phest/index.php +++ b/phest/index.php @@ -19,7 +19,7 @@ define('DIR_PHEST',dirname(__FILE__)); require(DIR_PHEST.'/config.php'); - $ver = 'v0.9.2'; + $ver = 'v0.9.3'; error_reporting(E_ALL); ini_set('display_errors','On'); @@ -596,7 +596,7 @@ //ignorecomilejsオプションで、コンパイルしないjsを検証 if (!check_path_match($filepath,$config_yaml['ignorecompilejs'])){ //何か出力しないとブラウザ側でタイムアウトするので空白を出力 - echo '';flush();ob_flush(); + echo '';@flush();@ob_flush(); //コマンドラインで処理するために、一度テンポラリファイルとして書き出す $output_to = $dir_output.'/'.$filepath; diff --git a/phest/lib/vendor/scssphp/LICENSE.md b/phest/lib/vendor/scssphp/LICENSE.md old mode 100644 new mode 100755 diff --git a/phest/lib/vendor/scssphp/Makefile b/phest/lib/vendor/scssphp/Makefile old mode 100644 new mode 100755 diff --git a/phest/lib/vendor/scssphp/README.md b/phest/lib/vendor/scssphp/README.md old mode 100644 new mode 100755 index de5bb52..b02e022 --- a/phest/lib/vendor/scssphp/README.md +++ b/phest/lib/vendor/scssphp/README.md @@ -1,11 +1,11 @@ -# scssphp v0.0.7 +# scssphp v0.0.9 ### [![Build Status](https://secure.travis-ci.org/leafo/scssphp.png)](http://travis-ci.org/leafo/scssphp) `scssphp` is a compiler for SCSS written in PHP. -It implements SCSS 3.2.9. It does not implement the SASS syntax, only the SCSS +It implements SCSS 3.2.12. It does not implement the SASS syntax, only the SCSS syntax. Checkout the homepage, , for directions on how to use. diff --git a/phest/lib/vendor/scssphp/composer.json b/phest/lib/vendor/scssphp/composer.json old mode 100644 new mode 100755 diff --git a/phest/lib/vendor/scssphp/package.sh b/phest/lib/vendor/scssphp/package.sh new file mode 100755 index 0000000..02a528d --- /dev/null +++ b/phest/lib/vendor/scssphp/package.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# creates tar.gz for current version + +TARGET_DIR="site/www/src" + +VERSION=`./pscss -v | sed -n 's/^v\(.*\)$/\1/p'` +OUT_DIR="tmp/scssphp" +TMP=`dirname $OUT_DIR` + +mkdir -p $OUT_DIR +tar -c `git ls-files` | tar -C $OUT_DIR -x + +rm $OUT_DIR/.gitignore +rm $OUT_DIR/package.sh +rm $OUT_DIR/todo +rm -r $OUT_DIR/site + +OUT_PATH="$TARGET_DIR/scssphp-$VERSION.tar.gz" +tar -czf "$OUT_PATH" -C $TMP scssphp/ +echo "Wrote $OUT_PATH" + +rm -r $TMP + diff --git a/phest/lib/vendor/scssphp/scss.inc.php b/phest/lib/vendor/scssphp/scss.inc.php old mode 100644 new mode 100755 index ff0493a..344b55f --- a/phest/lib/vendor/scssphp/scss.inc.php +++ b/phest/lib/vendor/scssphp/scss.inc.php @@ -43,7 +43,7 @@ * @author Leaf Corcoran */ class scssc { - static public $VERSION = "v0.0.7"; + static public $VERSION = "v0.0.9"; static protected $operatorNames = array( '+' => "add", @@ -67,7 +67,6 @@ class scssc { "function" => "^", ); - static protected $numberPrecision = 5; static protected $unitTable = array( "in" => array( "in" => 1, @@ -91,9 +90,11 @@ class scssc { protected $userFunctions = array(); + protected $numberPrecision = 5; + protected $formatter = "scss_formatter_nested"; - function compile($code, $name=null) { + public function compile($code, $name=null) { $this->indentLevel = -1; $this->commentsSeen = array(); $this->extends = array(); @@ -186,6 +187,13 @@ protected function matchExtendsSingle($single, &$outOrigin) { $rem = array_diff($single, $target); foreach ($origin as $j => $new) { + // prevent infinite loop when target extends itself + foreach ($new as $new_selector) { + if (!array_diff($single, $new_selector)) { + continue 2; + } + } + $origin[$j][count($origin[$j]) - 1] = $this->combineSelectorSingle(end($new), $rem); } @@ -732,8 +740,9 @@ protected function compileChild($child, $out) { $this->throwError("Expected @content inside of mixin"); } + $strongTypes = array('include', 'block', 'for', 'while'); foreach ($content->children as $child) { - $this->storeEnv = ($child[0] == 'include' || $child[0] == 'block') + $this->storeEnv = (in_array($child[0], $strongTypes)) ? null : $content->scope; @@ -1131,7 +1140,7 @@ protected function op_lt_number_number($left, $right) { return $this->toBool($left[1] < $right[1]); } - protected function toBool($thing) { + public function toBool($thing) { return $thing ? self::$true : self::$false; } @@ -1179,7 +1188,7 @@ protected function compileValue($value) { return $h; case "number": - return round($value[1], self::$numberPrecision) . $value[2]; + return round($value[1], $this->numberPrecision) . $value[2]; case "string": return $value[1] . $this->compileStringContent($value) . $value[1]; case "function": @@ -1414,7 +1423,7 @@ protected function applyArguments($argDef, $argValues) { } elseif (!empty($default)) { $val = $default; } else { - $this->throwError("Missing argument $$name"); + $this->throwError("Missing argument $name"); } $this->set($name, $this->reduce($val, true), true); @@ -1450,24 +1459,22 @@ protected function set($name, $value, $shadow=false) { } } - // todo: this is bugged? protected function setExisting($name, $value, $env = null) { if (is_null($env)) $env = $this->getStoreEnv(); - if (isset($env->store[$name])) { + if (isset($env->store[$name]) || is_null($env->parent)) { $env->store[$name] = $value; - } elseif (!is_null($env->parent)) { - $this->setExisting($name, $value, $env->parent); } else { - $this->env->store[$name] = $value; + $this->setExisting($name, $value, $env->parent); } } protected function setRaw($name, $value) { - $this->env->store[$name] = $value; + $env = $this->getStoreEnv(); + $env->store[$name] = $value; } - protected function get($name, $defaultValue = null, $env = null) { + public function get($name, $defaultValue = null, $env = null) { $name = $this->normalizeName($name); if (is_null($env)) $env = $this->getStoreEnv(); @@ -1500,6 +1507,10 @@ public function setImportPaths($path) { $this->importPaths = (array)$path; } + public function setNumberPrecision($numberPrecision) { + $this->numberPrecision = $numberPrecision; + } + public function setFormatter($formatterName) { $this->formatter = $formatterName; } @@ -1533,7 +1544,7 @@ protected function importFile($path, $out) { } // results the file path for an import url if it exists - protected function findImport($url) { + public function findImport($url) { $urls = array(); // for "normal" scss imports (ignore vanilla css and external requests) @@ -1668,8 +1679,10 @@ protected function coerceColor($value) { case "keyword": $name = $value[1]; if (isset(self::$cssColors[$name])) { - list($r, $g, $b) = explode(',', self::$cssColors[$name]); - return array('color', (int) $r, (int) $g, (int) $b); + @list($r, $g, $b, $a) = explode(',', self::$cssColors[$name]); + return isset($a) + ? array('color', (int) $r, (int) $g, (int) $b, (int) $a) + : array('color', (int) $r, (int) $g, (int) $b); } return null; } @@ -1687,18 +1700,18 @@ protected function coerceString($value) { return null; } - protected function assertList($value) { + public function assertList($value) { if ($value[0] != "list") $this->throwError("expecting list"); return $value; } - protected function assertColor($value) { + public function assertColor($value) { if ($color = $this->coerceColor($value)) return $color; $this->throwError("expecting color"); } - protected function assertNumber($value) { + public function assertNumber($value) { if ($value[0] != "number") $this->throwError("expecting number"); return $value[1]; @@ -1724,7 +1737,7 @@ protected function fixColor($c) { return $c; } - function toHSL($red, $green, $blue) { + public function toHSL($red, $green, $blue) { $r = $red / 255; $g = $green / 255; $b = $blue / 255; @@ -1753,7 +1766,7 @@ function toHSL($red, $green, $blue) { return array('hsl', fmod($h, 360), $s * 100, $l * 100); } - function hueToRGB($m1, $m2, $h) { + public function hueToRGB($m1, $m2, $h) { if ($h < 0) $h += 1; elseif ($h > 1) @@ -1772,7 +1785,7 @@ function hueToRGB($m1, $m2, $h) { } // H from 0 to 360, S and L from 0 to 100 - function toRGB($hue, $saturation, $lightness) { + public function toRGB($hue, $saturation, $lightness) { if ($hue < 0) { $hue += 360; } @@ -1930,19 +1943,19 @@ protected function lib_ie_hex_str($args) { protected static $lib_red = array("color"); protected function lib_red($args) { - list($color) = $args; + $color = $this->coerceColor($args[0]); return $color[1]; } protected static $lib_green = array("color"); protected function lib_green($args) { - list($color) = $args; + $color = $this->coerceColor($args[0]); return $color[2]; } protected static $lib_blue = array("color"); protected function lib_blue($args) { - list($color) = $args; + $color = $this->coerceColor($args[0]); return $color[3]; } @@ -2188,8 +2201,8 @@ protected function lib_min($args) { $numbers = $this->getNormalizedNumbers($args); $min = null; foreach ($numbers as $key => $number) { - if (null === $min || $number <= $min[1]) { - $min = array($key, $number); + if (null === $min || $number[1] <= $min[1]) { + $min = array($key, $number[1]); } } @@ -2200,8 +2213,8 @@ protected function lib_max($args) { $numbers = $this->getNormalizedNumbers($args); $max = null; foreach ($numbers as $key => $number) { - if (null === $max || $number >= $max[1]) { - $max = array($key, $number); + if (null === $max || $number[1] >= $max[1]) { + $max = array($key, $number[1]); } } @@ -2220,12 +2233,12 @@ protected function getNormalizedNumbers($args) { if (null === $unit) { $unit = $number[2]; + $originalUnit = $item[2]; } elseif ($unit !== $number[2]) { $this->throwError('Incompatible units: "%s" and "%s".', $originalUnit, $item[2]); } - $originalUnit = $item[2]; - $numbers[$key] = $number[1]; + $numbers[$key] = $number; } return $numbers; @@ -2244,7 +2257,6 @@ protected function lib_nth($args) { return isset($list[2][$n]) ? $list[2][$n] : self::$defaultValue; } - protected function listSeparatorForJoin($list1, $sep) { if (is_null($sep)) return $list1[1]; switch ($this->compileValue($sep)) { @@ -2343,7 +2355,17 @@ protected function lib_comparable($args) { return $number1[2] == $number2[2] || $number1[2] == "" || $number2[2] == ""; } - protected function throwError($msg = null) { + /** + * Workaround IE7's content counter bug. + * + * @param array $args + */ + protected function lib_counter($args) { + $list = array_map(array($this, 'compileValue'), $args); + return array('string', '', array('counter(' . implode(',', $list) . ')')); + } + + public function throwError($msg = null) { if (func_num_args() > 1) { $msg = call_user_func_array("sprintf", func_get_args()); } @@ -2355,6 +2377,11 @@ protected function throwError($msg = null) { throw new Exception($msg); } + /** + * CSS Colors + * + * @see http://www.w3.org/TR/css3-color + */ static protected $cssColors = array( 'aliceblue' => '240,248,255', 'antiquewhite' => '250,235,215', @@ -2496,6 +2523,7 @@ protected function throwError($msg = null) { 'teal' => '0,128,128', 'thistle' => '216,191,216', 'tomato' => '255,99,71', + 'transparent' => '0,0,0,0', 'turquoise' => '64,224,208', 'violet' => '238,130,238', 'wheat' => '245,222,179', @@ -2542,7 +2570,7 @@ class scss_parser { static protected $commentMultiLeft = "/*"; static protected $commentMultiRight = "*/"; - function __construct($sourceName = null, $rootParser = true) { + public function __construct($sourceName = null, $rootParser = true) { $this->sourceName = $sourceName; $this->rootParser = $rootParser; @@ -2562,7 +2590,7 @@ static protected function makeOperatorStr($operators) { $operators)).')'; } - function parse($buffer) { + public function parse($buffer) { $this->count = 0; $this->env = null; $this->inParens = false; @@ -3325,7 +3353,7 @@ protected function argumentList(&$out) { $args[] = array("string", "", array(", ")); } - if (!$this->literal(")")) { + if (!$this->literal(")") || !count($args)) { $this->seek($s); return false; } @@ -3893,7 +3921,7 @@ public function getLineNo($pos) { * * {@internal This is a workaround for preg_match's 250K string match limit. }} * - * @param array $m Matches (passed by reference) + * @param array $m Matches (passed by reference) * @param string $delim Delimeter * * @return boolean True if match; false otherwise @@ -4208,7 +4236,7 @@ protected function inputName() { * @return string */ protected function findInput() { - if ($input = $this->inputName() + if (($input = $this->inputName()) && strpos($input, '..') === false && substr($input, -5) === '.scss' ) { @@ -4290,10 +4318,12 @@ protected function compile($in, $out) { /** * Compile requested scss and serve css. Outputs HTTP response. + * + * @param string $salt Prefix a string to the filename for creating the cache name hash */ - public function serve() { + public function serve($salt = '') { if ($input = $this->findInput()) { - $output = $this->cacheName($input); + $output = $this->cacheName($salt . $input); header('Content-type: text/css'); if ($this->needsCompile($input, $output)) { @@ -4332,7 +4362,7 @@ public function __construct($dir, $cacheDir=null, $scss=null) { } $this->cacheDir = $cacheDir; - if (!is_dir($this->cacheDir)) mkdir($this->cacheDir); + if (!is_dir($this->cacheDir)) mkdir($this->cacheDir, 0755, true); if (is_null($scss)) { $scss = new scssc(); diff --git a/phest/lib/vendor/scssphp/site/.gitignore b/phest/lib/vendor/scssphp/site/.gitignore new file mode 100755 index 0000000..6cff422 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/.gitignore @@ -0,0 +1,2 @@ +.sitegen_cache +.tup diff --git a/phest/lib/vendor/scssphp/site/composer.html b/phest/lib/vendor/scssphp/site/composer.html new file mode 100755 index 0000000..40d6b7a --- /dev/null +++ b/phest/lib/vendor/scssphp/site/composer.html @@ -0,0 +1,6 @@ +
{
+  "require": {
+    "leafo/scssphp": "$current_version"
+  }
+}
+
diff --git a/phest/lib/vendor/scssphp/site/docs/index.md b/phest/lib/vendor/scssphp/site/docs/index.md new file mode 100755 index 0000000..1a7b607 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/docs/index.md @@ -0,0 +1,306 @@ + title: Documentation +-- + +

scssphp $current_version Documentation

+ +
$index
+ +## PHP Interface + +### Including + +The entire project comes in a single file. Just include it somewhere to start +using it: + + ```php + compile(' + $color: #abc; + div { color: lighten($color, 20%); } + '); + ``` + +*

`compile($scssCode)` will attempt to compile a string of SCSS code. If it + succeeds then the CSS will be returned as a string. If there is any error, an + exception is thrown with an appropriate error message. +

+ +### Import Paths + +When you import a file using the `@import` directive, the current path of your +PHP script is used as the search path by default. This is often not what +you want, so there are two methods for manipulating the import path: +`addImportPath`, and `setImportPaths`. + +* `addImportPath($path)` will append `$path` to the list of the import + paths that are searched. + +* `setImportPaths($pathArray)` will replace the entire import path with + `$pathArray`. The value of `$pathArray` will be converted to an array if it + isn't one already. + +If the import path is set to `array()` then importing is effectively disabled. +The default import path is `array("")`, which means the current directory. + + ```php + setImportPaths("assets/stylesheets/"); + + // will search for `assets/stylesheets/mixins.scss' + echo $scss->compile('@import "mixins.scss"'); + ``` + +Besides adding static import paths, it's also possible to add custom import +functions. This allows you to load paths from a database, or HTTP, or using +files that SCSS would otherwise not process (such as vanilla CSS imports). + + ```php + addImportPath(function($path) { + if (!file_exists('stylesheets/'.$path)) return null; + return 'stylesheets/'.$path; + }); + + // will import `stylesheets/vanilla.css' + echo $scss->compile('@import "vanilla.css"'); + ``` + +### Output Formatting + +It's possible to customize the formatting of the output CSS by changing the +default formatter. + +Three formatters are included: + +* `scss_formatter` +* `scss_formatter_nested` *(default)* +* `scss_formatter_compressed` + +We can change the formatting using the `setFormatter` method. + +*

`setFormatter($formatterName)` sets the current formatter to `$formatterName`, + the name of a class as a string that implements the formatting interface. See + the source for `scss_formatter` for an example. +

+ +Given the following SCSS: + + ```scss + .navigation { + ul { + line-height: 20px; + color: blue; + a { + color: red; + } + } + } + + .footer { + .copyright { + color: silver; + } + } + ``` + +The formatters will output, + +`scss_formatter`: + + ```css + .navigation ul { + line-height: 20px; + color: blue; + } + .navigation ul a { + color: red; + } + .footer .copyright { + color: silver; + } + ``` + +`scss_formatter_nested`: + + ```css + .navigation ul { + line-height: 20px; + color: blue; } + .navigation ul a { + color: red; } + + .footer .copyright { + color: silver; } + ``` + +`scss_formatter_compressed`: + + ```css + .navigation ul{line-height:20px;color:blue;}.navigation ul a{color:red;}.footer .copyright{color:silver;} + ``` + +### Custom Functions + +It's possible to register custom functions written in PHP that can be called +from SCSS. Some possible applications include appending your assets directory +to a URL with an `asset-url` function, or converting image URLs to an embedded +data URI to reduce the number of requests on a page with a `data-uri` function. + +We can add and remove functions using the methods `registerFunction` and +`unregisterFunction`. + +* `registerFunction($functionName, $callable)` assigns the callable value to + the name `$functionName`. The name is normalized using the rules of SCSS. + Meaning underscores and dashes are interchangeable. If a function with the + same name already exists then it is replaced. + +* `unregisterFunction($functionName)` removes `$functionName` from the list of + available functions. + + +The `$callable` can be anything that PHP knows how to call using +`call_user_func`. The function receives two arguments when invoked. The first +is an array of SCSS typed arguments that the function was sent. The second is a +reference to the current `scss` instance. + +The *SCSS typed arguments* are actually just arrays that represent SCSS values. +SCSS has different types than PHP, and this is how **scssphp** represents them +internally. + +For example, the value `10px` in PHP would be `array("number", 1, "px")`. There +is a large variety of types. Experiment with a debugging function like `print_r` +to examine the possible inputs. + +The return value of the custom function can either be a SCSS type or a basic +PHP type. (such as a string or a number) If it's a PHP type, it will be converted +automatically to the corresponding SCSS type. + +As an example, a function called `add-two` is registered, which adds two numbers +together. PHP's anonymous function syntax is used to define the function. + + ```php + registerFunction("add-two", function($args) { + list($a, $b) = $args; + return $a[1] + $b[1]; + }); + + $scss->compile('.ex1 { result: add-two(10, 10); }'); + ``` + +It's worth noting that in this example we lose the units of the number, and we +also don't do any type checking. This will have undefined results if we give it +anything other than two numbers. + + +## SCSS Server + +The SCSS server is a small class that helps with automatically compiling SCSS. + +It's an endpoint for your web application that searches for SCSS files in a +directory then compiles and serves them as CSS. It will only compile +files if they've been modified (or one of the imports has been modified). + +### Using `serveFrom` + +`scss_server::serveFrom` is a simple to use function that should handle most cases. + +For example, create a file `style.php`: + + ```php + `scss_server::serveFrom($directory)` will serve SCSS files out of + `$directory`. It will attempt to get the path to the file out of + `$_SERVER["PATH_INFO"]`. (It also looks at the GET parameter `p`) +

+ +If it can not find the file it will return an HTTP 404 page: + + ```text + /* INPUT NOT FOUND scss v0.0.1 */ + ``` + +If the file can't be compiled due to an error, then an HTTP 500 page is +returned. Similar to the following: + + ```text + Parse error: parse error: failed at `height: ;` stylesheets/test.scss on line 8 + ``` + +By default , the SCSS server must have write access to the style sheet +directory. It writes its cache in a special directory called `scss_cache`. + +Also, because SCSS server writes headers, make sure no output is written before +it runs. + +### Using `scss_server` + +Creating an instance of `scss_server` is just another way of accomplishing what +`serveFrom` does. It let's us customize the cache directory and the instance +of the `scssc` that is used to compile + + +*

`new scss_server($sourceDir, $cacheDir, $scss)` creates a new server that + serves files from `$sourceDir`. The cache dir is where the cached compiled + files are placed. When `null`, `$sourceDir . "/scss_cache"` is used. `$scss` + is the instance of `scss` that is used to compile. +

+ +Just call the `serve` method to let it render its output. + +Here's an example of creating a SCSS server that outputs compressed CSS: + + ```php + setFormatter("scss_formatter_compressed"); + + $server = new scss_server("stylesheets", null, $scss); + $server->serve(); + ``` + + +## Command Line Tool + +A really basic command line tool is included for integration with scripts. It +is called `pscss`. It reads a SCSS file from standard out and returns the CSS. + +If passed the flag `-v`, input is ignored and the current version if returned. + +The flag `-f` can be used to set the [formatter](#Output_formatting): + + ```bash + $ ./pscss -f scss_formatter_compressed < styles.scss + ``` + diff --git a/phest/lib/vendor/scssphp/site/index.md b/phest/lib/vendor/scssphp/site/index.md new file mode 100755 index 0000000..1a49aa0 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/index.md @@ -0,0 +1,197 @@ +**scssphp** is a compiler for [SCSS][0] written in PHP. + +SCSS is a CSS preprocessor that adds many features like variables, mixins, +imports, color manipulation, functions, and tons of other powerful features. + +The entire compiler comes in a single class file ready for including in any +kind of project in addition to a command line tool for running the compiler +from the terminal. + +**scssphp** implements SCSS (3.2.12). It does not implement the SASS syntax, +only the SCSS syntax. + +Follow the author on twitter: [@moonscript](http://twitter.com/moonscript). + +
+ + +
+ + +## Installing + +You can always download the latest version here: +scssphp-$current_version.tar.gz + +You can also find the latest source online: + + +If you use [Packagist][2] for installing packages, then you can update your `composer.json` like so: + +$render{[[composer]]} + + +## Language Reference + +For a complete guide to the syntax of SCSS, consult the [official documentation][1]. + +## PHP Reference + +Complete documentation for **scssphp** is located at http://leafo.net/scssphp/docs/. + +### Quickstart + +If you just want to start serving compiled `scss` files as quick as possible +then start here. + +**scssphp** comes with a easy to use class that automatically compiles modified +`scss` files and serves them from a directory you specify. + +Create a file, like `style.php`: + + ```php + compile(' + $color: #abc; + div { color: lighten($color, 20%); } + '); + + ``` + +The `compile` method takes `SCSS` as a string, and returns the `CSS`. If there +is an error when compiling then an exception is thrown with an appropriate +message. + + +For a more detailed guide consult http://leafo.net/scssphp/docs/. + + +## Issues + +Find any issues? I'd love to fix them for you, post about them on [the issues tracker][3]. + +
+## Changelog + +* **0.0.9** -- December 23, 2013 + * fix @for/@while inside @content block (sergeylukin) + * fix functions in mixin_content (timonbaetz) + * fix infinite loop when target extends itself (oscherler) + * fix function arguments are lost inside of @content block + * allow setting number precision (kasperisager) + * add public function helpers (toBool, get, findImport, assertList, assertColor, assertNumber, throwError) (Burgov, atdt) + * add optional cache buster prefix to serve() method (iMoses) +* **0.0.8** -- September 16, 2013 + * Avoid IE7 content: counter bug + * Support transparent as color name + * Recursively create cache dir (turksheadsw) + * Fix for INPUT NOT FOUND (morgen32) +* **0.0.7** -- May 24, 2013 + * Port various fixes from leafo/lessphp. + * Improve filter precision. + * Parsing large image data-urls does not work. + * Add == and != ops for colors. + * @if and @while directives should treat null like false. + * Add pscss as bin in composer.json (Christian Lück). + * Fix !default bug (James Shannon, Alberto Aldegheri). + * Fix mixin content includes (James Shannon, Christian Brandt). + * Fix passing of varargs to another mixin. + * Fix interpolation bug in expToString() (Matti Jarvinen). +* **0.0.5** -- March 11, 2013 + * Better compile time errors + * Fix top level properties inside of a nested `@media` (Anthon Pang) + * Fix some issues with `@extends` (Anthon Pang) + * Enhanced handling of `null` (Anthon Pang) + * Helper functions shouldn't mix with css builtins (Anthon Pang) + * Enhance selector parsing (Guilherme Blanco, Anthon Pang) + * Add Placeholder selector support (Martin Hasoň) + * Add variable argument support (Martin Hasoň) + * Add zip, index, comparable functions (Martin Hasoň) + * A bunch of parser and bug fixes +* **0.0.4** -- Nov 3nd, 2012 + * [Import path can be a function](docs/#import_paths) (Christian Lück). + * Correctly parse media queries with more than one item (Christian Lück). + * Add `ie_hex_str`, `abs`, `min`, `max` functions (Martin Hasoň) + * Ignore expressions inside of `calc()` (Martin Hasoň) + * Improve operator evaluation (Martin Hasoň) + * Add [`@content`](http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-content) support. + * Misc bug fixes. +* **0.0.3** -- August 2nd, 2012 + * Add missing and/or/not operators. + * Expression evaluation happens correctly. + * Import file caching and _partial filename support. + * Misc bug fixes. +* **0.0.2** -- July 30th, 2012 + * SCSS server is aware of imports + * added custom function interface + * compressed formatter + * wrote documentation +* Initial Release v0.0.1 -- July 29th, 2012 + + + + + +## Comments + +
+ + + + [0]: http://sass-lang.com/ + [1]: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#css_extensions + [2]: http://packagist.org/ + [3]: https://github.com/leafo/scssphp/issues + [4]: https://github.com/leafo/scssphp/ diff --git a/phest/lib/vendor/scssphp/site/site.moon b/phest/lib/vendor/scssphp/site/site.moon new file mode 100755 index 0000000..d7089f1 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/site.moon @@ -0,0 +1,15 @@ +require "sitegen" + +tools = require "sitegen.tools" + +sitegen.create_site => + @current_version = "0.0.9" + @title = "SCSS Compiler in PHP" + + scssphp = tools.system_command "pscss < %s > %s", "css" + build scssphp, "style.scss", "style/style.css" + + deploy_to "leaf@leafo.net", "www/scssphp/" + + add "docs/index.md" + diff --git a/phest/lib/vendor/scssphp/site/style.scss b/phest/lib/vendor/scssphp/site/style.scss new file mode 100755 index 0000000..18ecc09 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/style.scss @@ -0,0 +1,303 @@ + +$site_width: 640px; + +$light_teal: #7FC7AF; +$teal: desaturate(#3FB8AF, 10%); +$brown: #DAD8A7; +$pink: darken(#FF9E9D, 10%); +$btn_color: desaturate(#FF3D7F, 10%); + +::selection { + background: red; + color: white; +} + +@mixin unselectable { + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; +} + +@mixin grad($top, $bottom) { + background-color: mix($top, $bottom); + background-image: linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -webkit-linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -moz-linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -o-linear-gradient(bottom, $bottom 0%, $top 100%); + background-image: -ms-linear-gradient(bottom, $bottom 0%, $top 100%); +} + +@mixin autograd($color, $amount: 10%) { + @include grad($color, darken($color, $amount)); +} + +body { + background: $pink; + font-family: Lato, sans-serif; +} + +.header, .footer, .body { + .inner { + width: $site_width; + margin: 0 auto; + } +} + +.header { + text-shadow: 0px -1px 0px darken($teal, 15%); + + .color { + background: $teal url(../img/tile.png); + border-top: 4px solid $light_teal; + box-shadow: inset 0px 1px 0px rgba(255,255,255, 0.5), inset 0px 8px 8px -8px #37505A, inset 0px -1px 0px rgba(255,255,255, 0.3); + } + + h1 { + font-family: 'Quicksand', sans-serif; + font-size: 40px; + line-height: 100px; + font-weight: normal; + margin: 0; + + a { + text-decoration: none; + color: #EDFFF9; + + &:active { + position: relative; + top: 1px; + } + } + } + + .nav { + padding: 8px 0; + font-size: 17px; + text-shadow: none; + background: darken($teal, 30%); + color: $teal; + box-shadow: inset 0px 4px 8px -4px rgba(0,0,0,0.9), inset 0px -1px 0px rgba(255,255,255, 0.8); + + a { + color: lighten($teal, 40%); + text-decoration: none; + + &:hover { + text-decoration: underline; + } + } + + .social { + float: right; + margin-top: -2px; + } + } + + .download-area { + float: right; + margin-top: 25px; + background: rgba(255,255,255, 0.3); + border-radius: 8px; + padding: 5px; + + a { + text-decoration: none; + } + + .download-button { + $height: 8px; + $depress: 4px; + + @include unselectable; + + color: white; + text-align: center; + + @include autograd($btn_color); + + position: relative; + top: -1 * $height; + + padding: 8px 20px; + border-radius: 8px; + text-shadow: none; + + box-shadow: 0px $height 0px darken($btn_color, 30%), inset 0px -1px 0px rgba(255,255,255, 0.2), inset 0px 1px 0px rgba(0,0,0, 0.2); + text-shadow: 0px 1px 2px darken($btn_color, 40%); + + cursor: pointer; + + -webkit-transition: all 0.05s ease-in-out; + -moz-transition: all 0.05s ease-in-out; + transition: all 0.05s ease-in-out; + + &:hover { + @include autograd(lighten($btn_color, 3%)); + } + + &:active { + box-shadow: 0px $height - $depress 0px darken($btn_color, 30%), inset 0px -1px 0px rgba(255,255,255, 0.2), inset 0px 1px 0px rgba(0,0,0, 0.2); + top: -1 * ($height - $depress); + } + + .top { + font-weight: bold; + font-size: 16px; + } + + .sub { + font-size: 14px; + } + } + } + +} + +.body { + $bg_color: #FEFFED; + $text_color: darken($brown, 60%); + box-shadow: inset 0px 4px 8px -4px rgba(0,0,0,0.7), inset 0px -4px 8px -4px rgba(0,0,0,0.4); + background: $bg_color; + overflow: hidden; + color: $text_color; + font-size: 18px; + padding-bottom: 20px; + + .inner { + background: white; + margin-top: 20px; + padding: 30px 50px; + border: 1px solid lightGrey; + box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.19); + + h1, h2, h3 { + margin: 0 0 20px 0; + } + } + + h1, h2, h3 { + text-shadow: 1px 1px 0px $bg_color, 2px 2px 0px rgba($text_color, 0.3); + letter-spacing: -1px; + } + + h3 { + color: #4D4C3D; + } + + p { + margin: 0 0 15px 0; + } + + a { + color: #DB1C4A; + &:hover { + color: lighten(#DB1C4A, 10%); + } + } + + pre { + margin: 20px 0; + } +} + +.footer { + font-size: 16px; + color: lighten($pink, 20%); + text-shadow: 0px 1px 0px darken($pink, 20%); + + border-top: 1px dashed darken($pink, 50%); + box-shadow: inset 0px 1px 0px rgba(255,255,255, 0.5); + padding: 8px 0 20px 0; + + line-height: 150%; + + a { + color: white; + font-weight: bold; + text-decoration: none; + padding: 0 4px; + border-radius: 4px; + border: 1px solid lighten($pink, 4%); + + &:hover { + background: darken($pink, 3%); + border: 1px solid lighten($pink, 4%); + } + } +} + + +p { + line-height: 150%; + code { + background: rgba(0,0,0, 0.1); + border-radius: 4px; + padding: 1px 4px; + } +} + +.comments { + font-size: 12px; +} + +.index { + line-height: 150%; + margin-bottom: 20px; + + ul { + margin: 0; + } +} + +.highlight { + background: #333; + color: white; + font-size: 14px; + padding: 10px; + box-shadow: 0px 1px 3px rgba(0,0,0, 0.7), inset 0px 0px 0px 1px rgba(255,255,255,0.3); + border-radius: 2px; + border: 1px solid #222; + + + // builtins + .nb { + color: #FFA67C; + } + + // strings + .s, .s1, .s2, .se, .nt { + color: #ffe898; + } + + // proper names + .nc, .vc, .bp { + color: #98d9ff; + } + + // true, false, nil + .kc { + color: #acfff0; + } + + // function lit, braces, parens + .nf, .kt { + color: #9fff98; + } + + .nv { + color: #ff9898; + } + + // keywords + .k, .kd, .na { + color: #cb98ff; + } + + .c1, .c2 { + color: #929292; + } + + .m, .mi, .mf, .mh, .o { + color: #9495ff; + } +} diff --git a/phest/lib/vendor/scssphp/site/templates/index.html b/phest/lib/vendor/scssphp/site/templates/index.html new file mode 100755 index 0000000..587b691 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/templates/index.html @@ -0,0 +1,81 @@ + + + + + $if{"title"}[[$title - ]]scssphp + + + + $analytics{"UA-136625-1"} + + + + +
+
+ $body +
+
+ + + + + + + + + Fork me on GitHub + + diff --git a/phest/lib/vendor/scssphp/site/www/.gitignore b/phest/lib/vendor/scssphp/site/www/.gitignore new file mode 100755 index 0000000..e821797 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/www/.gitignore @@ -0,0 +1,2 @@ +docs/index.html +index.html \ No newline at end of file diff --git a/phest/lib/vendor/scssphp/site/www/img/tile.png b/phest/lib/vendor/scssphp/site/www/img/tile.png new file mode 100755 index 0000000..ecb7149 Binary files /dev/null and b/phest/lib/vendor/scssphp/site/www/img/tile.png differ diff --git a/phest/lib/vendor/scssphp/site/www/style/normalize.css b/phest/lib/vendor/scssphp/site/www/style/normalize.css new file mode 100755 index 0000000..8fa27e0 --- /dev/null +++ b/phest/lib/vendor/scssphp/site/www/style/normalize.css @@ -0,0 +1,500 @@ +/*! normalize.css 2012-07-07T09:50 UTC - http://github.com/necolas/normalize.css */ + +/* ========================================================================== + HTML5 display definitions + ========================================================================== */ + +/* + * Corrects `block` display not defined in IE6/7/8/9 & FF3. + */ + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section, +summary { + display: block; +} + +/* + * Corrects `inline-block` display not defined in IE6/7/8/9 & FF3. + */ + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +/* + * Prevents modern browsers from displaying `audio` without controls. + * Remove excess height in iOS5 devices. + */ + +audio:not([controls]) { + display: none; + height: 0; +} + +/* + * Addresses styling for `hidden` attribute not present in IE7/8/9, FF3, S4. + * Known issue: no IE6 support. + */ + +[hidden] { + display: none; +} + +/* ========================================================================== + Base + ========================================================================== */ + +/* + * 1. Corrects text resizing oddly in IE6/7 when body `font-size` is set using + * `em` units. + * 2. Prevents iOS text size adjust after orientation change, without disabling + * user zoom. + */ + +html { + font-size: 100%; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + -ms-text-size-adjust: 100%; /* 2 */ +} + +/* + * Addresses `font-family` inconsistency between `textarea` and other form + * elements. + */ + +html, +button, +input, +select, +textarea { + font-family: sans-serif; +} + +/* + * Addresses margins handled incorrectly in IE6/7. + */ + +body { + margin: 0; +} + +/* ========================================================================== + Links + ========================================================================== */ + +/* + * Addresses `outline` inconsistency between Chrome and other browsers. + */ + +a:focus { + outline: thin dotted; +} + +/* + * Improves readability when focused and also mouse hovered in all browsers. + * people.opera.com/patrickl/experiments/keyboard/test + */ + +a:active, +a:hover { + outline: 0; +} + +/* ========================================================================== + Typography + ========================================================================== */ + +/* + * Addresses font sizes and margins set differently in IE6/7. + * Addresses font sizes within `section` and `article` in FF4+, Chrome, S5. + */ + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +h2 { + font-size: 1.5em; + margin: 0.83em 0; +} + +h3 { + font-size: 1.17em; + margin: 1em 0; +} + +h4 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.75em; + margin: 2.33em 0; +} + +/* + * Addresses styling not present in IE7/8/9, S5, Chrome. + */ + +abbr[title] { + border-bottom: 1px dotted; +} + +/* + * Addresses style set to `bolder` in FF3+, S4/5, Chrome. + */ + +b, +strong { + font-weight: bold; +} + +blockquote { + margin: 1em 40px; +} + +/* + * Addresses styling not present in S5, Chrome. + */ + +dfn { + font-style: italic; +} + +/* + * Addresses styling not present in IE6/7/8/9. + */ + +mark { + background: #ff0; + color: #000; +} + +/* + * Addresses margins set differently in IE6/7. + */ + +p, +pre { + margin: 1em 0; +} + +/* + * Corrects font family set oddly in IE6, S4/5, Chrome. + * en.wikipedia.org/wiki/User:Davidgothberg/Test59 + */ + +code, +kbd, +pre, +samp { + font-family: monospace, serif; + _font-family: 'courier new', monospace; + font-size: 1em; +} + +/* + * Improves readability of pre-formatted text in all browsers. + */ + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +/* + * Addresses CSS quotes not supported in IE6/7. + */ + +q { + quotes: none; +} + +/* + * Addresses `quotes` property not supported in S4. + */ + +q:before, +q:after { + content: ''; + content: none; +} + +small { + font-size: 75%; +} + +/* + * Prevents `sub` and `sup` affecting `line-height` in all browsers. + * gist.github.com/413930 + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +/* ========================================================================== + Lists + ========================================================================== */ + +/* + * Addresses margins set differently in IE6/7. + */ + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +/* + * Addresses paddings set differently in IE6/7. + */ + +menu, +ol, +ul { + padding: 0 0 0 40px; +} + +/* + * Corrects list images handled incorrectly in IE7. + */ + +nav ul, +nav ol { + list-style: none; + list-style-image: none; +} + +/* ========================================================================== + Embedded content + ========================================================================== */ + +/* + * 1. Removes border when inside `a` element in IE6/7/8/9, FF3. + * 2. Improves image quality when scaled in IE7. + * code.flickr.com/blog/2008/11/12/on-ui-quality-the-little-things-client-side-image-resizing/ + */ + +img { + border: 0; /* 1 */ + -ms-interpolation-mode: bicubic; /* 2 */ +} + +/* + * Corrects overflow displayed oddly in IE9. + */ + +svg:not(:root) { + overflow: hidden; +} + +/* ========================================================================== + Figures + ========================================================================== */ + +/* + * Addresses margin not present in IE6/7/8/9, S5, O11. + */ + +figure { + margin: 0; +} + +/* ========================================================================== + Forms + ========================================================================== */ + +/* + * Corrects margin displayed oddly in IE6/7. + */ + +form { + margin: 0; +} + +/* + * Define consistent border, margin, and padding. + */ + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +/* + * 1. Corrects color not being inherited in IE6/7/8/9. + * 2. Corrects text not wrapping in FF3. + * 3. Corrects alignment displayed oddly in IE6/7. + */ + +legend { + border: 0; /* 1 */ + padding: 0; + white-space: normal; /* 2 */ + *margin-left: -7px; /* 3 */ +} + +/* + * 1. Corrects font size not being inherited in all browsers. + * 2. Addresses margins set differently in IE6/7, FF3+, S5, Chrome. + * 3. Improves appearance and consistency in all browsers. + */ + +button, +input, +select, +textarea { + font-size: 100%; /* 1 */ + margin: 0; /* 2 */ + vertical-align: baseline; /* 3 */ + *vertical-align: middle; /* 3 */ +} + +/* + * Addresses FF3/4 setting `line-height` on `input` using `!important` in the + * UA stylesheet. + */ + +button, +input { + line-height: normal; +} + +/* + * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` + * and `video` controls. + * 2. Corrects inability to style clickable `input` types in iOS. + * 3. Improves usability and consistency of cursor style between image-type + * `input` and others. + * 4. Removes inner spacing in IE7 without affecting normal text inputs. + * Known issue: inner spacing remains in IE6. + */ + +button, +html input[type="button"], /* 1 */ +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; /* 2 */ + cursor: pointer; /* 3 */ + *overflow: visible; /* 4 */ +} + +/* + * Re-set default cursor for disabled elements. + */ + +button[disabled], +input[disabled] { + cursor: default; +} + +/* + * 1. Addresses box sizing set to content-box in IE8/9. + * 2. Removes excess padding in IE8/9. + * 3. Removes excess padding in IE7. + * Known issue: excess padding remains in IE6. + */ + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ + *height: 13px; /* 3 */ + *width: 13px; /* 3 */ +} + +/* + * 1. Addresses `appearance` set to `searchfield` in S5, Chrome. + * 2. Addresses `box-sizing` set to `border-box` in S5, Chrome (include `-moz` + * to future-proof). + */ + +input[type="search"] { + -webkit-appearance: textfield; /* 1 */ + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; /* 2 */ + box-sizing: content-box; +} + +/* + * Removes inner padding and search cancel button in S5, Chrome on OS X. + */ + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +/* + * Removes inner padding and border in FF3+. + */ + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +/* + * 1. Removes default vertical scrollbar in IE6/7/8/9. + * 2. Improves readability and alignment in all browsers. + */ + +textarea { + overflow: auto; /* 1 */ + vertical-align: top; /* 2 */ +} + +/* ========================================================================== + Tables + ========================================================================== */ + +/* + * Remove most spacing between table cells. + */ + +table { + border-collapse: collapse; + border-spacing: 0; +} diff --git a/phest/lib/vendor/scssphp/tests/ApiTest.php b/phest/lib/vendor/scssphp/tests/ApiTest.php old mode 100644 new mode 100755 diff --git a/phest/lib/vendor/scssphp/tests/ExceptionTest.php b/phest/lib/vendor/scssphp/tests/ExceptionTest.php old mode 100644 new mode 100755 index c5fb2b5..63d1db6 --- a/phest/lib/vendor/scssphp/tests/ExceptionTest.php +++ b/phest/lib/vendor/scssphp/tests/ExceptionTest.php @@ -31,6 +31,26 @@ public function testThrowError($scss, $expectedExceptionMessage) { public function provideScss() { return array( array(<<> new[:-1] . before . new[-1] . after + + new.len > 1 + before not empty + +