From 32427ebb59c4843edba91b7cf40730c1c293f40f Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 00:23:18 +0100 Subject: [PATCH 01/33] added automated line commentary --- scss.inc.php | 1 + src/Compiler.php | 6 +++ src/LineCommentator.php | 103 ++++++++++++++++++++++++++++++++++++++++ src/Server.php | 6 ++- 4 files changed, 114 insertions(+), 2 deletions(-) create mode 100644 src/LineCommentator.php diff --git a/scss.inc.php b/scss.inc.php index a49f7c9f..9812e8ee 100644 --- a/scss.inc.php +++ b/scss.inc.php @@ -15,5 +15,6 @@ include_once __DIR__ . '/src/Parser.php'; include_once __DIR__ . '/src/Version.php'; include_once __DIR__ . '/src/Server.php'; + include_once __DIR__ . '/src/LineCommentator.php'; include_once __DIR__ . '/classmap.php'; } diff --git a/src/Compiler.php b/src/Compiler.php index ebd15d6e..04de6a2f 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -797,10 +797,16 @@ protected function compileChild($child, $out) ); break; case 'comment': + if ($out->type == 'root') { $this->compileComment($child); break; } + if (strpos($child[1], '/* line ') !==FALSE ) { + $out->lines[] = "Block-Kommentar: ".$child[1]; + $this->compileComment($child); + break; + } $out->lines[] = $child[1]; break; diff --git a/src/LineCommentator.php b/src/LineCommentator.php new file mode 100644 index 00000000..6b201984 --- /dev/null +++ b/src/LineCommentator.php @@ -0,0 +1,103 @@ +'; + + //we use this to indicate that we are currently looping within a multiline comment + static protected $inside_multiline; + + /* insert line number as commentary within the SCSS + * + * @return string; + */ + + static function insertLineComments($scss, $filepath) + { + + $lines = $scss; + $linenumber = 0; + $new_scss_content = array(); + + foreach ($lines as $line) { + $linenumber++; + $line = trim($line); + + //check if empty + + /* note: there will most likely still be line comments for empty lines in the compiled css. + the reason for the other empty lines is that scssphp will shift our line commentary while compiling. + but this is nothing to worry about, since our debugging information (the line numbers) will still be correct */ + + if (empty($line)) { + continue; + } + + //check for commment + if (self::isComment($line) || self::$inside_multiline) { + $new_scss_content[] = $line; + continue; + } + + $new_scss_content[] = self::$comment_indicator_start . ' line ' . $linenumber . ', ' . $filepath . ' ' . self::$comment_indicator_end; + $new_scss_content[] = $line; + + } + + return implode("\n", $new_scss_content); + } + + + /* + * we don't want to mess arozbd with existing comments since this can easily lead to parsing errors. + * + * @return boolean + */ + + static function isComment($line) + { + + /* a comment has started, but did not end in the same line */ + if (strpos($line, self::$comment_indicator_start) !== FALSE && strpos($line, self::$comment_indicator_end) === FALSE) { + self::$inside_multiline = TRUE; + return true; + + /* check for comment to end */ + } else if (strpos($line, self::$comment_indicator_end) !== FALSE) { + self::$inside_multiline = FALSE; + return true; + } + + /*same check for html comments within scss.. just in case someone is having a bad day + scssphp will remove this tags later on, but still has a problem with it if we wrap an CSS commentary around it*/ + + if (strpos($line, self::$html_comment_indicator_start) !== FALSE && strpos($line, self::$html_comment_indicator_end) === FALSE) { + self::$inside_multiline = TRUE; + return true; + + } else if (strpos($line, self::$comment_indicator_end) !== FALSE) { + self::$inside_multiline = FALSE; + return true; + } + + return false; + } + + +} \ No newline at end of file diff --git a/src/Server.php b/src/Server.php index e972bcc1..cbcd7a06 100644 --- a/src/Server.php +++ b/src/Server.php @@ -14,12 +14,14 @@ use Leafo\ScssPhp\Compiler; use Leafo\ScssPhp\Version; +use Leafo\ScssPhp\LineCommentator; /** * SCSS server * * @author Leaf Corcoran */ + class Server { /** @@ -51,7 +53,6 @@ protected function inputName() return substr($_SERVER['DOCUMENT_URI'], strlen($_SERVER['SCRIPT_NAME'])); } } - /** * Get path to requested .scss file * @@ -184,7 +185,8 @@ protected function getIfNoneMatchHeader() protected function compile($in, $out) { $start = microtime(true); - $css = $this->scss->compile(file_get_contents($in), $in); + $scss = LineCommentator::insertLineComments(file($in),$in); + $css = $this->scss->compile($scss, $in); $elapsed = round((microtime(true) - $start), 4); $v = Version::VERSION; From 88b2ecc37fe6b00e332137eadd6a2452d90e2176 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 01:51:24 +0100 Subject: [PATCH 02/33] renewed tests --- tests/inputs/nesting_commentary.scss | 49 ++++++++++++++++++++++++++++ tests/outputs/nesting_commentary.css | 25 ++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 tests/inputs/nesting_commentary.scss create mode 100644 tests/outputs/nesting_commentary.css diff --git a/tests/inputs/nesting_commentary.scss b/tests/inputs/nesting_commentary.scss new file mode 100644 index 00000000..475455b4 --- /dev/null +++ b/tests/inputs/nesting_commentary.scss @@ -0,0 +1,49 @@ + + +body { + color: red; +} + + +div { + color: red; + height: yes; + + /*commentary for pre */ + pre { + color: blue; + } +} + + +$color: blue; + + +div { + /*commentary for font: 10px hello world*/ + font: 10px hello world { + size: 10px; + color: $color; + } + + /*commentary for border */ + border: { + left: 1px solid blue; + right: 2px dashed green; + } +} + + +#nested-nesting { + bar: baz; + bang: { + bop: bar; + /*commentary for bip*/ + bip: 1px; + blat: { + baf: bort + } + } +} + + diff --git a/tests/outputs/nesting_commentary.css b/tests/outputs/nesting_commentary.css new file mode 100644 index 00000000..d7ca92db --- /dev/null +++ b/tests/outputs/nesting_commentary.css @@ -0,0 +1,25 @@ +body { + color: red; } + +div { + color: red; + height: yes; + /*commentary for pre */ } + div pre { + color: blue; } + +div { + /*commentary for font: 10px hello world*/ + font: 10px hello world; + font-size: 10px; + font-color: blue; + /*commentary for border */ + border-left: 1px solid blue; + border-right: 2px dashed green; } + +#nested-nesting { + bar: baz; + bang-bop: bar; + /*commentary for bip*/ + bang-bip: 1px; + bang-blat-baf: bort; } From 82dc4f08eff1c418b0281167de5607bce60bef37 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:03:52 +0100 Subject: [PATCH 03/33] integrated optional line numbering functionality into compiler.php for easier frontend debugging call "setLineNumbers(true)" when creating a new instance of the compiler.php to output scss line numbers within the css file --- src/Compiler.php | 38 +++++++++- src/LineCommentator.php | 109 ++++++++++++++++++++------- src/Server.php | 6 +- tests/inputs/nesting_commentary.scss | 49 ------------ tests/outputs/nesting_commentary.css | 25 ------ 5 files changed, 117 insertions(+), 110 deletions(-) delete mode 100644 tests/inputs/nesting_commentary.scss delete mode 100644 tests/outputs/nesting_commentary.css diff --git a/src/Compiler.php b/src/Compiler.php index 04de6a2f..a68a6445 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -14,6 +14,7 @@ use Leafo\ScssPhp\Colors; use Leafo\ScssPhp\Parser; +use Leafo\ScssPhp\LineCommentator; /** * The scss compiler and parser. @@ -99,6 +100,8 @@ class Compiler protected $formatter = 'Leafo\ScssPhp\Formatter\Nested'; + protected $lineNumbers = FALSE; + /** * Compile scss * @@ -120,6 +123,10 @@ public function compile($code, $name = null) $locale = setlocale(LC_NUMERIC, 0); setlocale(LC_NUMERIC, 'C'); + if ($this->isLineNumbers()) { + $code = LineCommentator::insertLineComments(file($name), $name); + } + $this->parser = new Parser($name); $tree = $this->parser->parse($code); @@ -802,8 +809,11 @@ protected function compileChild($child, $out) $this->compileComment($child); break; } - if (strpos($child[1], '/* line ') !==FALSE ) { - $out->lines[] = "Block-Kommentar: ".$child[1]; + + //do not nest line comments into the parrent block + //for further information on the issue see https://github.com/leafo/scssphp/issues/228 + + if ($this->isLineNumbers() && strpos($child[1], '/* line ') !==FALSE) { $this->compileComment($child); break; } @@ -3009,4 +3019,26 @@ public function throwError($msg = null) throw new \Exception($msg); } -} + + /* + * check if line number feature is active + * @return boolean + */ + public function isLineNumbers() + { + return $this->lineNumbers; + } + + /** + * use this function to turn line numbers on + * @return boolean + */ + public function setLineNumbers($lineNumbers) + { + $this->lineNumbers = $lineNumbers; + } + + + + +} \ No newline at end of file diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 6b201984..31440ef6 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -1,71 +1,123 @@ '; + const block_indicator_start = '{'; + const block_indicator_end = '}'; + const property_indicator = ': '; + + const html_comment_indicator_start = ''; //we use this to indicate that we are currently looping within a multiline comment static protected $inside_multiline; - /* insert line number as commentary within the SCSS + + /* insert line number as commentary within the SCSS file * * @return string; */ + static function insertLineComments($scss, $filepath) { + //delete emtpy lines from array + $scss = array_filter($scss, + function ($value) { + $value = trim($value); + return !empty($value); + }); $lines = $scss; - $linenumber = 0; $new_scss_content = array(); - foreach ($lines as $line) { - $linenumber++; - $line = trim($line); + $filepath = str_replace('\\','/',$filepath); - //check if empty + foreach ($lines as $linenumber => $line) { - /* note: there will most likely still be line comments for empty lines in the compiled css. - the reason for the other empty lines is that scssphp will shift our line commentary while compiling. - but this is nothing to worry about, since our debugging information (the line numbers) will still be correct */ + $line = trim($line); + $nextline = trim(next($lines)); - if (empty($line)) { + //check if line is a commment + if (self::isComment($line) || self::$inside_multiline) { + $new_scss_content[] = $line; continue; } - //check for commment - if (self::isComment($line) || self::$inside_multiline) { + //only write line numbers for selectors to reduce overhead + if (self::isSelector($line, $nextline) == FALSE) { $new_scss_content[] = $line; continue; } - $new_scss_content[] = self::$comment_indicator_start . ' line ' . $linenumber . ', ' . $filepath . ' ' . self::$comment_indicator_end; + + //output line commment + $new_scss_content[] = self::comment_indicator_start . ' line ' . ($linenumber + 1) . ', ' . $filepath . ' ' . self::comment_indicator_end; + $new_scss_content[] = $line; } - return implode("\n", $new_scss_content); + + return implode("\r\n", $new_scss_content); + } + + /* + * looking for selector block + * @return boolean + */ + static function isSelector($line, $nextline = NULL) + { + + $bracket_position = strpos($nextline, self::block_indicator_start); + + if ((strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) + && self::isProperty($line) === FALSE && strpos($line, self::block_indicator_start) !== 0 + ) { + + return true; + } + + return false; + + } + + /* + * check for property + * + * @return boolean + */ + static function isProperty($line) + { + if (strpos($line, self::property_indicator) !== FALSE) { + return true; + } + + return false; } /* - * we don't want to mess arozbd with existing comments since this can easily lead to parsing errors. + * we don't want to mess around with existing comments since this can easily lead to parsing errors. * * @return boolean */ @@ -74,12 +126,12 @@ static function isComment($line) { /* a comment has started, but did not end in the same line */ - if (strpos($line, self::$comment_indicator_start) !== FALSE && strpos($line, self::$comment_indicator_end) === FALSE) { + if (strpos($line, self::comment_indicator_start) !== FALSE && strpos($line, self::comment_indicator_end) === FALSE) { self::$inside_multiline = TRUE; return true; - /* check for comment to end */ - } else if (strpos($line, self::$comment_indicator_end) !== FALSE) { + /* check for comment to end */ + } else if (strpos($line, self::comment_indicator_end) !== FALSE) { self::$inside_multiline = FALSE; return true; } @@ -87,11 +139,11 @@ static function isComment($line) /*same check for html comments within scss.. just in case someone is having a bad day scssphp will remove this tags later on, but still has a problem with it if we wrap an CSS commentary around it*/ - if (strpos($line, self::$html_comment_indicator_start) !== FALSE && strpos($line, self::$html_comment_indicator_end) === FALSE) { + if (strpos($line, self::html_comment_indicator_start) !== FALSE && strpos($line, self::html_comment_indicator_end) === FALSE) { self::$inside_multiline = TRUE; return true; - } else if (strpos($line, self::$comment_indicator_end) !== FALSE) { + } else if (strpos($line, self::comment_indicator_end) !== FALSE) { self::$inside_multiline = FALSE; return true; } @@ -99,5 +151,4 @@ static function isComment($line) return false; } - } \ No newline at end of file diff --git a/src/Server.php b/src/Server.php index cbcd7a06..e972bcc1 100644 --- a/src/Server.php +++ b/src/Server.php @@ -14,14 +14,12 @@ use Leafo\ScssPhp\Compiler; use Leafo\ScssPhp\Version; -use Leafo\ScssPhp\LineCommentator; /** * SCSS server * * @author Leaf Corcoran */ - class Server { /** @@ -53,6 +51,7 @@ protected function inputName() return substr($_SERVER['DOCUMENT_URI'], strlen($_SERVER['SCRIPT_NAME'])); } } + /** * Get path to requested .scss file * @@ -185,8 +184,7 @@ protected function getIfNoneMatchHeader() protected function compile($in, $out) { $start = microtime(true); - $scss = LineCommentator::insertLineComments(file($in),$in); - $css = $this->scss->compile($scss, $in); + $css = $this->scss->compile(file_get_contents($in), $in); $elapsed = round((microtime(true) - $start), 4); $v = Version::VERSION; diff --git a/tests/inputs/nesting_commentary.scss b/tests/inputs/nesting_commentary.scss deleted file mode 100644 index 475455b4..00000000 --- a/tests/inputs/nesting_commentary.scss +++ /dev/null @@ -1,49 +0,0 @@ - - -body { - color: red; -} - - -div { - color: red; - height: yes; - - /*commentary for pre */ - pre { - color: blue; - } -} - - -$color: blue; - - -div { - /*commentary for font: 10px hello world*/ - font: 10px hello world { - size: 10px; - color: $color; - } - - /*commentary for border */ - border: { - left: 1px solid blue; - right: 2px dashed green; - } -} - - -#nested-nesting { - bar: baz; - bang: { - bop: bar; - /*commentary for bip*/ - bip: 1px; - blat: { - baf: bort - } - } -} - - diff --git a/tests/outputs/nesting_commentary.css b/tests/outputs/nesting_commentary.css deleted file mode 100644 index d7ca92db..00000000 --- a/tests/outputs/nesting_commentary.css +++ /dev/null @@ -1,25 +0,0 @@ -body { - color: red; } - -div { - color: red; - height: yes; - /*commentary for pre */ } - div pre { - color: blue; } - -div { - /*commentary for font: 10px hello world*/ - font: 10px hello world; - font-size: 10px; - font-color: blue; - /*commentary for border */ - border-left: 1px solid blue; - border-right: 2px dashed green; } - -#nested-nesting { - bar: baz; - bang-bop: bar; - /*commentary for bip*/ - bang-bip: 1px; - bang-blat-baf: bort; } From 8d4481613338fc6ee502823b21f5cbad40d2bcdc Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:18:24 +0100 Subject: [PATCH 04/33] updated project description --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 0d09fde2..d0885c42 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,32 @@ you can run the following command to rebuild all the tests: BUILD=true phpunit tests This will compile all the tests, and save results into `tests/outputs`. + +## (optional) output scss line numbers + +Now you can output the original SCSS line numbers within the compiled CSS file for better frontend debugging. + +Works great in combination with frontend debugging tools like https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ + +To activate this feature you need to call `->setLineNumbers(true)` after creating a new instance of compiler.php + +code sample: + + namespace Leafo\ScssPhp; + + use Leafo\ScssPhp\Server; + use \Leafo\ScssPhp\Compiler; + + $directory = "css"; + + require "lib/scssphp/scss.inc.php"; + + + $scss = new Compiler(); + $scss->setLineNumbers(true); + + $server = new Server($directory, null, $scss); + $server->serve(); + + +Performance impact is around 10%. \ No newline at end of file From 89cd77d091ad753f52aaa592413d3e0d82e74173 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:19:41 +0100 Subject: [PATCH 05/33] updated project description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d0885c42..c4159747 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ you can run the following command to rebuild all the tests: This will compile all the tests, and save results into `tests/outputs`. -## (optional) output scss line numbers +## (optional) Output SCSS line numbers Now you can output the original SCSS line numbers within the compiled CSS file for better frontend debugging. From 06c58626c690a5f4f5f10bfec07660a92d20a0d2 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:21:29 +0100 Subject: [PATCH 06/33] updated project description --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c4159747..02446af7 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Works great in combination with frontend debugging tools like https://addons.moz To activate this feature you need to call `->setLineNumbers(true)` after creating a new instance of compiler.php code sample: - + ``` php namespace Leafo\ScssPhp; use Leafo\ScssPhp\Server; From 485a4b702daaebe57eff93a3064471fb1879bf73 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:22:01 +0100 Subject: [PATCH 07/33] Revert "updated project description" This reverts commit 06c58626c690a5f4f5f10bfec07660a92d20a0d2. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 02446af7..c4159747 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Works great in combination with frontend debugging tools like https://addons.moz To activate this feature you need to call `->setLineNumbers(true)` after creating a new instance of compiler.php code sample: - ``` php + namespace Leafo\ScssPhp; use Leafo\ScssPhp\Server; From 0fa3ad9b2ededdfe492202bce18f46a0bf5a41b4 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:30:55 +0100 Subject: [PATCH 08/33] updated project description --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4159747..bbe935e2 100644 --- a/README.md +++ b/README.md @@ -60,4 +60,7 @@ code sample: $server->serve(); -Performance impact is around 10%. \ No newline at end of file +Performance impact is around 10%. + + important note: this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). + Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble finding the corresponding line in your scss file. \ No newline at end of file From b5a0813ac03c62fcb7e4f786ca16a79bb07a0184 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:45:12 +0100 Subject: [PATCH 09/33] Revert "updated project description" This reverts commit 0fa3ad9b2ededdfe492202bce18f46a0bf5a41b4. --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index bbe935e2..c4159747 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,4 @@ code sample: $server->serve(); -Performance impact is around 10%. - - important note: this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). - Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble finding the corresponding line in your scss file. \ No newline at end of file +Performance impact is around 10%. \ No newline at end of file From 77c65075bee5fce881f75e13a694a539700450cf Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:47:31 +0100 Subject: [PATCH 10/33] updated project description --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4159747..e284f397 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,12 @@ code sample: $server = new Server($directory, null, $scss); $server->serve(); + + +Performance impact is around 10% when a new CSS file is compiled with line numbers. + +**important note: this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). +Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble finding the corresponding line in your scss file.** + -Performance impact is around 10%. \ No newline at end of file From 1eb419360daee8a397713aa4a9d7447658d2df2b Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:48:12 +0100 Subject: [PATCH 11/33] Revert "updated project description" This reverts commit 77c65075bee5fce881f75e13a694a539700450cf. --- README.md | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.md b/README.md index e284f397..c4159747 100644 --- a/README.md +++ b/README.md @@ -58,12 +58,6 @@ code sample: $server = new Server($directory, null, $scss); $server->serve(); - - -Performance impact is around 10% when a new CSS file is compiled with line numbers. - -**important note: this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). -Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble finding the corresponding line in your scss file.** - +Performance impact is around 10%. \ No newline at end of file From 479ed8cc90d30e1add590ae52f0c852c6c75839b Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:49:19 +0100 Subject: [PATCH 12/33] updated project description --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c4159747..29a1c187 100644 --- a/README.md +++ b/README.md @@ -60,4 +60,8 @@ code sample: $server->serve(); -Performance impact is around 10%. \ No newline at end of file +Performance impact is around 10% when a new CSS file is compiled with line numbers. + +**important note:** this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). +Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble finding the corresponding line in your scss file. + From 245f97d9085990821d454e231b7f2563572a0833 Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sun, 18 Jan 2015 00:01:39 +0100 Subject: [PATCH 13/33] added better description for static function isSelector --- src/LineCommentator.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 31440ef6..de07c444 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -82,14 +82,16 @@ function ($value) { } /* - * looking for selector block + * looking for selector block: + * the opening bracket could be in the same line or in the next one (since we've cleaned empty lines) + * also we don't want to confuse a selector block with a property block or write the comment above the bracket + * itself (in case it's in a new line) + * * @return boolean */ static function isSelector($line, $nextline = NULL) { - $bracket_position = strpos($nextline, self::block_indicator_start); - if ((strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) && self::isProperty($line) === FALSE && strpos($line, self::block_indicator_start) !== 0 ) { From 72bde19b3de0da4b9b27decf62feb1c530d32abc Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Sun, 18 Jan 2015 16:21:02 +0100 Subject: [PATCH 14/33] replace backslahes with slashes for filepath output within line number commentary --- src/LineCommentator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/LineCommentator.php b/src/LineCommentator.php index de07c444..98224747 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -50,7 +50,7 @@ function ($value) { $lines = $scss; $new_scss_content = array(); - $filepath = str_replace('\\','/',$filepath); + $filepath = str_replace('\\', '/', $filepath); foreach ($lines as $linenumber => $line) { @@ -95,7 +95,6 @@ static function isSelector($line, $nextline = NULL) if ((strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) && self::isProperty($line) === FALSE && strpos($line, self::block_indicator_start) !== 0 ) { - return true; } From 3e689acadf01709164d3e152a0ab4fb73fe752eb Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Mon, 19 Jan 2015 19:52:41 +0100 Subject: [PATCH 15/33] bug fixes and improvements * included scss files will now be considered (thanks to @handyface for the hint) * bugfix for scss functions in combination with line numbers * less empty line numbers --- src/Compiler.php | 11 +++++-- src/LineCommentator.php | 71 +++++++++++++++++++++++++++++++++++------ 2 files changed, 70 insertions(+), 12 deletions(-) diff --git a/src/Compiler.php b/src/Compiler.php index a68a6445..f7f4c20a 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -805,7 +805,7 @@ protected function compileChild($child, $out) break; case 'comment': - if ($out->type == 'root') { + if (isset($out->type) && $out->type == 'root') { $this->compileComment($child); break; } @@ -813,7 +813,7 @@ protected function compileChild($child, $out) //do not nest line comments into the parrent block //for further information on the issue see https://github.com/leafo/scssphp/issues/228 - if ($this->isLineNumbers() && strpos($child[1], '/* line ') !==FALSE) { + if ($this->isLineNumbers() && strpos($child[1], '/* line ') !==FALSE) { $this->compileComment($child); break; } @@ -1975,6 +1975,11 @@ protected function importFile($path, $out) $tree = $this->importCache[$realPath]; } else { $code = file_get_contents($path); + + if ($this->isLineNumbers()) { + $code = LineCommentator::insertLineComments(file($path), $path); + } + $parser = new Parser($path, false); $tree = $parser->parse($code); $this->parsedFiles[] = $path; @@ -3031,7 +3036,7 @@ public function isLineNumbers() /** * use this function to turn line numbers on - * @return boolean + * @return boolean */ public function setLineNumbers($lineNumbers) { diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 98224747..4569c5f5 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -23,11 +23,17 @@ class LineCommentator const block_indicator_start = '{'; const block_indicator_end = '}'; - const property_indicator = ': '; const html_comment_indicator_start = ''; + const function_indicator = '@function'; + const return_indicator = '@return'; + + const mixin_indicator = '@mixin'; + + const include_indicator = '@include'; + //we use this to indicate that we are currently looping within a multiline comment static protected $inside_multiline; @@ -63,8 +69,13 @@ function ($value) { continue; } - //only write line numbers for selectors to reduce overhead - if (self::isSelector($line, $nextline) == FALSE) { + //write line numbers for selectors only to reduce overhead + if ( + self::isSelector($line, $nextline) == FALSE || + self::isFunction($line) == TRUE || + self::isMixin($line) == TRUE || + self::isInclude($line) == TRUE + ) { $new_scss_content[] = $line; continue; } @@ -92,8 +103,9 @@ function ($value) { static function isSelector($line, $nextline = NULL) { - if ((strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) - && self::isProperty($line) === FALSE && strpos($line, self::block_indicator_start) !== 0 + if ( + (strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) + && strpos($line, self::block_indicator_start) !== 0 ) { return true; } @@ -103,17 +115,58 @@ static function isSelector($line, $nextline = NULL) } /* - * check for property + * ignore mixins. mixins will spread inside selectors after compilation * - * @return boolean + * @return: boolean + */ + + static function isMixin($line) + { + if (strpos($line, self::mixin_indicator) !== FALSE) { + return true; + } + + return false; + } + + + /* + * ignore functions + * + * @return: boolean + */ + + static function isFunction($line) + { + + if + ( + strpos($line, self::function_indicator) !== FALSE || + strpos($line, self::return_indicator) !== FALSE + ) { + return true; + } + + return false; + + } + + + /* + * ignore includes (the content included content however will have line numbers) + * + * @return: boolean */ - static function isProperty($line) + + static function isInclude($line) { - if (strpos($line, self::property_indicator) !== FALSE) { + + if (strpos($line, self::include_indicator) !== FALSE) { return true; } return false; + } From 1bc0f1b17ac0ed3a7421f73beb8ea818ff1c1eef Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Tue, 20 Jan 2015 17:04:51 +0100 Subject: [PATCH 16/33] improvements and test case * small test scss provided * if, else, for, while and each won't get a line numbering comment --- src/LineCommentator.php | 44 +++++++- tests/InputTest.php | 13 ++- tests/inputs/line_numbering.scss | 180 +++++++++++++++++++++++++++++++ tests/outputs/line_numbering.css | 129 ++++++++++++++++++++++ 4 files changed, 362 insertions(+), 4 deletions(-) create mode 100644 tests/inputs/line_numbering.scss create mode 100644 tests/outputs/line_numbering.css diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 4569c5f5..c921509e 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -34,6 +34,13 @@ class LineCommentator const include_indicator = '@include'; + const if_statement_indicator = '@if'; + const else_statement_indicator = '@else'; + + const loop_indicator_for = "@for"; + const loop_indicator_while = "@while"; + const loop_indicator_each = "@each"; + //we use this to indicate that we are currently looping within a multiline comment static protected $inside_multiline; @@ -74,7 +81,9 @@ function ($value) { self::isSelector($line, $nextline) == FALSE || self::isFunction($line) == TRUE || self::isMixin($line) == TRUE || - self::isInclude($line) == TRUE + self::isInclude($line) == TRUE || + self::isCondition($line) == TRUE || + self::isLoop($line) == TRUE ) { $new_scss_content[] = $line; continue; @@ -153,7 +162,7 @@ static function isFunction($line) /* - * ignore includes (the content included content however will have line numbers) + * ignore includes (the included content however will have line numbers) * * @return: boolean */ @@ -169,6 +178,37 @@ static function isInclude($line) } + /* + * dont't put a line number above if statement, since it will result in an empty line within the + * compiled scss + */ + static function isCondition($line) { + if + ( + strpos($line, self::if_statement_indicator) !== FALSE || + strpos($line, self::else_statement_indicator) !== FALSE + ) { + return true; + } + + } + + /* + * dont't put a line number above loops, since it will result in an empty line within the + * compiled scss + */ + static function isLoop($line) { + if + ( + strpos($line, self::loop_indicator_for) !== FALSE || + strpos($line, self::loop_indicator_each) !== FALSE || + strpos($line, self::loop_indicator_while) !== FALSE + ) { + return true; + } + + } + /* * we don't want to mess around with existing comments since this can easily lead to parsing errors. diff --git a/tests/InputTest.php b/tests/InputTest.php index 09c4d127..248e9b3f 100644 --- a/tests/InputTest.php +++ b/tests/InputTest.php @@ -32,6 +32,14 @@ public function setUp() */ public function testInputFile($inFname, $outFname) { + + if (strpos($inFname, 'line_numbering.scss') !==FALSE) { + $this->scss->setLineNumbers(true); + } else { + $this->scss->setLineNumbers(false); + } + + if (getenv('BUILD')) { return $this->buildInput($inFname, $outFname); } @@ -40,10 +48,11 @@ public function testInputFile($inFname, $outFname) $this->fail("$outFname is missing, consider building tests with BUILD=true"); } + $input = file_get_contents($inFname); $output = file_get_contents($outFname); - $this->assertEquals($output, $this->scss->compile($input)); + $this->assertEquals($output, $this->scss->compile($input, $inFname)); } public function fileNameProvider() @@ -59,7 +68,7 @@ function ($a) { // only run when env is set public function buildInput($inFname, $outFname) { - $css = $this->scss->compile(file_get_contents($inFname)); + $css = $this->scss->compile(file_get_contents($inFname), $inFname); file_put_contents($outFname, $css); } diff --git a/tests/inputs/line_numbering.scss b/tests/inputs/line_numbering.scss new file mode 100644 index 00000000..1a85fff4 --- /dev/null +++ b/tests/inputs/line_numbering.scss @@ -0,0 +1,180 @@ +@import "imports/partial"; + +body { + color: $variable; + @include partial-mixin(); +} + + +div { + color: red; + @page yeah { + pre { + height: 20px; + } + } +} + +@font-face { + color: red; + height: 20px; +} + + +div { + @each $var in what is this { + color: $var; + } + + @each $var in what, is, this { + font: $var; + } + + $list: what is this; + @each $var in $list { + background: $var; + } + + $list: what, is, this; + @each $var in $list { + border: $var; + } +} + +$color: red, two, three; + +div { + height: $color; +} + +$a: 1000; + +div { + $a: 2000 !default; + num: $a; +} + +div { + $b: 2000 !default; + num: $b; +} + +$cool_color: null; +$cool_color: blue !default; + +pre { + color: $cool_color; +} + +$something_man: 100px; +cool: $something_man; + + +del { + + pre { + color: $something; + } + + color: $something; +} + +$font-family-simple: Arial !default; +$font-family-spaces: Helvetica Neue !default; +$font-family-quotes: "Helvetica Neue" !default; +$font-family-commas: Helvetica, Arial, sans-serif !default; +$font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif !default; + +body { + font-family: $font-family-simple; + font-family: $font-family-spaces; + font-family: $font-family-quotes; + font-family: $font-family-commas; + font-family: $font-family-sans; +} + +@mixin something($color) { + color: $color; + + div { + height: 20px; + } +} + +@mixin cool($a, $b, $c) { + height: $a + $b + $c; +} + +span { + @include something(blue); +} + +html { + @include cool(10px, 12px, 21px); +} + +div { + @if something { + color: blue; + } +} + +/* comment 1 */ +a { + /* comment 2 */ + color: red; /* comment 3 */ + /* comment 4 */ +} +/* comment 5 */ + +/*! comment 1 */ +b { + /*! comment 2 */ + color: red; /*! comment 3 */ + /*! comment 4 */ +} +/*! comment 5 */ + +/* + * multi-line comment 1 + */ +c { + /* + * multi-line comment 2 + */ + color: red; /* + * multi-line comment 3 + */ + /* + * multi-line comment 4 + */ +} +/* + * multi-line comment 5 + */ + +/*! + * multi-line comment 1 + */ +d { + /*! + * multi-line comment 2 + */ + color: red; /*! + * multi-line comment 3 + */ + /*! + * multi-line comment 4 + */ +} +/*! + * multi-line comment 5 + */ + +// comment 1 +e { + // comment 2 + color: red; // comment 3 + // comment 4 +} +// comment 5 diff --git a/tests/outputs/line_numbering.css b/tests/outputs/line_numbering.css new file mode 100644 index 00000000..7d6800d9 --- /dev/null +++ b/tests/outputs/line_numbering.css @@ -0,0 +1,129 @@ +cool: 100px; +/* line 2, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/imports/_partial.scss */ +#partial { + color: blue; } +/* line 3, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +body { + color: #7c2; + background: gray; } +/* line 9, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +div { + color: red; } + +/* line 11, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ + @page yeah { +/* line 12, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ + div pre { + height: 20px; } } +/* line 18, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +@font-face { + color: red; + height: 20px; } +/* line 24, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +div { + color: what; + color: is; + color: this; + font: what; + font: is; + font: this; + background: what; + background: is; + background: this; + border: what; + border: is; + border: this; } +/* line 46, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +div { + height: red, two, three; } +/* line 52, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +div { + num: 1000; } +/* line 57, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +div { + num: 2000; } +/* line 65, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +pre { + color: blue; } +/* line 73, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +del { + color: ; } + +/* line 75, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ + del pre { + color: ; } +/* line 88, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +body { + font-family: Arial; + font-family: Helvetica Neue; + font-family: "Helvetica Neue"; + font-family: Helvetica, Arial, sans-serif; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } +/* line 108, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +span { + color: blue; } + +/* line 99, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ + span div { + height: 20px; } +/* line 112, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +html { + height: 43px; } +/* line 116, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +div { + color: blue; } +/* comment 1 */ +/* line 123, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +a { + /* comment 2 */ + color: red; + /* comment 3 */ + /* comment 4 */ } +/* comment 5 */ +/*! comment 1 */ +/* line 131, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +b { + /*! comment 2 */ + color: red; + /*! comment 3 */ + /*! comment 4 */ } +/*! comment 5 */ +/* + * multi-line comment 1 + */ +/* line 141, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +c { + /* + * multi-line comment 2 + */ + color: red; + /* + * multi-line comment 3 + */ + /* + * multi-line comment 4 + */ } +/* + * multi-line comment 5 + */ +/*! + * multi-line comment 1 + */ +/* line 159, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +d { + /*! + * multi-line comment 2 + */ + color: red; + /*! + * multi-line comment 3 + */ + /*! + * multi-line comment 4 + */ } +/*! + * multi-line comment 5 + */ +/* line 175, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ +e { + color: red; } From 61e1838542a99ab56d2eb1a34cb0d76f4c2ad1e7 Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 00:17:00 +0100 Subject: [PATCH 17/33] own test method added now we have a test to cover all scss test scenarios with integrated line numbers --- tests/InputTest.php | 64 +- tests/inputs/line_numbering.scss | 180 ---- tests/inputs/temp/tempfile.scss | 50 ++ tests/outputs/builtins_numbered.css | 129 +++ tests/outputs/comments_numbered.css | 32 + tests/outputs/compass_extract_numbered.css | 36 + tests/outputs/content_numbered.css | 37 + .../content_with_function_numbered.css | 3 + tests/outputs/default_args_numbered.css | 4 + tests/outputs/directives_numbered.css | 99 +++ tests/outputs/extends_numbered.css | 132 +++ tests/outputs/filter_effects_numbered.css | 21 + tests/outputs/functions_numbered.css | 28 + tests/outputs/ie7_numbered.css | 9 + tests/outputs/if_numbered.css | 22 + tests/outputs/if_on_null_numbered.css | 3 + tests/outputs/import_numbered.css | 27 + tests/outputs/interpolation_numbered.css | 83 ++ tests/outputs/keyword_args_numbered.css | 7 + tests/outputs/line_numbering.css | 129 --- tests/outputs/list_numbered.css | 8 + tests/outputs/looping_numbered.css | 46 + tests/outputs/media_numbered.css | 165 ++++ tests/outputs/mixins_numbered.css | 108 +++ tests/outputs/nesting_numbered.css | 28 + tests/outputs/null_numbered.css | 29 + tests/outputs/operators_numbered.css | 168 ++++ tests/outputs/parsing_comments_numbered.css | 55 ++ .../outputs/placeholder_selector_numbered.css | 11 + tests/outputs/scss_css_numbered.css | 792 ++++++++++++++++++ tests/outputs/selectors_numbered.css | 363 ++++++++ tests/outputs/values_numbered.css | 37 + tests/outputs/variables_numbered.css | 28 + 33 files changed, 2615 insertions(+), 318 deletions(-) delete mode 100644 tests/inputs/line_numbering.scss create mode 100644 tests/inputs/temp/tempfile.scss create mode 100644 tests/outputs/builtins_numbered.css create mode 100644 tests/outputs/comments_numbered.css create mode 100644 tests/outputs/compass_extract_numbered.css create mode 100644 tests/outputs/content_numbered.css create mode 100644 tests/outputs/content_with_function_numbered.css create mode 100644 tests/outputs/default_args_numbered.css create mode 100644 tests/outputs/directives_numbered.css create mode 100644 tests/outputs/extends_numbered.css create mode 100644 tests/outputs/filter_effects_numbered.css create mode 100644 tests/outputs/functions_numbered.css create mode 100644 tests/outputs/ie7_numbered.css create mode 100644 tests/outputs/if_numbered.css create mode 100644 tests/outputs/if_on_null_numbered.css create mode 100644 tests/outputs/import_numbered.css create mode 100644 tests/outputs/interpolation_numbered.css create mode 100644 tests/outputs/keyword_args_numbered.css delete mode 100644 tests/outputs/line_numbering.css create mode 100644 tests/outputs/list_numbered.css create mode 100644 tests/outputs/looping_numbered.css create mode 100644 tests/outputs/media_numbered.css create mode 100644 tests/outputs/mixins_numbered.css create mode 100644 tests/outputs/nesting_numbered.css create mode 100644 tests/outputs/null_numbered.css create mode 100644 tests/outputs/operators_numbered.css create mode 100644 tests/outputs/parsing_comments_numbered.css create mode 100644 tests/outputs/placeholder_selector_numbered.css create mode 100644 tests/outputs/scss_css_numbered.css create mode 100644 tests/outputs/selectors_numbered.css create mode 100644 tests/outputs/values_numbered.css create mode 100644 tests/outputs/variables_numbered.css diff --git a/tests/InputTest.php b/tests/InputTest.php index 248e9b3f..cef00451 100644 --- a/tests/InputTest.php +++ b/tests/InputTest.php @@ -3,6 +3,7 @@ namespace Leafo\ScssPhp\Tests; use Leafo\ScssPhp\Compiler; +use Leafo\ScssPhp\LineCommentator; // Runs all the tests in inputs/ and compares their output to ouputs/ @@ -21,6 +22,10 @@ class InputTest extends \PHPUnit_Framework_TestCase protected static $inputDir = 'inputs'; protected static $outputDir = 'outputs'; + protected static $line_number_suffix = '_numbered'; + protected static $tempfilename = 'tempfile.scss'; + + public function setUp() { $this->scss = new Compiler(); @@ -33,13 +38,6 @@ public function setUp() public function testInputFile($inFname, $outFname) { - if (strpos($inFname, 'line_numbering.scss') !==FALSE) { - $this->scss->setLineNumbers(true); - } else { - $this->scss->setLineNumbers(false); - } - - if (getenv('BUILD')) { return $this->buildInput($inFname, $outFname); } @@ -52,7 +50,42 @@ public function testInputFile($inFname, $outFname) $input = file_get_contents($inFname); $output = file_get_contents($outFname); - $this->assertEquals($output, $this->scss->compile($input, $inFname)); + $this->assertEquals($output, $this->scss->compile($input)); + } + + /* + * run all tests with line numbering + */ + + /** + * @dataProvider fileNameProvider + */ + + public function testLineNumbering($inFname, $outFname) { + + + $outFname = self::lineNumberPath($outFname); + + $scss = LineCommentator::insertLineComments(file($inFname), self::fileName($inFname)); + + //(over)write temp scsss file with line numbers for each testfile + file_put_contents(__DIR__ . '/'.self::$inputDir.'/temp/'.self::$tempfilename, $scss); + + if (getenv('BUILD')) { + $css = $this->scss->compile($scss); + file_put_contents($outFname, $css); + } + + if (!is_readable($outFname)) { + $this->fail("$outFname is missing, consider building tests with BUILD=true"); + } + + $input = file_get_contents(__DIR__ . '/'.self::$inputDir.'/temp/'.self::$tempfilename); + $output = file_get_contents($outFname); + + $this->assertEquals($output, $this->scss->compile($input)); + + } public function fileNameProvider() @@ -68,7 +101,7 @@ function ($a) { // only run when env is set public function buildInput($inFname, $outFname) { - $css = $this->scss->compile(file_get_contents($inFname), $inFname); + $css = $this->scss->compile(file_get_contents($inFname)); file_put_contents($outFname, $css); } @@ -104,4 +137,17 @@ public static function buildTests($pattern) foreach ($files as $file) { } } + + public static function lineNumberPath($outFname) { + + $outFname = preg_replace("/.css$/", self::$line_number_suffix.'.css', self::fileName($outFname)); + + return __DIR__ .'/'.self::$outputDir . '/' . $outFname; + } + + public static function fileName($path) { + + $filename = explode('/',$path); + return end($filename); + } } diff --git a/tests/inputs/line_numbering.scss b/tests/inputs/line_numbering.scss deleted file mode 100644 index 1a85fff4..00000000 --- a/tests/inputs/line_numbering.scss +++ /dev/null @@ -1,180 +0,0 @@ -@import "imports/partial"; - -body { - color: $variable; - @include partial-mixin(); -} - - -div { - color: red; - @page yeah { - pre { - height: 20px; - } - } -} - -@font-face { - color: red; - height: 20px; -} - - -div { - @each $var in what is this { - color: $var; - } - - @each $var in what, is, this { - font: $var; - } - - $list: what is this; - @each $var in $list { - background: $var; - } - - $list: what, is, this; - @each $var in $list { - border: $var; - } -} - -$color: red, two, three; - -div { - height: $color; -} - -$a: 1000; - -div { - $a: 2000 !default; - num: $a; -} - -div { - $b: 2000 !default; - num: $b; -} - -$cool_color: null; -$cool_color: blue !default; - -pre { - color: $cool_color; -} - -$something_man: 100px; -cool: $something_man; - - -del { - - pre { - color: $something; - } - - color: $something; -} - -$font-family-simple: Arial !default; -$font-family-spaces: Helvetica Neue !default; -$font-family-quotes: "Helvetica Neue" !default; -$font-family-commas: Helvetica, Arial, sans-serif !default; -$font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif !default; - -body { - font-family: $font-family-simple; - font-family: $font-family-spaces; - font-family: $font-family-quotes; - font-family: $font-family-commas; - font-family: $font-family-sans; -} - -@mixin something($color) { - color: $color; - - div { - height: 20px; - } -} - -@mixin cool($a, $b, $c) { - height: $a + $b + $c; -} - -span { - @include something(blue); -} - -html { - @include cool(10px, 12px, 21px); -} - -div { - @if something { - color: blue; - } -} - -/* comment 1 */ -a { - /* comment 2 */ - color: red; /* comment 3 */ - /* comment 4 */ -} -/* comment 5 */ - -/*! comment 1 */ -b { - /*! comment 2 */ - color: red; /*! comment 3 */ - /*! comment 4 */ -} -/*! comment 5 */ - -/* - * multi-line comment 1 - */ -c { - /* - * multi-line comment 2 - */ - color: red; /* - * multi-line comment 3 - */ - /* - * multi-line comment 4 - */ -} -/* - * multi-line comment 5 - */ - -/*! - * multi-line comment 1 - */ -d { - /*! - * multi-line comment 2 - */ - color: red; /*! - * multi-line comment 3 - */ - /*! - * multi-line comment 4 - */ -} -/*! - * multi-line comment 5 - */ - -// comment 1 -e { - // comment 2 - color: red; // comment 3 - // comment 4 -} -// comment 5 diff --git a/tests/inputs/temp/tempfile.scss b/tests/inputs/temp/tempfile.scss new file mode 100644 index 00000000..72c06c0e --- /dev/null +++ b/tests/inputs/temp/tempfile.scss @@ -0,0 +1,50 @@ +$color: red, two, three; +/* line 4, variables.scss */ +div { +height: $color; +} +$a: 1000; +/* line 10, variables.scss */ +div { +$a: 2000 !default; +num: $a; +} +/* line 15, variables.scss */ +div { +$b: 2000 !default; +num: $b; +} +$cool_color: null; +$cool_color: blue !default; +/* line 23, variables.scss */ +pre { +color: $cool_color; +} +$something_man: 100px; +cool: $something_man; +/* line 31, variables.scss */ +del { +$something: blue; +/* line 34, variables.scss */ +div { +$something: red; +/* line 36, variables.scss */ +pre { +color: $something; +} +} +color: $something; +} +$font-family-simple: Arial !default; +$font-family-spaces: Helvetica Neue !default; +$font-family-quotes: "Helvetica Neue" !default; +$font-family-commas: Helvetica, Arial, sans-serif !default; +$font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif !default; +/* line 50, variables.scss */ +body { +font-family: $font-family-simple; +font-family: $font-family-spaces; +font-family: $font-family-quotes; +font-family: $font-family-commas; +font-family: $font-family-sans; +} \ No newline at end of file diff --git a/tests/outputs/builtins_numbered.css b/tests/outputs/builtins_numbered.css new file mode 100644 index 00000000..7e26341c --- /dev/null +++ b/tests/outputs/builtins_numbered.css @@ -0,0 +1,129 @@ +/* line 2, builtins.scss */ +#color { + color: #22ea18; + red: 34; + green: 234; + blue: 24; + color: rgba(1, 2, 4, 0.5); + a1: 1; + a2: 0.5; + mix: #020304; + rgba: rgba(170, 119, 204, 0.4); + rgba: rgba(170, 119, 204, 0.4); + green: 139; } +/* line 21, builtins.scss */ +#hsl { + color: #79c653; + color: rgba(121, 198, 83, 0.5); + hue: 100deg; + sat: 50%; + lig: 55%; } +/* line 30, builtins.scss */ +#more-color { + light: #7e3d9e; + dark: #432154; + sat: #632782; + desat: #5e3871; + gray: #545454; + comp: #48792f; + inv: #9fd086; } +/* line 44, builtins.scss */ +#more-more-color { + op: 0.5; + opacify: rgba(1, 2, 3, 0.6); + opacify: rgba(1, 2, 3, 0.6); + transparentize: rgba(1, 2, 3, 0.4); + transparentize: rgba(1, 2, 3, 0.4); + transparentize: rgba(52, 130, 3, 0.9); } +/* line 56, builtins.scss */ +#more-more-more-color { + color: rgba(65, 110, 79, 0.4); + color: rgba(20, 255, 216, 0); + color: rgba(55, 100, 69, 0.4); + color: rgba(0, 255, 213, 0); + color: rgba(145, 10, 10, 0); + color: rgba(5, 10, 10, 0); + color: rgba(145, 145, 145, 0); + color: rgba(5, 5, 5, 0); + color: #000A0A0A; + color: #FFAABBCC; } +/* line 74, builtins.scss */ +#string { + color: hello what is going on; + color: "yeah"; + color: "I do?"; } +/* line 81, builtins.scss */ +#number { + color: 250%; + color: 3; + color: 3; + color: 4; + top: 10px; + top: 1ex; + width: 200%; + bottom: 10px; + padding: 3em 1in 96px 72pt; } +/* line 94, builtins.scss */ +#list { + len: 3; + len: 1; + n: hello; + hello: one, two, three, hello; + hello: one, two, three, hello, world, what, is, going; + hello: one, two, three, hello; + index: 2; + index: false; + index: 3; + index: 1; + index: false; + index: 1; + index: false; + index: 2; + index: 2; + /* line 115, builtins.scss */ + index: 1; + world: one, two, three, great, job; + world: one, two, three, great job; + cool: one two three great job; + cool: great job one two three; + zip: 1px solid, 2px dashed; + zip: 1px solid red, 2px dashed green; } +/* line 129, builtins.scss */ +#introspection { + t: number; + t: string; + t: string; + t: bool; + t: color; + t: color; + t: list; + u: ""; + u: "px"; + u: "em"; + l: true; + l: false; + c: true; + c: false; + c: true; + c: true; + c: false; + c: true; } +/* line 153, builtins.scss */ +#if { + color: yes; + color: no; + color: yes; + color: yes; } +/* line 160, builtins.scss */ +.transparent { + r: 0; + g: 0; + b: 0; + a: 0; } +/* line 167, builtins.scss */ +.alpha { + a: 1; + a: 1; + a: 1; + a: 0.5; + a: alpha(currentColor); } diff --git a/tests/outputs/comments_numbered.css b/tests/outputs/comments_numbered.css new file mode 100644 index 00000000..9ffe49c7 --- /dev/null +++ b/tests/outputs/comments_numbered.css @@ -0,0 +1,32 @@ +/** what the heck **/ +/** + Here is a block comment + **/ +/*hello*/ +div { + /*yeah*/ + border: 1px solid red; + /* another property */ + color: url('http://mage-page.com'); + string: "hello /* this is not a comment */"; + world: "// neither is this"; + string: 'hello /* this is not a comment */'; + /*what if this is a comment */ + world: '// neither is this'; + what-ever: 100px; + background: url(); + /*this is not a comment?*/ } +/* line 31, comments.scss */ +.dummy { + color: blue; } +/* comment 1 */ +/* line 36, comments.scss */ +a { + /* comment 2 */ + /* comment 3 */ + color: red; + /* comment 4 */ + background-color: red; + /* comment 5 */ + /* comment 6 */ } +/* comment 7 */ diff --git a/tests/outputs/compass_extract_numbered.css b/tests/outputs/compass_extract_numbered.css new file mode 100644 index 00000000..923c1cac --- /dev/null +++ b/tests/outputs/compass_extract_numbered.css @@ -0,0 +1,36 @@ +/* line 224, compass_extract.scss */ +#test-0 { + unit: false; + unit: true; + rhythm: 1.5em; + size: 1; + size: 1; + size: 1; + size: 2; + size: 2; } +/* line 236, compass_extract.scss */ +#test-1 { + /* line 142, compass_extract.scss */ + margin-top: 7.5em; + padding-top: 9em; + padding-bottom: 10.5em; + /* line 157, compass_extract.scss */ + margin-bottom: 0em; } +/* line 240, compass_extract.scss */ +#test-2 { + /* line 196, compass_extract.scss */ + border-style: solid; + border-width: 0.0625em; + padding: 1.4375em; } +/* line 244, compass_extract.scss */ +#test-3 { + /* line 184, compass_extract.scss */ + border-top-style: solid; + border-top-width: 0.0625em; + padding-top: 1.4375em; + /* line 188, compass_extract.scss */ + /* line 184, compass_extract.scss */ + border-bottom-style: solid; + border-bottom-width: 0.0625em; + padding-bottom: 1.4375em; + /* line 188, compass_extract.scss */ } diff --git a/tests/outputs/content_numbered.css b/tests/outputs/content_numbered.css new file mode 100644 index 00000000..e64b573f --- /dev/null +++ b/tests/outputs/content_numbered.css @@ -0,0 +1,37 @@ +/* line 3, content.scss */ +* html { + /* line 8, content.scss */ } + * html #logo { + background-image: url(/logo.gif); } +/* line 20, content.scss */ +.colors { + background-color: blue; + color: white; + border-color: blue; } +/* line 26, content.scss */ +@media only screen and (max-width: 480px) { + /* line 32, content.scss */ + body { + color: red; } } +/* line 36, content.scss */ +#sidebar { + width: 300px; + /* line 26, content.scss */ } + @media only screen and (max-width: 480px) { + #sidebar { + width: 100px; } } +/* line 46, content.scss */ +@media only screen and (min-width: 40em) { + /* line 51, content.scss */ + .grid-1 { + width: 100%; } + .grid-2 { + width: 100%; } } +/* line 46, content.scss */ +@media only screen and (min-width: 40em) { + /* line 58, content.scss */ + /* line 58, content.scss */ + .grid-1 { + width: 100%; } + .grid-2 { + width: 100%; } } diff --git a/tests/outputs/content_with_function_numbered.css b/tests/outputs/content_with_function_numbered.css new file mode 100644 index 00000000..a107e172 --- /dev/null +++ b/tests/outputs/content_with_function_numbered.css @@ -0,0 +1,3 @@ +/* line 13, content_with_function.scss */ +body { + padding: 1 px; } diff --git a/tests/outputs/default_args_numbered.css b/tests/outputs/default_args_numbered.css new file mode 100644 index 00000000..32d65ad7 --- /dev/null +++ b/tests/outputs/default_args_numbered.css @@ -0,0 +1,4 @@ +/* line 11, default_args.scss */ +div { + height: red; + margin: 100px; } diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css new file mode 100644 index 00000000..c04fa5d9 --- /dev/null +++ b/tests/outputs/directives_numbered.css @@ -0,0 +1,99 @@ +@charset "hello-world"; +/* line 4, directives.scss */ +@page :left { + /* line 5, directives.scss */ + div { + color: red; } } +/* line 10, directives.scss */ +@page test { + /* line 11, directives.scss */ + @media yes { + /* line 12, directives.scss */ + /* line 16, directives.scss */ + div { + color: red; } } } +/* line 24, directives.scss */ +@media something { + /* line 25, directives.scss */ + @page { + /* line 26, directives.scss */ + @media else { + /* line 27, directives.scss */ + div { + height: 200px; } } } } +/* line 35, directives.scss */ +div { + color: red; + /* line 37, directives.scss */ } + @page yeah { + /* line 38, directives.scss */ + div pre { + height: 20px; } } +/* line 44, directives.scss */ +@font-face { + color: red; + height: 20px; } +/* line 50, directives.scss */ +@keyframes 'bounce' { + /* line 51, directives.scss */ + /* line 56, directives.scss */ + /* line 61, directives.scss */ + /* line 66, directives.scss */ + /* line 71, directives.scss */ + from { + top: 100px; + animation-timing-function: ease-out; } + + 25% { + top: 50px; + animation-timing-function: ease-in; } + + 50% { + top: 100px; + animation-timing-function: ease-out; } + + 75% { + top: 75px; + animation-timing-function: ease-in; } + + to { + top: 100px; } } +/* line 76, directives.scss */ +@-webkit-keyframes flowouttoleft { + /* line 77, directives.scss */ + /* line 78, directives.scss */ + /* line 79, directives.scss */ + 0% { + -webkit-transform: translateX(0) scale(1); } + + 60%, 70% { + -webkit-transform: translateX(0) scale(0.7); } + + 100% { + -webkit-transform: translateX(-100%) scale(0.7); } } +/* line 82, directives.scss */ +div { + animation-name: 'diagonal-slide'; + animation-duration: 5s; + animation-iteration-count: 10; } +/* line 88, directives.scss */ +@keyframes 'diagonal-slide' { + /* line 90, directives.scss */ + /* line 95, directives.scss */ + from { + left: 0; + top: 0; } + + to { + left: 100px; + top: 100px; } } + +@document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 105, directives.scss */ +regexp("https:.*") { + /* line 107, directives.scss */ + body { + color: purple; + background: yellow; } } diff --git a/tests/outputs/extends_numbered.css b/tests/outputs/extends_numbered.css new file mode 100644 index 00000000..b316bba6 --- /dev/null +++ b/tests/outputs/extends_numbered.css @@ -0,0 +1,132 @@ +/* line 2, extends.scss */ +error, pre seriousError, span seriousError, other, hello { + border: 1px #f00; + background-color: #fdd; } +/* line 7, extends.scss */ +pre, span { + /* line 8, extends.scss */ } + pre seriousError, span seriousError { + font-size: 20px; } +/* line 14, extends.scss */ +hello { + color: green; + /* line 17, extends.scss */ } + hello div { + margin: 10px; } +/* line 22, extends.scss */ +.cool, .me { + color: red; } +/* line 26, extends.scss */ +.blue, .me { + color: purple; } +/* line 30, extends.scss */ +/* line 34, extends.scss */ + +/* line 35, extends.scss */ + +a:hover, .hoverlink, #demo .overview .fakelink:hover { + text-decoration: underline; } +/* line 40, extends.scss */ +div.hello.world.hmm, pre div.okay.span.world.hmm, pre #butt .umm div.sure.span.world.hmm, #butt .umm pre div.sure.span.world.hmm, code div.okay.span.world.hmm, code #butt .umm div.sure.span.world.hmm, #butt .umm code div.sure.span.world.hmm { + color: blue; } +/* line 44, extends.scss */ +pre, code { + /* line 45, extends.scss */ } + /* line 51, extends.scss */ + +.xxxxx .xxxxx .xxxxx, code .xxxxx .xxxxx, code code .xxxxx, code code code, code .xxxxx code, .xxxxx code .xxxxx, .xxxxx code code, .xxxxx .xxxxx code { + color: green; } +/* line 55, extends.scss */ +code { + color: red; } +/* line 63, extends.scss */ +.alpha, .beta, .gama { + color: red; } +/* line 67, extends.scss */ +.beta, .gama { + color: white; } +/* line 72, extends.scss */ +.gama { + color: blue; } +/* line 79, extends.scss */ +#admin .tabbar a, #admin .tabbar #demo .overview .fakelink, #demo .overview #admin .tabbar .fakelink { + font-weight: bold; } +/* line 80, extends.scss */ +/* line 82, extends.scss */ + +a1 b1 c1 d1, x1 y1 z1 w1 b1 c1 d1 { + color: red; } +/* line 83, extends.scss */ +/* line 85, extends.scss */ + +a2 b2 c2 d2, a2 x2 y2 z2 w2 c2 d2, x2 y2 z2 a2 w2 c2 d2 { + color: red; } +/* line 86, extends.scss */ +/* line 89, extends.scss */ + +a3 b3 c3 d3, a3 b3 x3 y3 z3 w3 d3, x3 y3 z3 a3 b3 w3 d3 { + color: red; } +/* line 90, extends.scss */ +/* line 93, extends.scss */ + +a4 b4 c4 d4, a4 b4 c4 x4 y4 z4 w4, x4 y4 z4 a4 b4 c4 w4 { + color: red; } +/* line 94, extends.scss */ +/* line 98, extends.scss */ + +#butt .yeah .okay, #butt .yeah .umm .sure, #butt .umm .yeah .sure { + font-weight: bold; } +/* line 99, extends.scss */ +/* line 101, extends.scss */ + +a9 b9 s9 t9 v9, a9 b9 s9 t9 x9 y9 z9, a9 b9 x9 y9 s9 t9 z9 { + color: red; } +/* line 103, extends.scss */ +/* line 109, extends.scss */ + +@media print { + /* line 110, extends.scss */ + horse, man { + color: blue; } } +/* line 115, extends.scss */ +man { + color: red; } +/* line 123, extends.scss */ +wassup { + color: blue; } +/* line 128, extends.scss */ +.foo { + /* line 129, extends.scss */ } + .foo .wassup { + color: blue; } +/* line 137, extends.scss */ +#something, .x, .y { + color: red; } +/* line 141, extends.scss */ +/* line 145, extends.scss */ + +/* line 151, extends.scss */ + +.nav-tabs { + /* line 152, extends.scss */ } + /* line 156, extends.scss */ + +.nav-justified, .nav-tabs.nav-justified { + text-align: justify; } + +.btn:hover, .edit .actions button:hover, .edit .new .actions button:hover, .btn:active, .edit .actions button:active, .edit .new .actions button:active, .btn.active, .edit .actions button.active, .edit .new .actions button.active, .btn.disabled, .edit .actions button.disabled, .edit .new .actions button.disabled, .btn[disabled], .edit .actions button[disabled], .edit .new .actions button[disabled] { + /* line 166, extends.scss */ + color: red; } +/* line 169, extends.scss */ +.edit .actions { + /* line 170, extends.scss */ } + .edit .actions button { + float: right; } +/* line 175, extends.scss */ +.edit { + /* line 176, extends.scss */ } + .edit .new { + /* line 177, extends.scss */ + /* line 180, extends.scss */ } + .edit .new .actions { + padding: 0; } diff --git a/tests/outputs/filter_effects_numbered.css b/tests/outputs/filter_effects_numbered.css new file mode 100644 index 00000000..a5eef6d3 --- /dev/null +++ b/tests/outputs/filter_effects_numbered.css @@ -0,0 +1,21 @@ +/* line 1, filter_effects.scss */ +#number { + -webkit-filter: grayscale(1) sepia(0.5) saturate(0.1) invert(1) opacity(0.5) brightness(0.5) contrast(0.5); } +/* line 11, filter_effects.scss */ +#percentage { + -webkit-filter: grayscale(100%) sepia(50%) saturate(10%) invert(100%) opacity(50%) brightness(50%) contrast(50%); } +/* line 21, filter_effects.scss */ +#misc { + -webkit-filter: hue-rotate(90deg) blur(10px) drop-shadow(10px -16px 30px purple); } +/* line 37, filter_effects.scss */ +#decimal { + opacity: 0.5; + filter: alpha(opacity=50, style=1); } +/* line 41, filter_effects.scss */ +#percent { + opacity: 0.5; + filter: alpha(opacity=50); } +/* line 45, filter_effects.scss */ +.row { + background-color: #071c23; + color: #2284a1; } diff --git a/tests/outputs/functions_numbered.css b/tests/outputs/functions_numbered.css new file mode 100644 index 00000000..499d86ca --- /dev/null +++ b/tests/outputs/functions_numbered.css @@ -0,0 +1,28 @@ +/* line 10, functions.scss */ +div { + color: 14px; + sum: 23; } +/* line 33, functions.scss */ +div { + hello: 10 55; + hello: 1010 55; + hello: "hello 10 and 55"; } +/* line 44, functions.scss */ +del { + color: 1000; } +/* line 48, functions.scss */ +div { + hello: "hello foo and bar"; + hello: "hello bar and default"; + hello: "hello Alice, Bob, Tom"; } +/* line 61, functions.scss */ +.foo { + test2: -moz-art; } +/* line 77, functions.scss */ +div { + /* line 67, functions.scss */ } + div span { + height: 3px; } +/* line 87, functions.scss */ +div { + width: 2; } diff --git a/tests/outputs/ie7_numbered.css b/tests/outputs/ie7_numbered.css new file mode 100644 index 00000000..1dfe7ab0 --- /dev/null +++ b/tests/outputs/ie7_numbered.css @@ -0,0 +1,9 @@ +/* line 2, ie7.scss */ +#foo:before { + content: counter(item,".") ": "; } +/* line 6, ie7.scss */ +#bar:before { + content: counter(item,"."); } +/* line 10, ie7.scss */ +#fu:before { + content: counter(item); } diff --git a/tests/outputs/if_numbered.css b/tests/outputs/if_numbered.css new file mode 100644 index 00000000..921baab7 --- /dev/null +++ b/tests/outputs/if_numbered.css @@ -0,0 +1,22 @@ +/* line 10, if.scss */ +div { + color: blue; } +/* line 16, if.scss */ +pre { + val-1: "red"; + val-2: "blue"; + val-3: "blue"; + val-4: "red"; + val-5: "red"; } +/* line 25, if.scss */ +span { + color: blue; + height: 10px; + width: 20px; } +/* line 47, if.scss */ +div { + color: blue; + border-color: green; } +/* line 67, if.scss */ +del { + thing: no; } diff --git a/tests/outputs/if_on_null_numbered.css b/tests/outputs/if_on_null_numbered.css new file mode 100644 index 00000000..d7e5d5f7 --- /dev/null +++ b/tests/outputs/if_on_null_numbered.css @@ -0,0 +1,3 @@ +/* line 6, if_on_null.scss */ +body { + background-color: "red"; } diff --git a/tests/outputs/import_numbered.css b/tests/outputs/import_numbered.css new file mode 100644 index 00000000..747ab27a --- /dev/null +++ b/tests/outputs/import_numbered.css @@ -0,0 +1,27 @@ +@import "foo.css"; +@import "foo" screen; +@import "http://foo.com/bar"; +@import url(foo); +div { + height: 200px; + color: red; } +/* line 9, import.scss */ +pre { + color: red; } + pre div { + height: 200px; + color: red; } +/* line 14, import.scss */ +code div { + height: 200px; + color: red; } + code div { + height: 200px; + color: red; } + +#partial { + color: blue; } +/* line 20, import.scss */ +body { + color: #7c2; + background: gray; } diff --git a/tests/outputs/interpolation_numbered.css b/tests/outputs/interpolation_numbered.css new file mode 100644 index 00000000..82f2f908 --- /dev/null +++ b/tests/outputs/interpolation_numbered.css @@ -0,0 +1,83 @@ +/* line 2, interpolation.scss */ +div { + /* line 3, interpolation.scss */ + color: redwhite blue; + /* line 4, interpolation.scss */ + color: red white blue; + /* line 5, interpolation.scss */ + color: red whiteblue; + /* line 6, interpolation.scss */ + color: redwhiteblue; + /* line 7, interpolation.scss */ + color: ummyeahwhat; + /* line 8, interpolation.scss */ + color: stacked; + /* line 10, interpolation.scss */ + font-size: 10px/something; + /* line 11, interpolation.scss */ + font-size: 10px / something; + /* line 13, interpolation.scss */ + test: "whatworldwrong"; + /* line 14, interpolation.scss */ + test: "whatworldwrong"; + /* line 15, interpolation.scss */ + test: "whatworldwrong"; + /* line 16, interpolation.scss */ + test: "what"world"wrong"; + /* line 18, interpolation.scss */ + hi: "what is 16 end"; } +/* line 24, interpolation.scss */ +pre { + /* line 27, interpolation.scss */ + /* line 31, interpolation.scss */ + /* line 35, interpolation.scss */ } + pre var { + color: red; } + pre var dad { + color: red; } + pre bedvardad { + color: red; } +/* line 40, interpolation.scss */ +cool { + /* line 42, interpolation.scss */ } + cool .thing-1 { + color: red; } + cool .thing-2 { + color: red; } + cool .thing-3 { + color: red; } + cool .thing-4 { + color: red; } + cool .thing-5 { + color: red; } +/* line 48, interpolation.scss */ +abcde { + color: red; } +/* line 52, interpolation.scss */ +#hello, .world { + color: red; } +/* line 56, interpolation.scss */ +#abchelloyeah, .coolworldyes { + color: red; } +/* line 62, interpolation.scss */ +div.element:nth-child(2n) { + display: none; } +/* line 69, interpolation.scss */ +div { + /* line 71, interpolation.scss */ + hello: world; + coolhello: world; + /* line 72, interpolation.scss */ + helloone: world; + /* line 73, interpolation.scss */ + twohelloone: world; + /* line 74, interpolation.scss */ + oneabtwo: cool; + /* line 76, interpolation.scss */ + /* line 78, interpolation.scss */ + /* line 79, interpolation.scss */ + hello-world: red; + hello-mold: white; + /* line 80, interpolation.scss */ + hello-hello: blue; + /* line 81, interpolation.scss */ } diff --git a/tests/outputs/keyword_args_numbered.css b/tests/outputs/keyword_args_numbered.css new file mode 100644 index 00000000..501ae411 --- /dev/null +++ b/tests/outputs/keyword_args_numbered.css @@ -0,0 +1,7 @@ +/* line 8, keyword_args.scss */ +pre { + out: alpha fort three palace; } +/* line 19, keyword_args.scss */ +div { + hello: 5; + world: -5; } diff --git a/tests/outputs/line_numbering.css b/tests/outputs/line_numbering.css deleted file mode 100644 index 7d6800d9..00000000 --- a/tests/outputs/line_numbering.css +++ /dev/null @@ -1,129 +0,0 @@ -cool: 100px; -/* line 2, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/imports/_partial.scss */ -#partial { - color: blue; } -/* line 3, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -body { - color: #7c2; - background: gray; } -/* line 9, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -div { - color: red; } - -/* line 11, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ - @page yeah { -/* line 12, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ - div pre { - height: 20px; } } -/* line 18, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -@font-face { - color: red; - height: 20px; } -/* line 24, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -div { - color: what; - color: is; - color: this; - font: what; - font: is; - font: this; - background: what; - background: is; - background: this; - border: what; - border: is; - border: this; } -/* line 46, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -div { - height: red, two, three; } -/* line 52, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -div { - num: 1000; } -/* line 57, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -div { - num: 2000; } -/* line 65, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -pre { - color: blue; } -/* line 73, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -del { - color: ; } - -/* line 75, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ - del pre { - color: ; } -/* line 88, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -body { - font-family: Arial; - font-family: Helvetica Neue; - font-family: "Helvetica Neue"; - font-family: Helvetica, Arial, sans-serif; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } -/* line 108, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -span { - color: blue; } - -/* line 99, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ - span div { - height: 20px; } -/* line 112, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -html { - height: 43px; } -/* line 116, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -div { - color: blue; } -/* comment 1 */ -/* line 123, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -a { - /* comment 2 */ - color: red; - /* comment 3 */ - /* comment 4 */ } -/* comment 5 */ -/*! comment 1 */ -/* line 131, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -b { - /*! comment 2 */ - color: red; - /*! comment 3 */ - /*! comment 4 */ } -/*! comment 5 */ -/* - * multi-line comment 1 - */ -/* line 141, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -c { - /* - * multi-line comment 2 - */ - color: red; - /* - * multi-line comment 3 - */ - /* - * multi-line comment 4 - */ } -/* - * multi-line comment 5 - */ -/*! - * multi-line comment 1 - */ -/* line 159, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -d { - /*! - * multi-line comment 2 - */ - color: red; - /*! - * multi-line comment 3 - */ - /*! - * multi-line comment 4 - */ } -/*! - * multi-line comment 5 - */ -/* line 175, C:/xampp/_webroot/scss/lib/scssphp/tests/inputs/line_numbering.scss */ -e { - color: red; } diff --git a/tests/outputs/list_numbered.css b/tests/outputs/list_numbered.css new file mode 100644 index 00000000..e8701f9f --- /dev/null +++ b/tests/outputs/list_numbered.css @@ -0,0 +1,8 @@ +/* line 4, list.scss */ +div { + padding: 10px 20px 30px 40px; + margin: 0 10px 10px 10px; + background: linear-gradient(black, white); } +/* line 13, list.scss */ +p { + background: linear-gradient(red, blue); } diff --git a/tests/outputs/looping_numbered.css b/tests/outputs/looping_numbered.css new file mode 100644 index 00000000..9e12ec7e --- /dev/null +++ b/tests/outputs/looping_numbered.css @@ -0,0 +1,46 @@ +/* line 2, looping.scss */ +div { + color: what; + color: is; + color: this; + font: what; + font: is; + font: this; + background: what; + background: is; + background: this; + border: what; + border: is; + border: this; } +/* line 23, looping.scss */ +span { + color: 0; + color: 1; + color: 2; + color: 3; + color: 4; + color: 5; + color: 6; + color: 7; + color: 8; + color: 9; + color: 10; } +/* line 31, looping.scss */ +pre { + color: 1; + color: 2; + color: 3; + color: 4; + height: 1; + height: 2; + height: 3; + height: 4; + height: 5; + cool: 10; + cool: 9; + cool: 8; + cool: 7; + cool: 6; + cool: 5; + cool: 4; + cool: 3; } diff --git a/tests/outputs/media_numbered.css b/tests/outputs/media_numbered.css new file mode 100644 index 00000000..b4ea5d47 --- /dev/null +++ b/tests/outputs/media_numbered.css @@ -0,0 +1,165 @@ +/* line 3, media.scss */ +@media { + /* line 4, media.scss */ + div { + color: blue; } } +/* line 6, media.scss */ +@media what { + /* line 7, media.scss */ + div { + color: blue; } } +/* line 10, media.scss */ +@media (cool) { + /* line 11, media.scss */ + div { + color: blue; } } +/* line 13, media.scss */ +@media (cool: blue) { + /* line 14, media.scss */ + div { + color: blue; } } +/* line 17, media.scss */ +@media hello and (world) and (butt: man) { + /* line 18, media.scss */ + div { + color: blue; } } +/* line 23, media.scss */ +@media (max-width: 940px) { + color: red; } +/* line 28, media.scss */ +@media not hello and (world) { + color: blue; + /* line 30, media.scss */ + /* line 34, media.scss */ + pre { + color: blue; } } + @media butt and (world) { + color: red; + /* line 36, media.scss */ + div { + color: red; } } +/* line 42, media.scss */ +@media a, b { + /* line 43, media.scss */ } +/* line 48, media.scss */ +@media a { + /* line 49, media.scss */ } +/* line 54, media.scss */ +@media a, b { + /* line 55, media.scss */ } +/* line 64, media.scss */ +div { + color: blue; + /* line 66, media.scss */ } + @media screen and (-webkit-min-device-pixel-ratio: 1.5) { + div { + /* line 67, media.scss */ } + div .sidebar { + width: 500px; } } +/* line 81, media.scss */ +div { + position: absolute; + /* line 84, media.scss */ } + @media screen { + div { + top: 0; + /* line 87, media.scss */ + bottom: 8em; + color: red; + /* line 76, media.scss */ } + div p { + margin: 5px; } + + div .success { + color: green; } } +/* line 95, media.scss */ +.button { + width: 300px; + height: 100px; + background: #eee; + /* line 100, media.scss */ + /* line 104, media.scss */ } + .button :hover { + background: #aaa; } + @media only screen and (max-width: 300px) { + .button { + width: 100px; + height: 100px; } } +/* line 110, media.scss */ +code { + position: absolute; + /* line 112, media.scss */ } + @media screen { + code { + /* line 113, media.scss */ + height: 10px; } + code pre { + height: 20px; } } +/* line 120, media.scss */ +dt { + /* line 121, media.scss */ } + @media screen { + dt { + /* line 122, media.scss */ } } + @media screen and (color: blue) { + dt { + height: 10px; } } +/* line 129, media.scss */ +@media screen { + /* line 130, media.scss */ + /* line 133, media.scss */ + .screen { + width: 12px; } } + @media only screen { + /* line 134, media.scss */ + .only-screen { + height: 11px; } } +/* line 140, media.scss */ +@media only screen { + /* line 141, media.scss */ + /* line 144, media.scss */ + .only-screen { + width: 14px; } } + @media only screen { + /* line 145, media.scss */ + .only-screen { + height: 16px; } } +/* line 151, media.scss */ +@media not screen { + /* line 152, media.scss */ } +/* line 159, media.scss */ +@media not screen { + /* line 160, media.scss */ } + @media print { + /* line 161, media.scss */ + .only-print { + height: 12px; } } +/* line 167, media.scss */ +@media screen { + /* line 168, media.scss */ } + @media screen { + /* line 169, media.scss */ + .only-print { + height: 12px; } } +/* line 175, media.scss */ +@media not screen { + /* line 176, media.scss */ } +/* line 183, media.scss */ +@media not screen { + /* line 184, media.scss */ } + @media not screen { + /* line 185, media.scss */ + .not-screen { + height: 15px; } } +/* line 191, media.scss */ +@media only screen { + /* line 192, media.scss */ } +/* line 199, media.scss */ +@media only screen { + /* line 200, media.scss */ } + @media only screen and (color: blue) { + /* line 201, media.scss */ } + @media only screen and (color: blue) and (width: 13) { + /* line 202, media.scss */ + .only-screen { + height: 15px; } } diff --git a/tests/outputs/mixins_numbered.css b/tests/outputs/mixins_numbered.css new file mode 100644 index 00000000..bee388d8 --- /dev/null +++ b/tests/outputs/mixins_numbered.css @@ -0,0 +1,108 @@ +/* line 9, mixins.scss */ +div { + color: blue; + color: red; + /* line 4, mixins.scss */ } + div pre { + height: 200px; } +/* line 26, mixins.scss */ +span { + color: blue; + /* line 17, mixins.scss */ } + span div { + height: 20px; } +/* line 30, mixins.scss */ +html { + height: 43px; } +/* line 39, mixins.scss */ +del { + height: 20px; } +/* line 52, mixins.scss */ +div { + color: white; + color: blue; + color: white; } +/* line 62, mixins.scss */ +div { + background-image: linear-gradient(left top, red, green); } +/* line 72, mixins.scss */ +div { + -moz-box-shadow: 10px 10px 5px #888; + -webkit-box-shadow: 10px 10px 5px #888; + box-shadow: 10px 10px 5px #888; + -moz-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; + -webkit-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; + box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; } +/* line 81, mixins.scss */ +div { + /* line 82, mixins.scss */ } + div p { + /* line 83, mixins.scss */ + color: red; + /* line 17, mixins.scss */ + /* line 89, mixins.scss */ + color: blue; } + div p .class { + color: red; + /* line 17, mixins.scss */ } + div p .class div { + height: 20px; } + div p div { + height: 20px; } + div p .top { + top: 0; + /* line 92, mixins.scss */ } + div p .top div { + color: red; } +/* line 103, mixins.scss */ +div.mixin-content-simple { + color: red; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: blue; + color: red; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: purple; + height: 20px; } +/* line 103, mixins.scss */ +div.mixin-content-simple { + height: 43px; } +/* line 103, mixins.scss */ +div.mixin-content-simple { + color: orange; + /* line 17, mixins.scss */ } + div.mixin-content-simple div { + height: 20px; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: purple; + height: 43px; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: purple; + color: orange; + /* line 17, mixins.scss */ } + div.mixin-content-with-arg div { + height: 20px; } +/* line 156, mixins.scss */ +#please-wait { + background: url(/images/logo.png); + position: absolute; + top: 1em; + right: 0; + bottom: 3em; + left: 4em; } +/* line 168, mixins.scss */ +div.parameter-name-scope { + /* line 161, mixins.scss */ + -webkit-transform: translateX(50px); } +/* line 174, mixins.scss */ +@-webkit-keyframes change-color { + /* line 181, mixins.scss */ + /* line 182, mixins.scss */ + 0% { + color: green; } + + 100% { + color: red; } } diff --git a/tests/outputs/nesting_numbered.css b/tests/outputs/nesting_numbered.css new file mode 100644 index 00000000..be8fb840 --- /dev/null +++ b/tests/outputs/nesting_numbered.css @@ -0,0 +1,28 @@ +div: blue; +/* line 3, nesting.scss */ +body { + color: red; } +/* line 8, nesting.scss */ +div { + color: red; + height: yes; + /* line 12, nesting.scss */ } + div pre { + color: blue; } +/* line 21, nesting.scss */ +div { + /* line 22, nesting.scss */ + font: 10px hello world; + font-size: 10px; + font-color: blue; + /* line 27, nesting.scss */ + border-left: 1px solid blue; + border-right: 2px dashed green; } +/* line 34, nesting.scss */ +#nested-nesting { + bar: baz; + /* line 36, nesting.scss */ + bang-bop: bar; + bang-bip: 1px; + /* line 39, nesting.scss */ + bang-blat-baf: bort; } diff --git a/tests/outputs/null_numbered.css b/tests/outputs/null_numbered.css new file mode 100644 index 00000000..e5e476cf --- /dev/null +++ b/tests/outputs/null_numbered.css @@ -0,0 +1,29 @@ +/* line 2, null.scss */ +.div { + one: null; + one: world; + one: NULL world; + one: a, b; + two: a, b; } +/* line 12, null.scss */ +p:before { + /* line 13, null.scss */ + content: "I ate pies!"; } +/* line 31, null.scss */ +.foo { + /* line 26, null.scss */ + -webkit-border-radius: 10; + border-radius: 10; + /* line 27, null.scss */ } +/* line 35, null.scss */ +.fu { + /* line 26, null.scss */ + -webkit-border-radius: 20; + border-radius: 20; + /* line 27, null.scss */ } +/* line 39, null.scss */ +.bar { + /* line 26, null.scss */ + -webkit-border-top-left-radius: 30; + border-top-left-radius: 30; + /* line 27, null.scss */ } diff --git a/tests/outputs/operators_numbered.css b/tests/outputs/operators_numbered.css new file mode 100644 index 00000000..703bb365 --- /dev/null +++ b/tests/outputs/operators_numbered.css @@ -0,0 +1,168 @@ +/* line 3, operators.scss */ +body { + color: 8; + color: 16; + height: 10px/10px; + color: 6px; + color: 5px; + bottom: 2px; + top: 1.5em; + left: -1cm; + top: 6.29921; } +/* line 15, operators.scss */ +div { + color: false; + color: true; + color: true; + color: false; + color: what > 3; } +/* line 25, operators.scss */ +#units { + test: 2.5748in; + test: 13mm; + test: 4em; + test: 11mm; + test: 1.1cm; } +/* line 33, operators.scss */ +#modulo { + test: 1; + test: 1cm; } +/* line 38, operators.scss */ +#colors { + color: #ff0203; + color: #fe0000; + color: rgba(3, 8, 15, 0.5); + color: rgba(5, 7, 10, 0.5); + color: rgba(2, 4, 6, 0.5); + color: rgba(0, 1, 1, 0.5); + color: rgba(3, 4, 5, 0.5); + color: rgba(0, 0, 1, 0.5); + color: #22f; + color: false; + color: true; + color: true; + color: false; } +/* line 59, operators.scss */ +#preserve { + hello: what -going; + hello: what - going; } +/* line 64, operators.scss */ +#strings { + hello: what -going; + hello: whatgoing; + hello: whatgoing; + hello: whatgoing; + hello: whatgoing; + hello: "whatgoing"; + hello: goingwhat; + hello: "whatwhat"; } +/* line 77, operators.scss */ +#negation { + a: -60; + b: -90; + b: -90; } +/* line 84, operators.scss */ +#bools-fail { + and: false and two; + and: one and two; + and: one and false; + or: false or two; + or: one or two; + or: one or false; } +/* line 94, operators.scss */ +#bools { + and: false; + and: two; + and: false; + or: two; + or: one; + or: one; } +/* line 105, operators.scss */ +#nots-fail { + not: false2; + not: not false; + not: not 0; + not: not 1; + not: not ""; + not: not hello; } +/* line 114, operators.scss */ +#nots { + not: false2; + not: true; + not: false; + not: false; + not: false; + not: false; } +/* line 123, operators.scss */ +#string-test { + str: true; + str: false; + str: true; + /* line 131, operators.scss */ + str: true; + /* line 133, operators.scss */ + str: xhellohellofalse; + str: true; } +/* line 139, operators.scss */ +#special { + cancel-unit: 1; } +/* line 146, operators.scss */ +.row .a { + margin: -0.5em; } +/* line 147, operators.scss */ +.row .b { + margin: -0.5em; } +/* line 148, operators.scss */ +.row .c { + margin: -0.5em; } +/* line 149, operators.scss */ +.row .d { + margin: -0.5em; } +/* line 150, operators.scss */ +.row .e { + margin: 0 -0.5em; } +/* line 152, operators.scss */ +.alt .a { + margin: -0.5em; } +/* line 153, operators.scss */ +.alt .b { + margin: -0.5em; } +/* line 154, operators.scss */ +.alt .c { + margin: -0.5em; } +/* line 155, operators.scss */ +.alt .d { + margin: 0 -1em / 2; } +/* line 156, operators.scss */ +.alt .e { + margin: 0 -0.5em; } +/* line 158, operators.scss */ +.row .f { + margin: -2em; } +/* line 159, operators.scss */ +.row .g { + margin: -2em; } +/* line 160, operators.scss */ +.row .h { + margin: -2em; } +/* line 161, operators.scss */ +.row .i { + margin: -2em; } +/* line 162, operators.scss */ +.row .j { + margin: 0 -2em; } +/* line 164, operators.scss */ +.alt .f { + margin: -2em; } +/* line 165, operators.scss */ +.alt .g { + margin: -2em; } +/* line 166, operators.scss */ +.alt .h { + margin: -2em; } +/* line 167, operators.scss */ +.alt .i { + margin: 0 -2em; } +/* line 168, operators.scss */ +.alt .j { + margin: 0 -2em; } diff --git a/tests/outputs/parsing_comments_numbered.css b/tests/outputs/parsing_comments_numbered.css new file mode 100644 index 00000000..0085190e --- /dev/null +++ b/tests/outputs/parsing_comments_numbered.css @@ -0,0 +1,55 @@ +/* comment 1 */ +/* line 2, parsing_comments.scss */ +a { + /* comment 2 */ + color: red; + /* comment 3 */ + /* comment 4 */ } +/* comment 5 */ +/*! comment 1 */ +/* line 10, parsing_comments.scss */ +b { + /*! comment 2 */ + color: red; + /*! comment 3 */ + /*! comment 4 */ } +/*! comment 5 */ +/* + * multi-line comment 1 + */ +/* line 20, parsing_comments.scss */ +c { + /* + * multi-line comment 2 + */ + color: red; + /* + * multi-line comment 3 + */ + /* + * multi-line comment 4 + */ } +/* + * multi-line comment 5 + */ +/*! + * multi-line comment 1 + */ +/* line 38, parsing_comments.scss */ +d { + /*! + * multi-line comment 2 + */ + color: red; + /*! + * multi-line comment 3 + */ + /*! + * multi-line comment 4 + */ } +/*! + * multi-line comment 5 + */ +/* line 54, parsing_comments.scss */ +e { + color: red; } diff --git a/tests/outputs/placeholder_selector_numbered.css b/tests/outputs/placeholder_selector_numbered.css new file mode 100644 index 00000000..2c01113f --- /dev/null +++ b/tests/outputs/placeholder_selector_numbered.css @@ -0,0 +1,11 @@ +/* line 1, placeholder_selector.scss */ +p a.notice span, p a.error span, #context a.notice span, #context a.error span { + color: blue; + font-weight: bold; + font-size: 2em; } +/* line 7, placeholder_selector.scss */ +/* line 9, placeholder_selector.scss */ +/* line 13, placeholder_selector.scss */ +p { + padding: 2em; } +/* line 18, placeholder_selector.scss */ diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css new file mode 100644 index 00000000..3d13a5aa --- /dev/null +++ b/tests/outputs/scss_css_numbered.css @@ -0,0 +1,792 @@ +@import "foo.css"; +@import 'foo.css'; +@import url("foo.css"); +@import url('foo.css'); +@import url(foo.css); +@import "foo.css" screen; +@import "foo.css" screen, print; +@charset "UTF-8"; +/* line 1, scss_css.scss */ +[foo~=bar] { + a: b; } +/* line 5, scss_css.scss */ +[foo^=bar] { + a: b; } +/* line 9, scss_css.scss */ +[foo$=bar] { + a: b; } +/* line 13, scss_css.scss */ +[foo*=bar] { + a: b; } +/* line 17, scss_css.scss */ +[foo|=en] { + a: b; } +/* line 21, scss_css.scss */ +foo { + a: 2; + b: 2.3em; + c: 50%; + d: "fraz bran"; + e: flanny-blanny-blan; + f: url(http://sass-lang.com); + h: #abc; } +/* line 32, scss_css.scss */ +selector { + property: value; + property2: value; } +/* line 37, scss_css.scss */ +sel { + p: v; } +/* line 39, scss_css.scss */ +.foo { + /* Foo + Bar + Baz */ + a: b; } +/* line 46, scss_css.scss */ +.foo { + /* Foo + Bar + Baz */ + a: b; } + +.foo { + /* Foo + Bar */ + a: b; } + +.foo { + /* Foo + Bar + Baz */ + a: b; } +/* line 64, scss_css.scss */ +@foo { + /* line 65, scss_css.scss */ + a: b; + rule { + a: b; } } +/* line 71, scss_css.scss */ +@foo { + a: b; } + +@bar { + /* line 72, scss_css.scss */ + a: b; } + +@foo "bar" +/* line 77, scss_css.scss */ +foo { + a: 12px calc(100%/3 - 2*1em - 2*1px); + b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); + b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); + b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } +/* line 84, scss_css.scss */ +foo { + bar: baz; } + +bar { + bar: baz; } + +baz { + bar: baz; } +/* + * foo + */ +/* line 94, scss_css.scss */ +bar { + baz: bang; } +/* line 97, scss_css.scss */ +E, F { + a: b; } +/* line 101, scss_css.scss */ +E F, G H { + a: b; } +/* line 105, scss_css.scss */ +E > F, G > H { + a: b; } +/* This is a CSS comment. */ +.one { + color: green; } +/* Another comment */ +/* The following should not be used: + .two {color: red;} */ +.three { + color: green; + /* color: red; */ } +/** + .four {color: red;} */ +/* line 116, scss_css.scss */ +.five { + color: green; } +/**/ +/* line 118, scss_css.scss */ +.six { + color: green; } +/*********/ +/* line 120, scss_css.scss */ +.seven { + color: green; } +/* a comment **/ +/* line 122, scss_css.scss */ +.eight { + color: green; } +/* line 125, scss_css.scss */ +foo { + a: \foo bar; + b: foo\ bar; + c: \2022 \0020; + d: foo\\bar; + e: foo\"\'bar; } +/* line 133, scss_css.scss */ +foo { + a: "\foo bar"; + b: "foo\ bar"; + c: "\2022 \0020"; + d: "foo\\bar"; + e: "foo\"'bar"; } +/* line 141, scss_css.scss */ +foo { + _name: val; + *name: val; + :name: val; + .name: val; + #name: val; + name/**/: val; + name/*\**/: val; + name: val; } + +@foo "bar" ; +/* line 154, scss_css.scss */ +foo { + a: -moz-element(#foo); + b: -webkit-element(#foo); + b: -foobar-element(#foo); } +/* line 160, scss_css.scss */ +/* line 162, scss_css.scss */ + +@foo ; +/* line 168, scss_css.scss */ +foo { + bar: baz; } +/* line 173, scss_css.scss */ +/* line 175, scss_css.scss */ + +/* line 179, scss_css.scss */ + +0% { + a: b; } +/* line 183, scss_css.scss */ +60% { + a: b; } +/* line 187, scss_css.scss */ +100% { + a: b; } +/* line 191, scss_css.scss */ +12px { + a: b; } +/* line 195, scss_css.scss */ +"foo" { + a: b; } +/* line 199, scss_css.scss */ +foo { + /* line 200, scss_css.scss */ + a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } +/* line 203, scss_css.scss */ +:foo("bar") { + a: b; } +/* line 207, scss_css.scss */ +:foo(bar) { + a: b; } +/* line 211, scss_css.scss */ +:foo(12px) { + a: b; } +/* line 215, scss_css.scss */ +:foo(+) { + a: b; } +/* line 219, scss_css.scss */ +:foo(-) { + a: b; } +/* line 223, scss_css.scss */ +:foo(+"bar") { + a: b; } +/* line 227, scss_css.scss */ +:foo(-++--baz-"bar"12px) { + a: b; } +/* line 231, scss_css.scss */ +foo { + a: foo-bar(12); + b: -foo-bar-baz(13, 14 15); } + +@import "foo.css" screen, print and (foo: 0); +@import "foo.css" screen, only print, screen and (foo: 0); +/* line 254, scss_css.scss */ +foo { + a: foo !important; + b: foo bar !important; + b: foo, bar !important; } +/* line 260, scss_css.scss */ +foo { + a: -moz-bar-baz; + b: foo -o-bar-baz; } + +foo { + a: d; + /* b; c: */ } + +foo { + a : d; + /*: b; c */ } +/* Foo + * Bar */ +/* line 275, scss_css.scss */ +.foo { + /* Foo + * Bar */ } +/* line 280, scss_css.scss */ +[foo] { + a: b; } +/* line 284, scss_css.scss */ +[foo="bar"] { + a: b; } +/* line 288, scss_css.scss */ +[foo~="bar"] { + a: b; } +/* line 292, scss_css.scss */ +[foo^="bar"] { + a: b; } +/* line 296, scss_css.scss */ +[foo$="bar"] { + a: b; } +/* line 300, scss_css.scss */ +[foo*="bar"] { + a: b; } +/* line 304, scss_css.scss */ +[foo|="en"] { + a: b; } +/* line 308, scss_css.scss */ +:root { + a: b; } +/* line 312, scss_css.scss */ +:nth-child(n) { + a: b; } +/* line 316, scss_css.scss */ +:nth-last-child(n) { + a: b; } +/* line 320, scss_css.scss */ +:nth-of-type(n) { + a: b; } +/* line 324, scss_css.scss */ +:nth-last-of-type(n) { + a: b; } +/* line 328, scss_css.scss */ +:first-child { + a: b; } +/* line 332, scss_css.scss */ +:last-child { + a: b; } +/* line 336, scss_css.scss */ +:first-of-type { + a: b; } +/* line 340, scss_css.scss */ +:last-of-type { + a: b; } +/* line 344, scss_css.scss */ +:only-child { + a: b; } +/* line 348, scss_css.scss */ +:only-of-type { + a: b; } +/* line 352, scss_css.scss */ +:empty { + a: b; } +/* line 356, scss_css.scss */ +:link { + a: b; } +/* line 360, scss_css.scss */ +:visited { + a: b; } +/* line 364, scss_css.scss */ +:active { + a: b; } +/* line 368, scss_css.scss */ +:hover { + a: b; } +/* line 372, scss_css.scss */ +:focus { + a: b; } +/* line 376, scss_css.scss */ +:target { + a: b; } +/* line 380, scss_css.scss */ +:lang(fr) { + a: b; } +/* line 384, scss_css.scss */ +:enabled { + a: b; } +/* line 388, scss_css.scss */ +:disabled { + a: b; } +/* line 392, scss_css.scss */ +:checked { + a: b; } +/* line 396, scss_css.scss */ +::first-line { + a: b; } +/* line 400, scss_css.scss */ +::first-letter { + a: b; } +/* line 404, scss_css.scss */ +::before { + a: b; } +/* line 408, scss_css.scss */ +::after { + a: b; } +/* line 412, scss_css.scss */ +.warning { + a: b; } +/* line 416, scss_css.scss */ +#myid { + a: b; } +/* line 420, scss_css.scss */ +:not(s) { + a: b; } +/* line 424, scss_css.scss */ +@media all { + /* line 425, scss_css.scss */ + /* line 428, scss_css.scss */ + rule1 { + prop: val; } + rule2 { + prop: val; } } +/* line 432, scss_css.scss */ +@media screen, print { + /* line 433, scss_css.scss */ + /* line 436, scss_css.scss */ + rule1 { + prop: val; } + rule2 { + prop: val; } } +/* line 440, scss_css.scss */ +@media screen and (-webkit-min-device-pixel-ratio: 0) { + a: b; } +/* line 444, scss_css.scss */ +@media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { + a: b; } +/* line 448, scss_css.scss */ +:-moz-any(h1, h2, h3) { + a: b; } +/* line 452, scss_css.scss */ +:-moz-any(.foo) { + a: b; } +/* line 456, scss_css.scss */ +:-moz-any(foo bar, .baz > .bang) { + a: b; } + +@-moz-document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 463, scss_css.scss */ +regexp("^https:.*") { + /* line 464, scss_css.scss */ + .foo { + a: b; } } +/* line 468, scss_css.scss */ +foo { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } +/* line 473, scss_css.scss */ +foo { + filter: alpha(opacity=20); + filter: alpha(opacity=20, enabled=true); + filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } +/* line 479, scss_css.scss */ +@foo bar { + a: b; } +/* line 482, scss_css.scss */ +@bar baz { + c: d; } + +@foo bar; +@bar baz; +/* Foo +* Bar */ +/* Baz +* Bang */ +/* line 496, scss_css.scss */ +.foo { + /* Foo + * Bar */ + /* Baz + * Bang */ } +/* line 503, scss_css.scss */ +.foo { + /* Foo Bar */ + /* Baz Bang */ } + +@namespace "http://www.w3.org/Profiles/xhtml1-strict"; +@namespace url(http://www.w3.org/Profiles/xhtml1-strict); +@namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); +/* line 513, scss_css.scss */ +[foo|bar=baz] { + a: b; } +/* line 517, scss_css.scss */ +[*|bar=baz] { + a: b; } +/* line 521, scss_css.scss */ +[foo|bar|=baz] { + a: b; } +/* line 525, scss_css.scss */ +foo|E { + a: b; } +/* line 529, scss_css.scss */ +*|E { + a: b; } +/* line 533, scss_css.scss */ +foo|* { + a: b; } +/* line 537, scss_css.scss */ +*|* { + a: b; } +/* line 541, scss_css.scss */ +:not(foo|bar) { + a: b; } +/* line 545, scss_css.scss */ +:not(*|bar) { + a: b; } +/* line 549, scss_css.scss */ +:not(foo|*) { + a: b; } +/* line 553, scss_css.scss */ +:not(*|*) { + a: b; } +/* line 557, scss_css.scss */ +:not(#blah) { + a: b; } +/* line 561, scss_css.scss */ +:not(.blah) { + a: b; } +/* line 565, scss_css.scss */ +:not([foo]) { + a: b; } +/* line 569, scss_css.scss */ +:not([foo^="bar"]) { + a: b; } +/* line 573, scss_css.scss */ +:not([baz|foo~="bar"]) { + a: b; } +/* line 577, scss_css.scss */ +:not(:hover) { + a: b; } +/* line 581, scss_css.scss */ +:not(:nth-child(2n + 3)) { + a: b; } +/* line 585, scss_css.scss */ +:not(:not(#foo)) { + a: b; } +/* line 589, scss_css.scss */ +:not(a#foo.bar) { + a: b; } +/* line 593, scss_css.scss */ +:not(#foo .bar > baz) { + a: b; } +/* line 597, scss_css.scss */ +:not(h1, h2, h3) { + a: b; } +/* line 605, scss_css.scss */ +foo { + /* line 606, scss_css.scss */ + a: "bang 1 bar bip"; } +/* line 609, scss_css.scss */ +:nth-child(-n) { + a: b; } +/* line 613, scss_css.scss */ +:nth-child(+n) { + a: b; } +/* line 617, scss_css.scss */ +:nth-child(even) { + a: b; } +/* line 621, scss_css.scss */ +:nth-child(odd) { + a: b; } +/* line 625, scss_css.scss */ +:nth-child(50) { + a: b; } +/* line 629, scss_css.scss */ +:nth-child(-50) { + a: b; } +/* line 633, scss_css.scss */ +:nth-child(+50) { + a: b; } +/* line 637, scss_css.scss */ +:nth-child(2n+3) { + a: b; } +/* line 641, scss_css.scss */ +:nth-child(2n-3) { + a: b; } +/* line 645, scss_css.scss */ +:nth-child(+2n-3) { + a: b; } +/* line 649, scss_css.scss */ +:nth-child(-2n+3) { + a: b; } +/* line 653, scss_css.scss */ +:nth-child(-2n+ 3) { + a: b; } +/* line 657, scss_css.scss */ +:nth-child( 2n + 3) { + a: b; } +/* line 661, scss_css.scss */ +foo { + a: foo bar baz; + b: foo, #abc, -12; + c: 1px/2px/-3px; + d: foo bar, baz/bang; } +/* line 668, scss_css.scss */ +@page { + prop1: val; + prop2: val; } +/* line 673, scss_css.scss */ +@page flap { + prop1: val; + prop2: val; } +/* line 678, scss_css.scss */ +@page :first { + prop1: val; + prop2: val; } +/* line 683, scss_css.scss */ +@page flap:first { + prop1: val; + prop2: val; } +/* line 688, scss_css.scss */ +.foo { + /* Foo */ + a: b; } +/* line 693, scss_css.scss */ +.foo { + /* Foo + * Bar */ + a: b; } +/* Foo */ +/* line 699, scss_css.scss */ +.foo { + a: b; } +/* Foo + * Bar */ +.foo { + a: b; } + +.foo #bar:baz(/* bang )*/ bip) { + /* .a #foo */ + a: b; } +/* line 712, scss_css.scss */ +> E { + a: b; } +/* line 716, scss_css.scss */ ++ E { + a: b; } +/* line 720, scss_css.scss */ +~ E { + a: b; } +/* line 724, scss_css.scss */ +> > E { + a: b; } +/* line 728, scss_css.scss */ +>> E { + a: b; } +/* line 732, scss_css.scss */ +E* { + a: b; } +/* line 736, scss_css.scss */ +E*.foo { + a: b; } +/* line 740, scss_css.scss */ +E*:hover { + a: b; } + +E, F { + /* line 745, scss_css.scss */ + a: b; } + +E F { + /* line 750, scss_css.scss */ + a: b; } + +E, F G, H { + /* line 755, scss_css.scss */ + a: b; } +/* line 759, scss_css.scss */ +body { + /* + //comment here + */ } +/* line 766, scss_css.scss */ +E > F { + a: b; } +/* line 768, scss_css.scss */ +E ~ F { + a: b; } +/* line 770, scss_css.scss */ +E + F { + a: b; } +/* line 772, scss_css.scss */ +* { + a: b; } +/* line 776, scss_css.scss */ +E { + a: b; } +/* line 780, scss_css.scss */ +E[foo] { + a: b; } +/* line 784, scss_css.scss */ +E[foo="bar"] { + a: b; } +/* line 788, scss_css.scss */ +E[foo~="bar"] { + a: b; } +/* line 792, scss_css.scss */ +E[foo^="bar"] { + a: b; } +/* line 796, scss_css.scss */ +E[foo$="bar"] { + a: b; } +/* line 800, scss_css.scss */ +E[foo*="bar"] { + a: b; } +/* line 804, scss_css.scss */ +E[foo|="en"] { + a: b; } +/* line 808, scss_css.scss */ +E:root { + a: b; } +/* line 812, scss_css.scss */ +E:nth-child(n) { + a: b; } +/* line 816, scss_css.scss */ +E:nth-last-child(n) { + a: b; } +/* line 820, scss_css.scss */ +E:nth-of-type(n) { + a: b; } +/* line 824, scss_css.scss */ +E:nth-last-of-type(n) { + a: b; } +/* line 828, scss_css.scss */ +E:first-child { + a: b; } +/* line 832, scss_css.scss */ +E:last-child { + a: b; } +/* line 836, scss_css.scss */ +E:first-of-type { + a: b; } +/* line 840, scss_css.scss */ +E:last-of-type { + a: b; } +/* line 844, scss_css.scss */ +E:only-child { + a: b; } +/* line 848, scss_css.scss */ +E:only-of-type { + a: b; } +/* line 852, scss_css.scss */ +E:empty { + a: b; } +/* line 856, scss_css.scss */ +E:link { + a: b; } +/* line 860, scss_css.scss */ +E:visited { + a: b; } +/* line 864, scss_css.scss */ +E:active { + a: b; } +/* line 868, scss_css.scss */ +E:hover { + a: b; } +/* line 872, scss_css.scss */ +E:focus { + a: b; } +/* line 876, scss_css.scss */ +E:target { + a: b; } +/* line 880, scss_css.scss */ +E:lang(fr) { + a: b; } +/* line 884, scss_css.scss */ +E:enabled { + a: b; } +/* line 888, scss_css.scss */ +E:disabled { + a: b; } +/* line 892, scss_css.scss */ +E:checked { + a: b; } +/* line 896, scss_css.scss */ +E::first-line { + a: b; } +/* line 900, scss_css.scss */ +E::first-letter { + a: b; } +/* line 904, scss_css.scss */ +E::before { + a: b; } +/* line 908, scss_css.scss */ +E::after { + a: b; } +/* line 912, scss_css.scss */ +E.warning { + a: b; } +/* line 916, scss_css.scss */ +E#myid { + a: b; } +/* line 920, scss_css.scss */ +E:not(s) { + a: b; } +/* line 924, scss_css.scss */ +E F { + a: b; } +/* line 928, scss_css.scss */ +E > F { + a: b; } +/* line 932, scss_css.scss */ +E + F { + a: b; } +/* line 936, scss_css.scss */ +E ~ F { + a: b; } +/* line 940, scss_css.scss */ +@supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { + /* line 941, scss_css.scss */ + .foo { + a: b; } } +/* line 947, scss_css.scss */ +@-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { + /* line 948, scss_css.scss */ + .foo { + a: b; } } +/* line 954, scss_css.scss */ +foo { + foo: bar; + #baz: bang; + #bip: bop; } +/* line 960, scss_css.scss */ +foo { + a: -2; + b: -2.3em; + c: -50%; + d: -foo(bar baz); } +/* line 967, scss_css.scss */ +foo { + a: -0.5em; + b: 0.5em; + c: -foo(12px); + d: +foo(12px); } +/* line 977, scss_css.scss */ +foo { + -moz-foo-bar: blat; + -o-flat-blang: wibble; } +/* line 982, scss_css.scss */ +foo { + a: foo(); + b: bar baz-bang() bip; } diff --git a/tests/outputs/selectors_numbered.css b/tests/outputs/selectors_numbered.css new file mode 100644 index 00000000..1cf1a5ed --- /dev/null +++ b/tests/outputs/selectors_numbered.css @@ -0,0 +1,363 @@ +/* line 1, selectors.scss */ +* { + color: blue; } +/* line 2, selectors.scss */ +E { + color: blue; } +/* line 4, selectors.scss */ +E:not(:link) { + color: blue; } +/* line 5, selectors.scss */ +E:not(:link):not(:visited) { + color: blue; } +/* line 6, selectors.scss */ +E:not(:link, :visited) { + color: blue; } +/* line 7, selectors.scss */ +E:matches(:hover, :focus) { + color: blue; } +/* line 9, selectors.scss */ +E.warning { + color: blue; } +/* line 10, selectors.scss */ +E#id { + color: blue; } +/* line 11, selectors.scss */ +E[foo] { + color: blue; } +/* line 12, selectors.scss */ +E[foo="barbar"] { + color: blue; } +/* line 13, selectors.scss */ +E[foo="barbar" i] { + color: blue; } +/* line 14, selectors.scss */ +E[foo~="hello#$@%@$#^"] { + color: blue; } +/* line 15, selectors.scss */ +E[foo^="color: green;"] { + color: blue; } +/* line 16, selectors.scss */ +E[foo$="239023"] { + color: blue; } +/* line 17, selectors.scss */ +E[foo*="29302"] { + color: blue; } +/* line 18, selectors.scss */ +E[foo|="239032"] { + color: blue; } +/* line 20, selectors.scss */ +[foo] { + color: blue; } +/* line 21, selectors.scss */ +[foo] .helloWorld { + color: blue; } +/* line 22, selectors.scss */ +[foo].helloWorld { + color: blue; } +/* line 23, selectors.scss */ +[foo="barbar"] { + color: blue; } +/* line 24, selectors.scss */ +[foo~="hello#$@%@$#^"] { + color: blue; } +/* line 25, selectors.scss */ +[foo^="color: green;"] { + color: blue; } +/* line 26, selectors.scss */ +[foo$="239023"] { + color: blue; } +/* line 27, selectors.scss */ +[foo*="29302"] { + color: blue; } +/* line 28, selectors.scss */ +[foo|="239032"] { + color: blue; } +/* line 30, selectors.scss */ +E:dir(ltr) { + color: blue; } +/* line 31, selectors.scss */ +E:lang(en) { + color: blue; } +/* line 32, selectors.scss */ +E:lang(en, fr) { + color: blue; } +/* line 34, selectors.scss */ +E:any-link { + color: blue; } +/* line 35, selectors.scss */ +E:link { + color: blue; } +/* line 36, selectors.scss */ +E:visited { + color: blue; } +/* line 37, selectors.scss */ +E:local-link { + color: blue; } +/* line 38, selectors.scss */ +E:local-link(0) { + color: red; } +/* line 39, selectors.scss */ +E:local-link(1) { + color: white; } +/* line 40, selectors.scss */ +E:local-link(2) { + color: red; } +/* line 41, selectors.scss */ +E:target { + color: blue; } +/* line 42, selectors.scss */ +E:scope { + color: blue; } +/* line 44, selectors.scss */ +E:current { + color: blue; } +/* line 45, selectors.scss */ +E:current(:link) { + color: blue; } +/* line 46, selectors.scss */ +E:past { + color: blue; } +/* line 47, selectors.scss */ +E:future { + color: blue; } +/* line 49, selectors.scss */ +E:active { + color: blue; } +/* line 50, selectors.scss */ +E:hover { + color: blue; } +/* line 51, selectors.scss */ +E:focus { + color: blue; } +/* line 52, selectors.scss */ +E:enabled { + color: blue; } +/* line 53, selectors.scss */ +E:disabled { + color: blue; } +/* line 54, selectors.scss */ +E:indeterminate { + color: blue; } +/* line 55, selectors.scss */ +E:default { + color: blue; } +/* line 56, selectors.scss */ +E:in-range { + color: blue; } +/* line 57, selectors.scss */ +E:out-of-range { + color: blue; } +/* line 58, selectors.scss */ +E:required { + color: blue; } +/* line 59, selectors.scss */ +E:optional { + color: blue; } +/* line 60, selectors.scss */ +E:read-only { + color: blue; } +/* line 61, selectors.scss */ +E:read-write { + color: blue; } +/* line 63, selectors.scss */ +E:root { + color: blue; } +/* line 64, selectors.scss */ +E:empty { + color: blue; } +/* line 65, selectors.scss */ +E:first-child { + color: blue; } +/* line 66, selectors.scss */ +E:nth-child(odd) { + color: blue; } +/* line 67, selectors.scss */ +E:nth-child(2n+1) { + color: blue; } +/* line 68, selectors.scss */ +E:nth-child(5) { + color: blue; } +/* line 69, selectors.scss */ +E:last-child { + color: blue; } +/* line 70, selectors.scss */ +E:nth-last-child(-n+2) { + color: blue; } +/* line 71, selectors.scss */ +E:only-child { + color: blue; } +/* line 72, selectors.scss */ +E:first-of-type { + color: blue; } +/* line 73, selectors.scss */ +E:nth-of-type(2n) { + color: blue; } +/* line 74, selectors.scss */ +E:last-of-type { + color: blue; } +/* line 75, selectors.scss */ +E:nth-last-of-type(n) { + color: blue; } +/* line 76, selectors.scss */ +E:only-of-type { + color: blue; } +/* line 77, selectors.scss */ +E:nth-match(odd) { + color: blue; } +/* line 78, selectors.scss */ +E:nth-last-match(odd) { + color: blue; } +/* line 80, selectors.scss */ +E:column(n) { + color: blue; } +/* line 81, selectors.scss */ +E:nth-column(n) { + color: blue; } +/* line 82, selectors.scss */ +E:nth-last-column(n) { + color: blue; } +/* line 84, selectors.scss */ +E F { + color: blue; } +/* line 85, selectors.scss */ +E > F { + color: blue; } +/* line 86, selectors.scss */ +E + F { + color: blue; } +/* line 87, selectors.scss */ +E ~ F { + color: blue; } +/* line 88, selectors.scss */ +E /foo/ F { + color: blue; } +/* line 89, selectors.scss */ +E! > F { + color: blue; } +/* line 92, selectors.scss */ +[foo|att=val] { + color: blue; } +/* line 93, selectors.scss */ +[*|att] { + color: yellow; } +/* line 94, selectors.scss */ +[|att] { + color: green; } +/* line 95, selectors.scss */ +[att] { + color: green; } +/* line 98, selectors.scss */ +E::first-line { + color: blue; } +/* line 99, selectors.scss */ +E::first-letter { + color: blue; } +/* line 100, selectors.scss */ +E::before { + color: blue; } +/* line 101, selectors.scss */ +E::after { + color: blue; } +/* line 104, selectors.scss */ +E::choices { + color: blue; } +/* line 105, selectors.scss */ +E::value { + color: blue; } +/* line 106, selectors.scss */ +E::repeat-index { + color: blue; } +/* line 107, selectors.scss */ +E::repeat-item { + color: blue; } +/* line 109, selectors.scss */ +E:first { + color: blue; } +/* line 110, selectors.scss */ +E:first-line { + color: blue; } +/* line 111, selectors.scss */ +E:first-letter { + color: blue; } +/* line 112, selectors.scss */ +E:before { + color: blue; } +/* line 113, selectors.scss */ +E:after { + color: blue; } +/* line 114, selectors.scss */ +E:checked { + color: blue; } +/* line 115, selectors.scss */ +E:invalid { + color: blue; } +/* line 116, selectors.scss */ +E:valid { + color: blue; } +/* line 117, selectors.scss */ +E:left { + color: blue; } +/* line 118, selectors.scss */ +E:right { + color: blue; } +/* line 121, selectors.scss */ +E:any(ol) { + color: blue; } +/* line 122, selectors.scss */ +E::selection { + color: blue; } +/* line 126, selectors.scss */ +div { + /* line 127, selectors.scss */ + /* line 131, selectors.scss */ + font: something; + font-size: 30em; } + div font:something { + size: 30em; } +/* line 139, selectors.scss */ +.something { + /* line 140, selectors.scss */ + /* line 144, selectors.scss */ + /* line 148, selectors.scss */ } + .something.world { + color: blue; } + .something .mold { + height: 200px; } + .dog .something { + color: blue; } +/* line 153, selectors.scss */ +.simple { + /* line 154, selectors.scss */ + /* line 158, selectors.scss */ } + .dad .simple .wolf { + color: blue; } + .rad.simple.bad { + color: blue; } +/* line 164, selectors.scss */ +div { + /* line 165, selectors.scss */ } + .something div .what { + /* line 166, selectors.scss */ } + .something div .what.world { + color: blue; } +/* line 172, selectors.scss */ +div { + /* line 173, selectors.scss */ } + div.foo div { + color: blue; } +/* line 178, selectors.scss */ +.main, div { + /* line 179, selectors.scss */ } + .main .message div, div .message div { + /* line 180, selectors.scss */ } + .main .message div .title, div .message div .title { + /* line 181, selectors.scss */ } + .nice-fonts .main .message div .title, .nice-fonts div .message div .title { + font-size: 24px; } +/* line 189, selectors.scss */ +.escape\% { + color: red; } +/* line 193, selectors.scss */ +.escape-plan\% { + color: green; } diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css new file mode 100644 index 00000000..c72f5c07 --- /dev/null +++ b/tests/outputs/values_numbered.css @@ -0,0 +1,37 @@ +/* line 2, values.scss */ +#values { + color: #eee; + color: #eee; + height: 20px; + width: 80%; + color: "hello world"; + height: url("http://google.com"); + dads: url(http://leafo.net); + padding: 10px 10px 10px 10px, 3px 3px 3px; + textblock: "This is a \ +multiline block \ +/* line 13, values.scss */ +#not { color: #eee;}"; + margin: 4, 3, 1; + content: "This is a \ +multiline string."; + border-radius: -1px -1px -1px black; } +/* line 20, values.scss */ +#subtraction { + lit: 10 -11; + lit: -1; + lit: -1; + lit: -1; + var: -90; + var: -90; + var: -90; + var: -90; } +/* line 34, values.scss */ +#special { + /* line 35, values.scss */ + a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } +/* line 38, values.scss */ +#unary { + b: 0.5em; + c: -foo(12px); + d: +foo(12px); } diff --git a/tests/outputs/variables_numbered.css b/tests/outputs/variables_numbered.css new file mode 100644 index 00000000..2c90541f --- /dev/null +++ b/tests/outputs/variables_numbered.css @@ -0,0 +1,28 @@ +cool: 100px; +/* line 4, variables.scss */ +div { + height: red, two, three; } +/* line 10, variables.scss */ +div { + num: 1000; } +/* line 15, variables.scss */ +div { + num: 2000; } +/* line 23, variables.scss */ +pre { + color: blue; } +/* line 31, variables.scss */ +del { + /* line 34, variables.scss */ + color: red; } + del div { + /* line 36, variables.scss */ } + del div pre { + color: red; } +/* line 50, variables.scss */ +body { + font-family: Arial; + font-family: Helvetica Neue; + font-family: "Helvetica Neue"; + font-family: Helvetica, Arial, sans-serif; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } From a59c3dceba0280069448d3375a6751bbeb805e87 Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 00:52:32 +0100 Subject: [PATCH 18/33] keep generated scss (test) files --- tests/InputTest.php | 25 +- tests/inputs/numbered/builtins.scss | 149 ++++ tests/inputs/numbered/comments.scss | 34 + tests/inputs/numbered/compass_extract.scss | 219 +++++ tests/inputs/numbered/content.scss | 58 ++ .../numbered/content_with_function.scss | 15 + tests/inputs/numbered/default_args.scss | 11 + tests/inputs/numbered/directives.scss | 118 +++ tests/inputs/numbered/extends.scss | 190 +++++ tests/inputs/numbered/filter_effects.scss | 48 ++ tests/inputs/numbered/functions.scss | 77 ++ tests/inputs/numbered/ie7.scss | 13 + tests/inputs/numbered/if.scss | 67 ++ tests/inputs/numbered/if_on_null.scss | 8 + tests/inputs/numbered/import.scss | 20 + tests/inputs/numbered/interpolation.scss | 97 +++ tests/inputs/numbered/keyword_args.scss | 17 + tests/inputs/numbered/list.scss | 14 + tests/inputs/numbered/looping.scss | 44 + tests/inputs/numbered/media.scss | 246 ++++++ tests/inputs/numbered/mixins.scss | 163 ++++ tests/inputs/numbered/nesting.scss | 40 + tests/inputs/numbered/null.scss | 46 ++ tests/inputs/numbered/operators.scss | 167 ++++ tests/inputs/numbered/parsing_comments.scss | 60 ++ .../inputs/numbered/placeholder_selector.scss | 19 + tests/inputs/numbered/scss_css.scss | 765 ++++++++++++++++++ tests/inputs/numbered/selectors.scss | 289 +++++++ tests/inputs/numbered/values.scss | 42 + .../tempfile.scss => numbered/variables.scss} | 16 +- tests/outputs/builtins_numbered.css | 26 +- tests/outputs/comments_numbered.css | 4 +- tests/outputs/compass_extract_numbered.css | 22 +- tests/outputs/content_numbered.css | 24 +- .../content_with_function_numbered.css | 2 +- tests/outputs/default_args_numbered.css | 2 +- tests/outputs/directives_numbered.css | 60 +- tests/outputs/extends_numbered.css | 102 +-- tests/outputs/filter_effects_numbered.css | 12 +- tests/outputs/functions_numbered.css | 16 +- tests/outputs/ie7_numbered.css | 6 +- tests/outputs/if_numbered.css | 10 +- tests/outputs/if_on_null_numbered.css | 2 +- tests/outputs/import_numbered.css | 6 +- tests/outputs/interpolation_numbered.css | 68 +- tests/outputs/keyword_args_numbered.css | 4 +- tests/outputs/list_numbered.css | 4 +- tests/outputs/looping_numbered.css | 6 +- tests/outputs/media_numbered.css | 128 +-- tests/outputs/mixins_numbered.css | 62 +- tests/outputs/nesting_numbered.css | 18 +- tests/outputs/null_numbered.css | 24 +- tests/outputs/operators_numbered.css | 72 +- tests/outputs/parsing_comments_numbered.css | 10 +- .../outputs/placeholder_selector_numbered.css | 10 +- tests/outputs/scss_css_numbered.css | 434 +++++----- tests/outputs/selectors_numbered.css | 248 +++--- tests/outputs/values_numbered.css | 12 +- tests/outputs/variables_numbered.css | 16 +- 59 files changed, 3763 insertions(+), 724 deletions(-) create mode 100644 tests/inputs/numbered/builtins.scss create mode 100644 tests/inputs/numbered/comments.scss create mode 100644 tests/inputs/numbered/compass_extract.scss create mode 100644 tests/inputs/numbered/content.scss create mode 100644 tests/inputs/numbered/content_with_function.scss create mode 100644 tests/inputs/numbered/default_args.scss create mode 100644 tests/inputs/numbered/directives.scss create mode 100644 tests/inputs/numbered/extends.scss create mode 100644 tests/inputs/numbered/filter_effects.scss create mode 100644 tests/inputs/numbered/functions.scss create mode 100644 tests/inputs/numbered/ie7.scss create mode 100644 tests/inputs/numbered/if.scss create mode 100644 tests/inputs/numbered/if_on_null.scss create mode 100644 tests/inputs/numbered/import.scss create mode 100644 tests/inputs/numbered/interpolation.scss create mode 100644 tests/inputs/numbered/keyword_args.scss create mode 100644 tests/inputs/numbered/list.scss create mode 100644 tests/inputs/numbered/looping.scss create mode 100644 tests/inputs/numbered/media.scss create mode 100644 tests/inputs/numbered/mixins.scss create mode 100644 tests/inputs/numbered/nesting.scss create mode 100644 tests/inputs/numbered/null.scss create mode 100644 tests/inputs/numbered/operators.scss create mode 100644 tests/inputs/numbered/parsing_comments.scss create mode 100644 tests/inputs/numbered/placeholder_selector.scss create mode 100644 tests/inputs/numbered/scss_css.scss create mode 100644 tests/inputs/numbered/selectors.scss create mode 100644 tests/inputs/numbered/values.scss rename tests/inputs/{temp/tempfile.scss => numbered/variables.scss} (71%) diff --git a/tests/InputTest.php b/tests/InputTest.php index cef00451..ea5c2497 100644 --- a/tests/InputTest.php +++ b/tests/InputTest.php @@ -23,7 +23,7 @@ class InputTest extends \PHPUnit_Framework_TestCase protected static $outputDir = 'outputs'; protected static $line_number_suffix = '_numbered'; - protected static $tempfilename = 'tempfile.scss'; + protected static $numbered_folder = 'numbered'; public function setUp() @@ -64,24 +64,27 @@ public function testInputFile($inFname, $outFname) public function testLineNumbering($inFname, $outFname) { - $outFname = self::lineNumberPath($outFname); + $outPath = self::lineNumberPath($outFname); + $inPath = __DIR__ . '/'.self::$inputDir.'/'.self::$numbered_folder.'/'.self::fileName($inFname); - $scss = LineCommentator::insertLineComments(file($inFname), self::fileName($inFname)); - - //(over)write temp scsss file with line numbers for each testfile - file_put_contents(__DIR__ . '/'.self::$inputDir.'/temp/'.self::$tempfilename, $scss); + //write scss + $scss = LineCommentator::insertLineComments(file($inFname), self::$numbered_folder.'/'.self::fileName($inFname)); + file_put_contents($inPath, $scss); if (getenv('BUILD')) { + + //write css $css = $this->scss->compile($scss); - file_put_contents($outFname, $css); + file_put_contents($outPath, $css); } - if (!is_readable($outFname)) { - $this->fail("$outFname is missing, consider building tests with BUILD=true"); + if (!is_readable($outPath)) { + $this->fail("$outPath is missing, consider building tests with BUILD=true"); } - $input = file_get_contents(__DIR__ . '/'.self::$inputDir.'/temp/'.self::$tempfilename); - $output = file_get_contents($outFname); + + $input = file_get_contents($inPath); + $output = file_get_contents($outPath); $this->assertEquals($output, $this->scss->compile($input)); diff --git a/tests/inputs/numbered/builtins.scss b/tests/inputs/numbered/builtins.scss new file mode 100644 index 00000000..438bcad7 --- /dev/null +++ b/tests/inputs/numbered/builtins.scss @@ -0,0 +1,149 @@ +/* line 2, numbered/builtins.scss */ +#color { +color: rgb(34,234,24); +red: red(rgb(34,234,24)); +green: green(rgb(34,234,24)); +blue: blue(rgb(34,234,24)); +color: rgba(1,2,4, 0.5); +a1: alpha(rgb(1,2,4)); +a2: alpha(rgba(1,2,4, 0.5)); +mix: mix(rgb(1,2,3), rgb(3,4,5)); +rgba: rgba($color: #a7c, $alpha: 0.4); +rgba: rgba(#a7c, 0.4); +green: green(ForestGreen); +} +/* line 21, numbered/builtins.scss */ +#hsl { +color: hsl(100, 50, 55); +color: hsla(100, 50, 55, 0.5); +hue: hue(hsl(100, 50, 55)); +sat: saturation(hsl(100, 50, 55)); +lig: lightness(hsl(100, 50, 55)); +} +/* line 30, numbered/builtins.scss */ +#more-color { +$color: hsl(-80,44,33); +light: lighten($color, 10%); +dark: darken($color, 10%); +sat: saturate($color, 10%); +desat: desaturate($color, 10%); +gray: grayscale($color); +comp: complement($color); +inv: invert($color); +} +/* line 44, numbered/builtins.scss */ +#more-more-color { +$color: rgba(1,2,3,0.5); +op: opacity($color); +opacify: opacify($color, 0.1); +opacify: fade-in($color, 0.1); +transparentize: transparentize($color, 0.1); +transparentize: fade-out($color, 0.1); +transparentize: transparentize(#348203, 0.1); +} +/* line 56, numbered/builtins.scss */ +#more-more-more-color { +$color: rgba(10,10,10,0); +color: adjust-color($color, $blue: 69, $red: 55, $green: 100, $alpha: 0.4); +color: adjust-color($color, $hue: 170, $saturation: 100, $lightness: 50); +color: change-color($color, $blue: 69, $red: 55, $green: 100, $alpha: 0.4); +color: change-color($color, $hue: 170, $saturation: 100, $lightness: 50); +color: scale-color($color, $red: 55%); +color: scale-color($color, $red: -55%); +color: scale-color($color, $lightness: 55%); +color: scale-color($color, $lightness: -55%); +color: ie-hex-str($color); +color: ie-hex-str(#abc); +} +/* line 74, numbered/builtins.scss */ +#string { +color: unquote("hello what is going on"); +// color: quote(yeah you know it); // ** +color: quote(yeah); +color: quote("I do?"); +} +/* line 81, numbered/builtins.scss */ +#number { +color: percentage(100/40); +color: round(3.4); +color: floor(3.4); +color: ceil(3.4); +top: floor(10.4px); +top: ceil(.4ex); +width: percentage(100px / 50px); +bottom: abs(-10px); +padding: min(5em, 3em, 4em) max(2px, 1in) min(1in, 96px) max(1in, 72pt); +} +/* line 94, numbered/builtins.scss */ +#list { +len: length(hello world what); +len: length(thing); +n: nth(hello world what, 1); +// n: nth(hello world what, 100); // ** +hello: join(one two three, hello, comma); +hello: join(one two three, hello world what is going, comma); +hello: append(one two three, hello, comma); +index: index(1px solid red, solid); +index: index(1px solid red, dashed); +index: index(1px solid red, #f00); +index: index(96px solid red, 1in); +index: index((1in 2) a b, 1in); +index: index((1in 2) a b, (96px 2)); +index: index((1in 2) a b, (1in, 2)); +index: index((1px solid red), solid); +index: index(1px 3px + 3px, 4+2px); +$var: oo; +/* line 115, numbered/builtins.scss */ +index: index(foo bar, f#{$var}); +$yes: one, two, three; +$no: great job; +world: join($yes, $no); +world: append($yes, $no); +cool: join($yes, $no, space); +cool: join($no, $yes); +zip: zip((1px, 2px), (solid dashed)); +zip: zip(1px 2px 3px, solid dashed, red green blue); +} +/* line 129, numbered/builtins.scss */ +#introspection { +t: type-of(100px); +t: type-of(asdf); +t: type-of("asdf"); +t: type-of(true); +t: type-of(#fff); +t: type-of(blue); +t: type-of(one two three); +u: unit(12); +u: unit(12px); +u: unit(12em); +l: unitless(23); +l: unitless(23deg); +c: comparable(2px, 1px); +c: comparable(100px, 3em); +c: comparable(10cm, 3mm); +c: comparable(1, 4); +c: comparable(1ex, 4em); +c: comparable(2em, 5em); +} +/* line 153, numbered/builtins.scss */ +#if { +color: if(true, yes, no); +color: if(false, yes, no); +color: if(false or true, yes, no); +color: if(10px, yes, no); +} +/* line 160, numbered/builtins.scss */ +.transparent { +r: red(transparent); +g: green(transparent); +b: blue(transparent); +a: alpha(transparent); +} +/* line 167, numbered/builtins.scss */ +.alpha { +a: alpha(black); +a: alpha(#fff); +a: alpha(rgb(0, 0, 0)); +a: alpha(rgba(0, 0, 0, 0.5)); +a: alpha(currentColor); +} \ No newline at end of file diff --git a/tests/inputs/numbered/comments.scss b/tests/inputs/numbered/comments.scss new file mode 100644 index 00000000..eca85333 --- /dev/null +++ b/tests/inputs/numbered/comments.scss @@ -0,0 +1,34 @@ +// what is going on? +/** what the heck **/ +/** +Here is a block comment +**/ +// this is a comment +// trailing backslash \ +/*hello*/div /*yeah*/ { //surew +border: 1px solid red; // world +/* another property */ +color: url('http://mage-page.com'); +string: "hello /* this is not a comment */"; +world: "// neither is this"; +string: 'hello /* this is not a comment */' /*what if this is a comment */; +world: '// neither is this' // hell world; +; +what-ever: 100px; +background: url(/*this is not a comment?*/); // uhh what happens here +} +// begin +/* line 31, numbered/comments.scss */ +.dummy { +color: blue; +} +/* comment 1 */ +/* line 36, numbered/comments.scss */ +a { +/* comment 2 */ +/* comment 3 */ color: red; /* comment 4 */ +background-color: red; /* comment 5 */ +/* comment 6 */ +} +/* comment 7 */ +// end \ No newline at end of file diff --git a/tests/inputs/numbered/compass_extract.scss b/tests/inputs/numbered/compass_extract.scss new file mode 100644 index 00000000..41cf3dd0 --- /dev/null +++ b/tests/inputs/numbered/compass_extract.scss @@ -0,0 +1,219 @@ +// Extracted from compass/typography/vertical_rhythm.scss +// The base font size. +$base-font-size: 16px !default; +// The base line height determines the basic unit of vertical rhythm. +$base-line-height: 24px !default; +// Set the default border style for rhythm borders. +$default-rhythm-border-style: solid !default; +// The default font size in all browsers. +$browser-default-font-size: 16px; +// Set to false if you want to use absolute pixels in sizing your typography. +$relative-font-sizing: true !default; +// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function +// to round the line height to the nearest half line height instead of the +// nearest integral line height to avoid large spacing between lines. +$round-to-nearest-half-line: false !default; +// Ensure there is at least this many pixels +// of vertical padding above and below the text. +$min-line-padding: 2px !default; +// $base-font-size but in your output unit of choice. +// Defaults to 1em when `$relative-font-sizing` is true. +$font-unit: if($relative-font-sizing, 1em, $base-font-size) !default; +// The basic unit of font rhythm. +$base-rhythm-unit: $base-line-height / $base-font-size * $font-unit; +// The leader is the amount of whitespace in a line. +// It might be useful in your calculations. +$base-leader: ($base-line-height - $base-font-size) * $font-unit / $base-font-size; +// The half-leader is the amount of whitespace above and below a line. +// It might be useful in your calculations. +$base-half-leader: $base-leader / 2; +// True if a number has a relative unit. +@function relative-unit($number) { +@return unit($number) == "%" or unit($number) == "em" or unit($number) == "rem" +} +// True if a number has an absolute unit. +@function absolute-unit($number) { +@return not (relative-unit($number) or unitless($number)); +} +@if $relative-font-sizing and not relative-unit($font-unit) { +/* line 54, numbered/compass_extract.scss */ +@warn "$relative-font-sizing is true but $font-unit is set to #{$font-unit} which is not a relative unit."; +} +// Establishes a font baseline for the given font-size. +@mixin establish-baseline($font-size: $base-font-size) { +// IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts +// whose root is set in ems. So we set the root font size in percentages of +// the default font size. +/* line 62, numbered/compass_extract.scss */ +* html { +font-size: 100% * ($font-size / $browser-default-font-size); +} +/* line 65, numbered/compass_extract.scss */ +html { +font-size: $font-size; +@include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size)); +} +} +// Resets the line-height to 1 vertical rhythm unit. +// Does not work on elements whose font-size is different from $base-font-size. +// +// @deprecated This mixin will be removed in the next release. +// Please use the `adjust-leading-to` mixin instead. +@mixin reset-baseline { +@include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size)); +} +// Show a background image that can be used to debug your alignments. +// Include the $img argument if you would rather use your own image than the +// Compass default gradient image. +@mixin debug-vertical-alignment($img: false) { +@if $img { +background: image-url($img); +} @else { +@include baseline-grid-background($base-rhythm-unit); +} +} +// Adjust a block to have a different font size and line height to maintain the +// rhythm. $lines specifies how many multiples of the baseline rhythm each line +// of this font should use up. It does not have to be an integer, but it +// defaults to the smallest integer that is large enough to fit the font. +// Use $from-size to adjust from a font-size other than the base font-size. +@mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) { +@if not $relative-font-sizing and $from-size != $base-font-size { +@warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to"; +} +font-size: $font-unit * $to-size / $from-size; +@include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size)); +} +// Adjust a block to have different line height to maintain the rhythm. +// $lines specifies how many multiples of the baseline rhythm each line of this +// font should use up. It does not have to be an integer, but it defaults to the +// smallest integer that is large enough to fit the font. +@mixin adjust-leading-to($lines, $font-size: $base-font-size) { +line-height: rhythm($lines, $font-size); +} +// Calculate rhythm units. +@function rhythm( +$lines: 1, +$font-size: $base-font-size, +$offset: 0 +/* line 117, numbered/compass_extract.scss */ +) { +@if not $relative-font-sizing and $font-size != $base-font-size { +@warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function"; +} +$rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size; +// Round the pixels down to nearest integer. +@if unit($rhythm) == px { +$rhythm: floor($rhythm); +} +@return $rhythm; +} +// Calculate the minimum multiple of rhythm units needed to contain the font-size. +@function lines-for-font-size($font-size) { +$lines: if($round-to-nearest-half-line, +ceil(2 * $font-size / $base-line-height) / 2, +ceil($font-size / $base-line-height)); +@if $lines * $base-line-height - $font-size < $min-line-padding * 2 { +$lines: $lines + if($round-to-nearest-half-line, 0.5, 1); +} +@return $lines; +} +// Apply leading whitespace. The $property can be margin or padding. +@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) { +/* line 142, numbered/compass_extract.scss */ +#{$property}-top: rhythm($lines, $font-size); +} +// Apply leading whitespace as padding. +@mixin padding-leader($lines: 1, $font-size: $base-font-size) { +padding-top: rhythm($lines, $font-size); +} +// Apply leading whitespace as margin. +@mixin margin-leader($lines: 1, $font-size: $base-font-size) { +margin-top: rhythm($lines, $font-size); +} +// Apply trailing whitespace. The $property can be margin or padding. +@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) { +/* line 157, numbered/compass_extract.scss */ +#{$property}-bottom: rhythm($lines, $font-size); +} +// Apply trailing whitespace as padding. +@mixin padding-trailer($lines: 1, $font-size: $base-font-size) { +padding-bottom: rhythm($lines, $font-size); +} +// Apply trailing whitespace as margin. +@mixin margin-trailer($lines: 1, $font-size: $base-font-size) { +margin-bottom: rhythm($lines, $font-size); +} +// Shorthand mixin to apply whitespace for top and bottom margins and padding. +@mixin rhythm($leader: 0, $padding-leader: 0, $padding-trailer: 0, $trailer: 0, $font-size: $base-font-size) { +@include leader($leader, $font-size); +@include padding-leader($padding-leader, $font-size); +@include padding-trailer($padding-trailer, $font-size); +@include trailer($trailer, $font-size); +} +// Apply a border and whitespace to any side without destroying the vertical +// rhythm. The whitespace must be greater than the width of the border. +@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { +@if not $relative-font-sizing and $font-size != $base-font-size { +@warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border"; +} +/* line 184, numbered/compass_extract.scss */ +border-#{$side}: { +style: $border-style; +width: $font-unit * $width / $font-size; +}; +/* line 188, numbered/compass_extract.scss */ +padding-#{$side}: rhythm($lines, $font-size, $offset: $width); +} +// Apply borders and whitespace equally to all sides. +@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { +@if not $relative-font-sizing and $font-size != $base-font-size { +@warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders"; +} +/* line 196, numbered/compass_extract.scss */ +border: { +style: $border-style; +width: $font-unit * $width / $font-size; +}; +padding: rhythm($lines, $font-size, $offset: $width); +} +// Apply a leading border. +@mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { +@include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style); +} +// Apply a trailing border. +@mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { +@include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style); +} +// Apply both leading and trailing borders. +@mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { +@include leading-border($width, $lines, $font-size, $border-style); +@include trailing-border($width, $lines, $font-size, $border-style); +} +// Alias for `horizontal-borders` mixin. +@mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { +@include horizontal-borders($width, $lines, $font-size, $border-style); +} +/* line 224, numbered/compass_extract.scss */ +#test-0 { +unit: relative-unit(10px); +unit: relative-unit(50%); +rhythm: rhythm(); +size: lines-for-font-size(15px); +size: lines-for-font-size(16px); +size: lines-for-font-size(17px); +size: lines-for-font-size(27px); +size: lines-for-font-size(37px); +} +/* line 236, numbered/compass_extract.scss */ +#test-1 { +@include rhythm(5, 6, 7); +} +/* line 240, numbered/compass_extract.scss */ +#test-2 { +@include rhythm-borders; +} +/* line 244, numbered/compass_extract.scss */ +#test-3 { +@include horizontal-borders; +} \ No newline at end of file diff --git a/tests/inputs/numbered/content.scss b/tests/inputs/numbered/content.scss new file mode 100644 index 00000000..b1c81af7 --- /dev/null +++ b/tests/inputs/numbered/content.scss @@ -0,0 +1,58 @@ +@mixin apply-to-ie6-only { +/* line 3, numbered/content.scss */ +* html { +@content; +} +} +@include apply-to-ie6-only { +/* line 8, numbered/content.scss */ +#logo { +background-image: url(/logo.gif); +} +} +$color: white; +@mixin colors($color: blue) { +background-color: $color; +@content; +border-color: $color; +} +/* line 20, numbered/content.scss */ +.colors { +@include colors { color: $color; } +} +@mixin iphone { +/* line 26, numbered/content.scss */ +@media only screen and (max-width: 480px) { +@content; +} +} +@include iphone { +/* line 32, numbered/content.scss */ +body { color: red } +} +/* line 36, numbered/content.scss */ +#sidebar { +$sidebar-width: 300px; +width: $sidebar-width; +@include iphone { +width: $sidebar-width / 3; +} +} +@mixin respond-to($width) { +/* line 46, numbered/content.scss */ +@media only screen and (min-width: $width) { @content; } +} +@include respond-to(40em) { +@for $i from 1 through 2 { +/* line 51, numbered/content.scss */ +.grid-#{$i} { width: 100%; } +} +} +@include respond-to(40em) { +$i: 1; +@while $i <= 2 { +/* line 58, numbered/content.scss */ +.grid-#{$i} { width: 100%; } +$i: $i + 1; +} +} \ No newline at end of file diff --git a/tests/inputs/numbered/content_with_function.scss b/tests/inputs/numbered/content_with_function.scss new file mode 100644 index 00000000..e563eeb8 --- /dev/null +++ b/tests/inputs/numbered/content_with_function.scss @@ -0,0 +1,15 @@ +$test-var: true; +@mixin mixin-using-content() { +@content; +} +@function test-function($value) { +@return $value; +} +@include mixin-using-content { +@if $test-var { +/* line 13, numbered/content_with_function.scss */ +body { +padding: test-function(1 px); +} +} +} \ No newline at end of file diff --git a/tests/inputs/numbered/default_args.scss b/tests/inputs/numbered/default_args.scss new file mode 100644 index 00000000..922b1aca --- /dev/null +++ b/tests/inputs/numbered/default_args.scss @@ -0,0 +1,11 @@ +@mixin cool($color: blue) { +margin: 100px; +} +@function what($height: red) { +@return $height; +} +/* line 11, numbered/default_args.scss */ +div { +height: what(); +@include cool; +} \ No newline at end of file diff --git a/tests/inputs/numbered/directives.scss b/tests/inputs/numbered/directives.scss new file mode 100644 index 00000000..3b7deaab --- /dev/null +++ b/tests/inputs/numbered/directives.scss @@ -0,0 +1,118 @@ +@charset "hello-world"; +/* line 4, numbered/directives.scss */ +@page :left { +/* line 5, numbered/directives.scss */ +div { +color: red; +} +} +/* line 10, numbered/directives.scss */ +@page test { +/* line 11, numbered/directives.scss */ +@media yes { +/* line 12, numbered/directives.scss */ +div { +color: red; +} +/* line 16, numbered/directives.scss */ +@media no { +/* line 17, numbered/directives.scss */ +pre { +color: blue; +} +} +} +} +/* line 24, numbered/directives.scss */ +@media something { +/* line 25, numbered/directives.scss */ +@page { +/* line 26, numbered/directives.scss */ +@media else { +/* line 27, numbered/directives.scss */ +div { +height: 200px; +} +} +} +} +/* line 35, numbered/directives.scss */ +div { +color: red; +/* line 37, numbered/directives.scss */ +@page yeah { +/* line 38, numbered/directives.scss */ +pre { +height: 20px; +} +} +} +/* line 44, numbered/directives.scss */ +@font-face { +color: red; +height: 20px; +} +/* line 50, numbered/directives.scss */ +@keyframes 'bounce' { +/* line 51, numbered/directives.scss */ +from { +top: 100px; +animation-timing-function: ease-out; +} +/* line 56, numbered/directives.scss */ +25% { +top: 50px; +animation-timing-function: ease-in; +} +/* line 61, numbered/directives.scss */ +50% { +top: 100px; +animation-timing-function: ease-out; +} +/* line 66, numbered/directives.scss */ +75% { +top: 75px; +animation-timing-function: ease-in; +} +/* line 71, numbered/directives.scss */ +to { +top: 100px; +} +} +/* line 76, numbered/directives.scss */ +@-webkit-keyframes flowouttoleft { +/* line 77, numbered/directives.scss */ +0% { -webkit-transform: translateX(0) scale(1); } +/* line 78, numbered/directives.scss */ +60%, 70% { -webkit-transform: translateX(0) scale(.7); } +/* line 79, numbered/directives.scss */ +100% { -webkit-transform: translateX(-100%) scale(.7); } +} +/* line 82, numbered/directives.scss */ +div { +animation-name: 'diagonal-slide'; +animation-duration: 5s; +animation-iteration-count: 10; +} +/* line 88, numbered/directives.scss */ +@keyframes 'diagonal-slide' { +/* line 90, numbered/directives.scss */ +from { +left: 0; +top: 0; +} +/* line 95, numbered/directives.scss */ +to { +left: 100px; +top: 100px; +} +} +@document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 105, numbered/directives.scss */ +regexp("https:.*") +{ +/* line 107, numbered/directives.scss */ +body { color: purple; background: yellow; } +} \ No newline at end of file diff --git a/tests/inputs/numbered/extends.scss b/tests/inputs/numbered/extends.scss new file mode 100644 index 00000000..56db5c7c --- /dev/null +++ b/tests/inputs/numbered/extends.scss @@ -0,0 +1,190 @@ +/* line 2, numbered/extends.scss */ +error, other { +border: 1px #f00; +background-color: #fdd; +} +/* line 7, numbered/extends.scss */ +pre, span { +/* line 8, numbered/extends.scss */ +seriousError { +@extend error; +font-size: 20px; +} +} +/* line 14, numbered/extends.scss */ +hello { +@extend other; +color: green; +/* line 17, numbered/extends.scss */ +div { +margin: 10px; +} +} +/* line 22, numbered/extends.scss */ +.cool { +color: red; +} +/* line 26, numbered/extends.scss */ +.blue { +color: purple; +} +/* line 30, numbered/extends.scss */ +.me { +@extend .cool, .blue; +} +/* line 34, numbered/extends.scss */ +.hoverlink { @extend a:hover } +/* line 35, numbered/extends.scss */ +a:hover { text-decoration: underline } +// partial matching and selector merging: +/* line 40, numbered/extends.scss */ +div.hello.world.hmm { +color: blue; +} +/* line 44, numbered/extends.scss */ +pre, code { +/* line 45, numbered/extends.scss */ +.okay.span { +@extend .hello; +} +} +// multiple matches per selector +/* line 51, numbered/extends.scss */ +.xxxxx .xxxxx .xxxxx { +color: green; +} +/* line 55, numbered/extends.scss */ +code { +@extend .xxxxx; +color: red; +} +// chained +/* line 63, numbered/extends.scss */ +.alpha { +color: red; +} +/* line 67, numbered/extends.scss */ +.beta { +@extend .alpha; +color: white; +} +/* line 72, numbered/extends.scss */ +.gama { +@extend .beta; +color: blue; +} +// merging selector sequences +/* line 79, numbered/extends.scss */ +#admin .tabbar a {font-weight: bold} +/* line 80, numbered/extends.scss */ +#demo .overview .fakelink {@extend a} +/* line 82, numbered/extends.scss */ +a1 b1 c1 d1 { color: red; } +/* line 83, numbered/extends.scss */ +x1 y1 z1 w1 { @extend a1; } +/* line 85, numbered/extends.scss */ +a2 b2 c2 d2 { color: red; } +/* line 86, numbered/extends.scss */ +x2 y2 z2 w2 { @extend b2; } +/* line 89, numbered/extends.scss */ +a3 b3 c3 d3 { color: red; } +/* line 90, numbered/extends.scss */ +x3 y3 z3 w3 { @extend c3; } +/* line 93, numbered/extends.scss */ +a4 b4 c4 d4 { color: red; } +/* line 94, numbered/extends.scss */ +x4 y4 z4 w4 { @extend d4; } +// removing common prefix +/* line 98, numbered/extends.scss */ +#butt .yeah .okay { font-weight: bold } +/* line 99, numbered/extends.scss */ +#butt .umm .sure { @extend .okay } +/* line 101, numbered/extends.scss */ +a9 b9 s9 t9 v9 { color: red; } +/* line 103, numbered/extends.scss */ +a9 b9 x9 y9 z9 { +@extend v9; +} +// extends & media +/* line 109, numbered/extends.scss */ +@media print { +/* line 110, numbered/extends.scss */ +horse { +color: blue; +} +} +/* line 115, numbered/extends.scss */ +man { +color: red; +@extend horse; +} +// result == match +/* line 123, numbered/extends.scss */ +wassup { +color: blue; +@extend wassup; +} +/* line 128, numbered/extends.scss */ +.foo { +/* line 129, numbered/extends.scss */ +.wassup { +@extend .wassup; +color: blue; +} +} +// multi-extend +/* line 137, numbered/extends.scss */ +#something { +color: red; +} +/* line 141, numbered/extends.scss */ +.x { +@extend #something; +} +/* line 145, numbered/extends.scss */ +.y { +@extend #something; +} +// twitter-sass-bootstrap infinite loop +/* line 151, numbered/extends.scss */ +.nav-tabs { +/* line 152, numbered/extends.scss */ +&.nav-justified { +@extend .nav-justified; +} +} +/* line 156, numbered/extends.scss */ +.nav-justified { +text-align: justify; +} +// multi-extend with nesting +.btn:hover, +.btn:active, +.btn.active, +.btn.disabled, +/* line 166, numbered/extends.scss */ +.btn[disabled] { +color: red; +} +/* line 169, numbered/extends.scss */ +.edit .actions { +/* line 170, numbered/extends.scss */ +button { +float: right; +@extend .btn; +} +} +/* line 175, numbered/extends.scss */ +.edit { +/* line 176, numbered/extends.scss */ +.new { +/* line 177, numbered/extends.scss */ +.actions { +padding: 0; +} +/* line 180, numbered/extends.scss */ +.actions button { +@extend .btn; +} +} +} \ No newline at end of file diff --git a/tests/inputs/numbered/filter_effects.scss b/tests/inputs/numbered/filter_effects.scss new file mode 100644 index 00000000..de78aa57 --- /dev/null +++ b/tests/inputs/numbered/filter_effects.scss @@ -0,0 +1,48 @@ +/* line 1, numbered/filter_effects.scss */ +#number { +-webkit-filter: grayscale(1) +sepia(0.5) +saturate(0.1) +invert(1) +opacity(0.5) +brightness(0.5) +contrast(0.5); +} +/* line 11, numbered/filter_effects.scss */ +#percentage { +-webkit-filter: grayscale(100%) +sepia(50%) +saturate(10%) +invert(100%) +opacity(50%) +brightness(50%) +contrast(50%); +} +/* line 21, numbered/filter_effects.scss */ +#misc { +-webkit-filter: hue-rotate(90deg) +blur(10px) +drop-shadow(10px -16px 30px purple); +} +@mixin opacity($opacity, $style: 0) { +@if ($opacity < 1) { +opacity: $opacity; +filter: alpha(opacity=$opacity * 100, style=$style); +} @else { +opacity: $opacity / 100; +filter: alpha(opacity=$opacity); +} +} +/* line 37, numbered/filter_effects.scss */ +#decimal { +@include opacity(.5, 1); +} +/* line 41, numbered/filter_effects.scss */ +#percent { +@include opacity(50); +} +/* line 45, numbered/filter_effects.scss */ +.row { +background-color: darken(#2ba6cb, 40%); +color: darken(#2ba6cb, 10%); +} \ No newline at end of file diff --git a/tests/inputs/numbered/functions.scss b/tests/inputs/numbered/functions.scss new file mode 100644 index 00000000..5bcc4ffe --- /dev/null +++ b/tests/inputs/numbered/functions.scss @@ -0,0 +1,77 @@ +@function hello($x) { +@return $x + 4; +} +@function add($a, $b) { +@return $a + $b; +} +/* line 10, numbered/functions.scss */ +div { +color: hello(10px); +sum: add(11, 12); +} +// make sure values are being reduced before being passed up to previous scope +@function one($a, $b) { +@return $a $b; +} +@function two($a, $b) { +@return $a#{$a} $b; +} +@function three($a, $b: default) { +@return "hello #{$a} and #{$b}" +} +@function all($a...) { +@return "hello #{$a}" +} +/* line 33, numbered/functions.scss */ +div { +hello: one(10, 55); +hello: two(10, 55); +hello: three(10, 55); +} +@function hello_world() { +@return 1000; +} +/* line 44, numbered/functions.scss */ +del { +color: hello-world(); +} +/* line 48, numbered/functions.scss */ +div { +$args: foo bar; +hello: three($args...); +hello: three(bar...); +hello: all(Alice, Bob, Tom); +} +@function stringConcatCompassStyle($start,$last) +{ +// Compass still uses it like this +@return #{$start}-#{$last}; +} +/* line 61, numbered/functions.scss */ +.foo +{ +test2: stringConcatCompassStyle(-moz,art); +} +@mixin content_test { +/* line 67, numbered/functions.scss */ +span { +$color: green; +@content; +} +} +@function func_test($c) { +@return $c + 1; +} +/* line 77, numbered/functions.scss */ +div { +@include content_test { +height: func_test(2px); +} +} +@function test ($a, $b: $a/2) { +@return $b; +} +/* line 87, numbered/functions.scss */ +div { +width: test(4); +} \ No newline at end of file diff --git a/tests/inputs/numbered/ie7.scss b/tests/inputs/numbered/ie7.scss new file mode 100644 index 00000000..619d04b8 --- /dev/null +++ b/tests/inputs/numbered/ie7.scss @@ -0,0 +1,13 @@ +// http://jes.st/2013/ie7s-css-breaking-content-counter-bug/ +/* line 2, numbered/ie7.scss */ +#foo:before { +content: counter(item, ".") ": "; +} +/* line 6, numbered/ie7.scss */ +#bar:before { +content: counter(item,"."); +} +/* line 10, numbered/ie7.scss */ +#fu:before { +content: counter(item); +} \ No newline at end of file diff --git a/tests/inputs/numbered/if.scss b/tests/inputs/numbered/if.scss new file mode 100644 index 00000000..12cea3b2 --- /dev/null +++ b/tests/inputs/numbered/if.scss @@ -0,0 +1,67 @@ +@function conds($val) { +@if $val { +@return "red"; +} +@return "blue"; +} +/* line 10, numbered/if.scss */ +div { +@if something { +color: blue; +} +} +/* line 16, numbered/if.scss */ +pre { +val-1: conds(true); +val-2: conds(false); +val-3: conds(null); +val-4: conds(1); +val-5: conds(0); +} +/* line 25, numbered/if.scss */ +span { +@if false { +color: red; +} @else { +color: blue; +} +@if true { +height: 10px; +} @else { +color: 20px; +} +@if false { +height: 10px; +} @elseif false { +color: 20px; +} @else { +width: 20px; +} +} +/* line 47, numbered/if.scss */ +div { +@if false { +color: red; +} @else if false { +color: green; +} @else { +color: blue; +} +@if false { +border-color: red; +} @else if true { +border-color: green; +} @else { +border-color: blue; +} +} +// doesn't work in scss, thing loses scope +/* line 67, numbered/if.scss */ +del { +@if false { +$thing: yes; +} @else { +$thing: no; +} +thing: $thing; +} \ No newline at end of file diff --git a/tests/inputs/numbered/if_on_null.scss b/tests/inputs/numbered/if_on_null.scss new file mode 100644 index 00000000..8e47a601 --- /dev/null +++ b/tests/inputs/numbered/if_on_null.scss @@ -0,0 +1,8 @@ +@function testfunc($pseudo: null) { +$output: if($pseudo, "green", "red"); +@return $output; +} +/* line 6, numbered/if_on_null.scss */ +body { +background-color: testfunc(); +} \ No newline at end of file diff --git a/tests/inputs/numbered/import.scss b/tests/inputs/numbered/import.scss new file mode 100644 index 00000000..e0515eb3 --- /dev/null +++ b/tests/inputs/numbered/import.scss @@ -0,0 +1,20 @@ +@import "foo.css"; +@import "foo" screen; +@import "http://foo.com/bar"; +@import url(foo); +@import "imports/simple"; +/* line 9, numbered/import.scss */ +pre { +color: red; +@import "imports/simple.scss"; +} +/* line 14, numbered/import.scss */ +code { +@import "imports/simple", "imports/simple"; +} +@import "imports/partial"; +/* line 20, numbered/import.scss */ +body { +color: $variable; +@include partial-mixin(); +} \ No newline at end of file diff --git a/tests/inputs/numbered/interpolation.scss b/tests/inputs/numbered/interpolation.scss new file mode 100644 index 00000000..27a51c45 --- /dev/null +++ b/tests/inputs/numbered/interpolation.scss @@ -0,0 +1,97 @@ +/* line 2, numbered/interpolation.scss */ +div { +/* line 3, numbered/interpolation.scss */ +color: red#{white} blue; +/* line 4, numbered/interpolation.scss */ +color: red #{white} blue; +/* line 5, numbered/interpolation.scss */ +color: red #{white}blue; +/* line 6, numbered/interpolation.scss */ +color: red#{white}blue; +/* line 7, numbered/interpolation.scss */ +color: #{umm}#{yeah}#{what}; +/* line 8, numbered/interpolation.scss */ +color: #{stacked}; +/* line 10, numbered/interpolation.scss */ +font-size: 10px/#{something}; +/* line 11, numbered/interpolation.scss */ +font-size: 10px / #{something}; +/* line 13, numbered/interpolation.scss */ +test: "what#{"world"}wrong"; +/* line 14, numbered/interpolation.scss */ +test: "what#{'world'}wrong"; +/* line 15, numbered/interpolation.scss */ +test: "what#{world}wrong"; +/* line 16, numbered/interpolation.scss */ +test: "what"#{world}"wrong"; +/* line 18, numbered/interpolation.scss */ +hi: "what is #{4 + 12} end" +} +// interpolation in selectors +/* line 24, numbered/interpolation.scss */ +pre { +$var: cool; +/* line 27, numbered/interpolation.scss */ +#{var} { +color: red; +} +/* line 31, numbered/interpolation.scss */ +#{var} dad { +color: red; +} +/* line 35, numbered/interpolation.scss */ +bed#{var}dad { +color: red; +} +} +/* line 40, numbered/interpolation.scss */ +cool { +@for $x from 1 through 5 { +/* line 42, numbered/interpolation.scss */ +.thing-#{$x} { +color: red; +} +} +} +/* line 48, numbered/interpolation.scss */ +a#{b}c#{d}e { +color: red; +} +/* line 52, numbered/interpolation.scss */ +##{hello}, .#{world}{ +color: red; +} +/* line 56, numbered/interpolation.scss */ +#abc#{hello}yeah, .cool#{world}yes{ +color: red; +} +$scope: 2; +/* line 62, numbered/interpolation.scss */ +div.element:nth-child(#{$scope}n) +{ +display: none; +} +// property interpolation +/* line 69, numbered/interpolation.scss */ +div { +$var: hello; +/* line 71, numbered/interpolation.scss */ +#{$var}: world; +/* line 72, numbered/interpolation.scss */ +cool#{$var}:world; +/* line 73, numbered/interpolation.scss */ +#{$var}one:world; +/* line 74, numbered/interpolation.scss */ +two#{$var}one:world; +/* line 76, numbered/interpolation.scss */ +one#{a + b}two: cool; +/* line 78, numbered/interpolation.scss */ +#{hello}: { +/* line 79, numbered/interpolation.scss */ +#{world}: red; +/* line 80, numbered/interpolation.scss */ +#{mold}: white; +/* line 81, numbered/interpolation.scss */ +#{$var}: blue; +} +} \ No newline at end of file diff --git a/tests/inputs/numbered/keyword_args.scss b/tests/inputs/numbered/keyword_args.scss new file mode 100644 index 00000000..49da7d33 --- /dev/null +++ b/tests/inputs/numbered/keyword_args.scss @@ -0,0 +1,17 @@ +// mixins +@mixin hello($a: one, $b:two, $c:three, $d: four) { +out: $a $b $c $d; +} +/* line 8, numbered/keyword_args.scss */ +pre { +@include hello(alpha, $d: palace, $b: fort); +} +// functions +@function cool($a, $b) { +@return $a - $b; +} +/* line 19, numbered/keyword_args.scss */ +div { +hello: cool($b: 5, $a: 10); +world: cool(5, 10); +} \ No newline at end of file diff --git a/tests/inputs/numbered/list.scss b/tests/inputs/numbered/list.scss new file mode 100644 index 00000000..bd5282df --- /dev/null +++ b/tests/inputs/numbered/list.scss @@ -0,0 +1,14 @@ +$list: (black); +$list: join($list, white, comma); +/* line 4, numbered/list.scss */ +div { +padding: join(10px 20px, 30px 40px); +margin: join((0, 10px), (10px, 10px), space); +background: linear-gradient($list); +} +$list: (); +$list: join($list, (red, blue), comma); +/* line 13, numbered/list.scss */ +p { +background: linear-gradient($list); +} \ No newline at end of file diff --git a/tests/inputs/numbered/looping.scss b/tests/inputs/numbered/looping.scss new file mode 100644 index 00000000..f3d274e8 --- /dev/null +++ b/tests/inputs/numbered/looping.scss @@ -0,0 +1,44 @@ +/* line 2, numbered/looping.scss */ +div { +@each $var in what is this { +color: $var; +} +@each $var in what, is, this { +font: $var; +} +$list: what is this; +@each $var in $list { +background: $var; +} +$list: what, is, this; +@each $var in $list { +border: $var; +} +} +/* line 23, numbered/looping.scss */ +span { +$i: 0; +@while $i <= 10 { +color: $i; +$i: $i + 1; +} +} +/* line 31, numbered/looping.scss */ +pre { +@for $x from 1 to 5 { +color: $x; +} +@for $x from 1 through 5 { +height: $x; +} +$y: 10; +@for $x from $y through 3 { +cool: $x; +} +} +$j: null; +@while $j { +/* line 49, numbered/looping.scss */ +.item { width: 2em; } +$j: false; +} \ No newline at end of file diff --git a/tests/inputs/numbered/media.scss b/tests/inputs/numbered/media.scss new file mode 100644 index 00000000..3cf01231 --- /dev/null +++ b/tests/inputs/numbered/media.scss @@ -0,0 +1,246 @@ +// media syntax +/* line 3, numbered/media.scss */ +@media { +/* line 4, numbered/media.scss */ +div { color: blue; } +} +/* line 6, numbered/media.scss */ +@media what { +/* line 7, numbered/media.scss */ +div { color: blue; } +} +/* line 10, numbered/media.scss */ +@media (cool) { +/* line 11, numbered/media.scss */ +div { color: blue; } +} +/* line 13, numbered/media.scss */ +@media (cool: blue) { +/* line 14, numbered/media.scss */ +div { color: blue; } +} +/* line 17, numbered/media.scss */ +@media hello and (world) and (butt: man) { +/* line 18, numbered/media.scss */ +div { color: blue; } +} +$navbarCollapseWidth: 940px; +/* line 23, numbered/media.scss */ +@media (max-width: $navbarCollapseWidth) { +color: red; +} +// media bubbling +/* line 28, numbered/media.scss */ +@media not hello and (world) { +color: blue; +/* line 30, numbered/media.scss */ +pre { +color: blue; +} +/* line 34, numbered/media.scss */ +@media butt { +color: red; +/* line 36, numbered/media.scss */ +div { +color: red; +} +} +} +/* line 42, numbered/media.scss */ +@media a, b { +/* line 43, numbered/media.scss */ +@media c { +color: blue; +} +} +/* line 48, numbered/media.scss */ +@media a{ +/* line 49, numbered/media.scss */ +@media b, c { +color: blue; +} +} +/* line 54, numbered/media.scss */ +@media a, b{ +/* line 55, numbered/media.scss */ +@media c, d { +color: blue; +} +} +$media: cree; +$feature: -webkit-min-device-pixel-ratio; +$value: 1.5; +/* line 64, numbered/media.scss */ +div { +color: blue; +/* line 66, numbered/media.scss */ +@media s#{$media}n and ($feature: $value) { +/* line 67, numbered/media.scss */ +.sidebar { +width: 500px; +} +} +} +// @media + @mixin +@mixin color { +color: red; +/* line 76, numbered/media.scss */ +.success { +color: green; +} +} +/* line 81, numbered/media.scss */ +div { +position: absolute; +$y: 2em; +/* line 84, numbered/media.scss */ +@media screen { +top: 0; +$x: 5px; +/* line 87, numbered/media.scss */ +p { +margin: $x; +} +bottom: 6em + $y; +@include color; +} +} +/* line 95, numbered/media.scss */ +.button { +width: 300px; +height: 100px; +background: #eee; +/* line 100, numbered/media.scss */ +:hover { +background: #aaa; +} +/* line 104, numbered/media.scss */ +@media only screen and (max-width : 300px){ +width: 100px; +height: 100px; +} +} +/* line 110, numbered/media.scss */ +code { +position: absolute; +/* line 112, numbered/media.scss */ +@media screen { +/* line 113, numbered/media.scss */ +pre { +height: 20px; +} +height: 10px; +} +} +/* line 120, numbered/media.scss */ +dt { +/* line 121, numbered/media.scss */ +@media screen { +/* line 122, numbered/media.scss */ +@media (color: blue) { +height: 10px; +} +} +} +// nesting media queries +/* line 129, numbered/media.scss */ +@media screen { +/* line 130, numbered/media.scss */ +.screen { +width: 12px; +} +/* line 133, numbered/media.scss */ +@media only screen { +/* line 134, numbered/media.scss */ +.only-screen { +height: 11px; +} +} +} +/* line 140, numbered/media.scss */ +@media only screen { +/* line 141, numbered/media.scss */ +.only-screen { +width: 14px; +} +/* line 144, numbered/media.scss */ +@media only screen { +/* line 145, numbered/media.scss */ +.only-screen { +height: 16px; +} +} +} +/* line 151, numbered/media.scss */ +@media not screen { +/* line 152, numbered/media.scss */ +@media screen { +/* line 153, numbered/media.scss */ +.invalid { +height: 12px; +} +} +} +/* line 159, numbered/media.scss */ +@media not screen { +/* line 160, numbered/media.scss */ +@media print { +/* line 161, numbered/media.scss */ +.only-print { +height: 12px; +} +} +} +/* line 167, numbered/media.scss */ +@media screen { +/* line 168, numbered/media.scss */ +@media not print { +/* line 169, numbered/media.scss */ +.only-print { +height: 12px; +} +} +} +/* line 175, numbered/media.scss */ +@media not screen { +/* line 176, numbered/media.scss */ +@media not print { +/* line 177, numbered/media.scss */ +.invalid { +height: 12px; +} +} +} +/* line 183, numbered/media.scss */ +@media not screen { +/* line 184, numbered/media.scss */ +@media not screen { +/* line 185, numbered/media.scss */ +.not-screen { +height: 15px; +} +} +} +/* line 191, numbered/media.scss */ +@media only screen { +/* line 192, numbered/media.scss */ +@media print { +/* line 193, numbered/media.scss */ +.invalid { +height: 15px; +} +} +} +/* line 199, numbered/media.scss */ +@media only screen { +/* line 200, numbered/media.scss */ +@media screen and (color: blue) { +/* line 201, numbered/media.scss */ +@media screen and (width: 13) { +/* line 202, numbered/media.scss */ +.only-screen { +height: 15px; +} +} +} +} \ No newline at end of file diff --git a/tests/inputs/numbered/mixins.scss b/tests/inputs/numbered/mixins.scss new file mode 100644 index 00000000..7b5bdf35 --- /dev/null +++ b/tests/inputs/numbered/mixins.scss @@ -0,0 +1,163 @@ +@mixin something { +color: red; +/* line 4, numbered/mixins.scss */ +pre { +height: 200px; +} +} +/* line 9, numbered/mixins.scss */ +div { +color: blue; +@include something; +} +@mixin something($color) { +color: $color; +/* line 17, numbered/mixins.scss */ +div { +height: 20px; +} +} +@mixin cool($a, $b, $c) { +height: $a + $b + $c; +} +/* line 26, numbered/mixins.scss */ +span { +@include something(blue); +} +/* line 30, numbered/mixins.scss */ +html { +@include cool(10px, 12px, 21px); +} +@mixin hello_world { +height: 20px; +} +/* line 39, numbered/mixins.scss */ +del { +@include hello-world; +} +// variable shadowing +$color: white; +@mixin colors($color: blue) { +color: $color; +} +/* line 52, numbered/mixins.scss */ +div { +color: $color; +@include colors(); +color: $color; +} +@mixin linear-gradient($from, $to, $pos: left top) { +background-image: linear-gradient($pos, $from, $to); +} +/* line 62, numbered/mixins.scss */ +div { +@include linear-gradient(red, green); +} +@mixin box-shadow($shadows...) { +-moz-box-shadow: $shadows; +-webkit-box-shadow: $shadows; +box-shadow: $shadows; +} +/* line 72, numbered/mixins.scss */ +div { +@include box-shadow(10px 10px 5px #888); +@include box-shadow(inset 10px 10px #888, -10px -10px #f4f4f4); +} +@mixin nested { +@include something(red); +} +/* line 81, numbered/mixins.scss */ +div { +/* line 82, numbered/mixins.scss */ +p { +/* line 83, numbered/mixins.scss */ +.class { +@include nested; +} +@include nested; +/* line 89, numbered/mixins.scss */ +.top { +top: 0; +/* line 92, numbered/mixins.scss */ +div { +color: red; +} +} +color: blue; +} +} +// mixin content (http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-content) +@mixin content-simple { +/* line 103, numbered/mixins.scss */ +div.mixin-content-simple { +@content; +} +} +@mixin content-with-arg ( $background ) { +/* line 109, numbered/mixins.scss */ +div.mixin-content-with-arg { +background: $background; +@content; +} +} +@include content-simple { +color: red; +} +@include content-with-arg($background: blue) { +color: red; +} +@include content-with-arg($background: purple) { +@include hello_world; +} +@include content-simple { +@include cool(10px, 12px, 21px); +} +@include content-simple { +@include something(orange); +} +@include content-with-arg($background: purple) { +@include cool(10px, 12px, 21px); +} +@include content-with-arg($background: purple) { +@include something(orange); +} +@mixin wallpaper($image, $top: 0, $right: 0, $bottom: 0, $left: 0) { +background: $image; +position: absolute; +top: $top; +right: $right; +bottom: $bottom; +left: $left; +} +@mixin logo($offsets...) { +@include wallpaper(url(/images/logo.png), $offsets...); +} +/* line 156, numbered/mixins.scss */ +#please-wait { +@include logo(1em, $left: 4em, $bottom: 3em); +} +@mixin prefixer($property, $value) { +/* line 161, numbered/mixins.scss */ +-webkit-#{$property}: $value; +} +@mixin transform($property: none) { +@include prefixer(transform, $property); +} +/* line 168, numbered/mixins.scss */ +div.parameter-name-scope { +@include transform(translateX(50px)); +} +@mixin keyframes( $name ) +{ +/* line 174, numbered/mixins.scss */ +@-webkit-keyframes $name { +@content; +} +} +@include keyframes( change-color ) +{ +/* line 181, numbered/mixins.scss */ +0% { color: green; } +/* line 182, numbered/mixins.scss */ +100% { color: red; } +} \ No newline at end of file diff --git a/tests/inputs/numbered/nesting.scss b/tests/inputs/numbered/nesting.scss new file mode 100644 index 00000000..05c25513 --- /dev/null +++ b/tests/inputs/numbered/nesting.scss @@ -0,0 +1,40 @@ +/* line 3, numbered/nesting.scss */ +body { +color: red; +} +/* line 8, numbered/nesting.scss */ +div { +color: red; +height: yes; +/* line 12, numbered/nesting.scss */ +pre { +color: blue; +} +} +div: blue; +/* line 21, numbered/nesting.scss */ +div { +/* line 22, numbered/nesting.scss */ +font: 10px hello world { +size: 10px; +color: blue; +} +/* line 27, numbered/nesting.scss */ +border: { +left: 1px solid blue; +right: 2px dashed green; +} +} +/* line 34, numbered/nesting.scss */ +#nested-nesting { +bar: baz; +/* line 36, numbered/nesting.scss */ +bang: { +bop: bar; +bip: 1px; +/* line 39, numbered/nesting.scss */ +blat: { +baf: bort +} +} +} \ No newline at end of file diff --git a/tests/inputs/numbered/null.scss b/tests/inputs/numbered/null.scss new file mode 100644 index 00000000..80eaa691 --- /dev/null +++ b/tests/inputs/numbered/null.scss @@ -0,0 +1,46 @@ +$list: null; +/* line 2, numbered/null.scss */ +.div { +one: null; +one: null world; +one: NULL world; +one: a null, b; +two: a $list $list, $list, b; +three: $list; +} +$value: null; +/* line 12, numbered/null.scss */ +p:before { +/* line 13, numbered/null.scss */ +content: "I ate #{$value} pies!"; +} +@mixin Rounded($radius1, $direction: null, $radius2: false) { +$corner: null; +@if $direction == TL { $corner: top-left-; } +@if $direction == TR { $corner: top-right-; } +@if $direction == BL { $corner: bottom-left-; } +@if $direction == BR { $corner: bottom-right-; } +@if $radius2 { +/* line 23, numbered/null.scss */ +-webkit-border-#{$corner}radius: $radius1 $radius2; +/* line 24, numbered/null.scss */ +border-#{$corner}radius: $radius1 $radius2; +} @else { +/* line 26, numbered/null.scss */ +-webkit-border-#{$corner}radius: $radius1; +/* line 27, numbered/null.scss */ +border-#{$corner}radius: $radius1; +} +} +/* line 31, numbered/null.scss */ +.foo { +@include Rounded(10); +} +/* line 35, numbered/null.scss */ +.fu { +@include Rounded(20, null); +} +/* line 39, numbered/null.scss */ +.bar { +@include Rounded(30, TL); +} \ No newline at end of file diff --git a/tests/inputs/numbered/operators.scss b/tests/inputs/numbered/operators.scss new file mode 100644 index 00000000..85f6e6b2 --- /dev/null +++ b/tests/inputs/numbered/operators.scss @@ -0,0 +1,167 @@ +/* line 3, numbered/operators.scss */ +body { +color: 1 + 2 + 5; +color: 1 + 2 * 5 + 5; +height: 10px/10px; +color: 10px/2 + 1; +color: (10px/2); +bottom: (4/2px); +top: 1em * (1 * 24px - 0) / 16px; +left: 1 - 2cm; +top: (2cm/12px); +} +/* line 15, numbered/operators.scss */ +div { +color: 4 == 3; +color: hello == hello; +color: 4 > 3; +color: 4 < 3; +color: what > 3; +} +/* line 25, numbered/operators.scss */ +#units { +test: 1in + 4cm; +test: 12mm + 1; +test: 1 + 3em; +test: 1mm + 1cm; +test: 1cm + 1mm; +} +/* line 33, numbered/operators.scss */ +#modulo { +test: 3 % 2; +test: 4cm % 3; +} +/* line 38, numbered/operators.scss */ +#colors { +color: red + rgb(1,2,3); +color: red - rgb(1,2,3); +color: rgba(1,2,3, 0.5) * rgba(3,4,5, 0.5); +color: rgba(10,15,20, 0.5) / rgba(2,2,2, 0.5); +color: rgba(1,2,3, 0.5) * 2; +color: rgba(1,2,3, 0.5) / 2; +color: rgba(1,2,3, 0.5) + 2; +color: rgba(1,2,3, 0.5) - 2; +color: blue + 34; +color: #fff == #000; +color: #fff == #fff; +color: #fff != #000; +color: #fff != #fff; +} +/* line 59, numbered/operators.scss */ +#preserve { +hello: what -going; +hello: what - going; +} +/* line 64, numbered/operators.scss */ +#strings { +hello: what -going; +hello: what +going; +hello: what+going; +hello: what+ going; +hello: what + going; +hello: "what" + going; +hello: going + "what"; +hello: "what" + "what"; +} +/* line 77, numbered/operators.scss */ +#negation { +$num: 100; +a: -$num + 40; +b: 10 -$num; +b: 10 - $num; +} +/* line 84, numbered/operators.scss */ +#bools-fail { +and: false and two; +and: one and two; +and: one and false; +or: false or two; +or: one or two; +or: one or false; +} +/* line 94, numbered/operators.scss */ +#bools { +and: (false and two); +and: (one and two); +and: (one and false); +or: (false or two); +or: (one or two); +or: (one or false); +} +/* line 105, numbered/operators.scss */ +#nots-fail { +not: not true + 2; +not: not false; +not: not 0; +not: not 1; +not: not ""; +not: not hello; +} +/* line 114, numbered/operators.scss */ +#nots { +not: (not true) + 2; +not: (not false); +not: (not 0); +not: (not 1); +not: (not ""); +not: (not hello); +} +/* line 123, numbered/operators.scss */ +#string-test { +str: hi == "hi"; +str: hi == "no"; +str: 'yes' == 'yes'; +$var1: "hello"; +$var2: hello; +/* line 131, numbered/operators.scss */ +str: "#{$var1}" == '#{$var2}'; +/* line 133, numbered/operators.scss */ +str: xhello#{$var1}x == "x#{$var2}hellox"; // xhellohellofalse +str: unit(10px) == px; +} +/* line 139, numbered/operators.scss */ +#special { +cancel-unit: (10px / 10px); +} +// not expecting unary +$form-spacing: 1em; +/* line 146, numbered/operators.scss */ +.row .a { margin: 0-$form-spacing / 2; } +/* line 147, numbered/operators.scss */ +.row .b { margin: 0- $form-spacing / 2; } +/* line 148, numbered/operators.scss */ +.row .c { margin: 0 - $form-spacing / 2; } +/* line 149, numbered/operators.scss */ +.row .d { margin: 0 -$form-spacing / 2; } +/* line 150, numbered/operators.scss */ +.row .e { margin: 0 (-$form-spacing / 2); } +/* line 152, numbered/operators.scss */ +.alt .a { margin: 0-1em / 2; } +/* line 153, numbered/operators.scss */ +.alt .b { margin: 0- 1em / 2; } +/* line 154, numbered/operators.scss */ +.alt .c { margin: 0 - 1em / 2; } +/* line 155, numbered/operators.scss */ +.alt .d { margin: 0 -1em / 2; } +/* line 156, numbered/operators.scss */ +.alt .e { margin: 0 (-1em / 2); } +/* line 158, numbered/operators.scss */ +.row .f { margin: 0-$form-spacing * 2; } +/* line 159, numbered/operators.scss */ +.row .g { margin: 0- $form-spacing * 2; } +/* line 160, numbered/operators.scss */ +.row .h { margin: 0 - $form-spacing * 2; } +/* line 161, numbered/operators.scss */ +.row .i { margin: 0 -$form-spacing * 2; } +/* line 162, numbered/operators.scss */ +.row .j { margin: 0 (-$form-spacing * 2); } +/* line 164, numbered/operators.scss */ +.alt .f { margin: 0-1em * 2; } +/* line 165, numbered/operators.scss */ +.alt .g { margin: 0- 1em * 2; } +/* line 166, numbered/operators.scss */ +.alt .h { margin: 0 - 1em * 2; } +/* line 167, numbered/operators.scss */ +.alt .i { margin: 0 -1em * 2; } +/* line 168, numbered/operators.scss */ +.alt .j { margin: 0 (-1em * 2); } \ No newline at end of file diff --git a/tests/inputs/numbered/parsing_comments.scss b/tests/inputs/numbered/parsing_comments.scss new file mode 100644 index 00000000..c76654dd --- /dev/null +++ b/tests/inputs/numbered/parsing_comments.scss @@ -0,0 +1,60 @@ +/* comment 1 */ +/* line 2, numbered/parsing_comments.scss */ +a { +/* comment 2 */ +color: red; /* comment 3 */ +/* comment 4 */ +} +/* comment 5 */ +/*! comment 1 */ +/* line 10, numbered/parsing_comments.scss */ +b { +/*! comment 2 */ +color: red; /*! comment 3 */ +/*! comment 4 */ +} +/*! comment 5 */ +/* +* multi-line comment 1 +*/ +/* line 20, numbered/parsing_comments.scss */ +c { +/* +* multi-line comment 2 +*/ +color: red; /* +* multi-line comment 3 +*/ +/* +* multi-line comment 4 +*/ +} +/* +* multi-line comment 5 +*/ +/*! +* multi-line comment 1 +*/ +/* line 38, numbered/parsing_comments.scss */ +d { +/*! +* multi-line comment 2 +*/ +color: red; /*! +* multi-line comment 3 +*/ +/*! +* multi-line comment 4 +*/ +} +/*! +* multi-line comment 5 +*/ +// comment 1 +/* line 54, numbered/parsing_comments.scss */ +e { +// comment 2 +color: red; // comment 3 +// comment 4 +} +// comment 5 \ No newline at end of file diff --git a/tests/inputs/numbered/placeholder_selector.scss b/tests/inputs/numbered/placeholder_selector.scss new file mode 100644 index 00000000..eb7e86f6 --- /dev/null +++ b/tests/inputs/numbered/placeholder_selector.scss @@ -0,0 +1,19 @@ +/* line 1, numbered/placeholder_selector.scss */ +#context a%extreme span { +color: blue; +font-weight: bold; +font-size: 2em; +} +/* line 7, numbered/placeholder_selector.scss */ +.notice, .error { @extend %extreme; } +/* line 9, numbered/placeholder_selector.scss */ +.hidden %placeholder { +margin: 0; +} +/* line 13, numbered/placeholder_selector.scss */ +p { +@extend #context; +padding: 2em; +} +/* line 18, numbered/placeholder_selector.scss */ +div { @extend .hidden; } \ No newline at end of file diff --git a/tests/inputs/numbered/scss_css.scss b/tests/inputs/numbered/scss_css.scss new file mode 100644 index 00000000..660fe237 --- /dev/null +++ b/tests/inputs/numbered/scss_css.scss @@ -0,0 +1,765 @@ +/* line 1, numbered/scss_css.scss */ +[foo~=bar] { +a: b; } +/* line 5, numbered/scss_css.scss */ +[foo^=bar] { +a: b; } +/* line 9, numbered/scss_css.scss */ +[foo$=bar] { +a: b; } +/* line 13, numbered/scss_css.scss */ +[foo*=bar] { +a: b; } +/* line 17, numbered/scss_css.scss */ +[foo|=en] { +a: b; } +/* line 21, numbered/scss_css.scss */ +foo { +a: 2; +b: 2.3em; +c: 50%; +d: "fraz bran"; +e: flanny-blanny-blan; +f: url(http://sass-lang.com); +// g: U+ffa?; +h: #aabbcc; } +/* line 32, numbered/scss_css.scss */ +selector { +property: value; +property2: value; } +/* line 37, numbered/scss_css.scss */ +sel{p:v} +/* line 39, numbered/scss_css.scss */ +.foo { +/* Foo +Bar +Baz */ +a: b; } +/* line 46, numbered/scss_css.scss */ +.foo { +/* Foo +Bar +Baz */ +a: b; } +.foo {/* Foo +Bar */ +a: b; } +.foo {/* Foo +Bar +Baz */ +a: b; } +/* line 64, numbered/scss_css.scss */ +@foo { +/* line 65, numbered/scss_css.scss */ +rule { +a: b; } +a: b; } +/* line 71, numbered/scss_css.scss */ +@foo {a:b}; +/* line 72, numbered/scss_css.scss */ +@bar {a:b}; +@foo "bar" +/* line 77, numbered/scss_css.scss */ +foo { +a: 12px calc(100%/3 - 2*1em - 2*1px); +b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); +b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); +b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } +/* line 84, numbered/scss_css.scss */ +foo {bar: baz} + +baz {bar: baz} +/* +* foo +*/ +/* line 94, numbered/scss_css.scss */ +bar {baz: bang} +/* line 97, numbered/scss_css.scss */ +E, F { +a: b; } +/* line 101, numbered/scss_css.scss */ +E F, G H { +a: b; } +/* line 105, numbered/scss_css.scss */ +E > F, G > H { +a: b; } +/* This is a CSS comment. */ +.one {color: green;} /* Another comment */ +/* The following should not be used: +.two {color: red;} */ +.three {color: green; /* color: red; */} +/** +.four {color: red;} */ +/* line 116, numbered/scss_css.scss */ +.five {color: green;} +/**/ +/* line 118, numbered/scss_css.scss */ +.six {color: green;} +/*********/ +/* line 120, numbered/scss_css.scss */ +.seven {color: green;} +/* a comment **/ +/* line 122, numbered/scss_css.scss */ +.eight {color: green;} +/* line 125, numbered/scss_css.scss */ +foo { +a: \foo bar; +b: foo\ bar; +c: \2022 \0020; +d: foo\\bar; +e: foo\"\'bar; } +/* line 133, numbered/scss_css.scss */ +foo { +a: "\foo bar"; +b: "foo\ bar"; +c: "\2022 \0020"; +d: "foo\\bar"; +e: "foo\"'bar"; } +/* line 141, numbered/scss_css.scss */ +foo { +_name: val; +*name: val; +:name: val; +.name: val; +#name: val; +name/**/: val; +name/*\**/: val; +name: val; } +@foo "bar" ; +/* line 154, numbered/scss_css.scss */ +foo { +a: -moz-element(#foo); +b: -webkit-element(#foo); +b: -foobar-element(#foo); } +/* line 160, numbered/scss_css.scss */ +@foo {} +/* line 162, numbered/scss_css.scss */ +@foo { +} +@foo; +/* line 168, numbered/scss_css.scss */ +foo {;;;; +bar: baz;;;; +;;} +/* line 173, numbered/scss_css.scss */ +#foo .bar {} +/* line 175, numbered/scss_css.scss */ +#foo .bar { +} +/* line 179, numbered/scss_css.scss */ +0% { +a: b; } +/* line 183, numbered/scss_css.scss */ +60% { +a: b; } +/* line 187, numbered/scss_css.scss */ +100% { +a: b; } +/* line 191, numbered/scss_css.scss */ +12px { +a: b; } +/* line 195, numbered/scss_css.scss */ +"foo" { +a: b; } +/* line 199, numbered/scss_css.scss */ +foo { +/* line 200, numbered/scss_css.scss */ +a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } +/* line 203, numbered/scss_css.scss */ +:foo("bar") { +a: b; } +/* line 207, numbered/scss_css.scss */ +:foo(bar) { +a: b; } +/* line 211, numbered/scss_css.scss */ +:foo(12px) { +a: b; } +/* line 215, numbered/scss_css.scss */ +:foo(+) { +a: b; } +/* line 219, numbered/scss_css.scss */ +:foo(-) { +a: b; } +/* line 223, numbered/scss_css.scss */ +:foo(+"bar") { +a: b; } +/* line 227, numbered/scss_css.scss */ +:foo(-++--baz-"bar"12px) { +a: b; } +/* line 231, numbered/scss_css.scss */ +foo { +a: foo-bar(12); +b: -foo-bar-baz(13, 14 15); } +@import "foo.css"; +@import 'foo.css'; +@import url("foo.css"); +@import url('foo.css'); +@import url(foo.css); +@import "foo.css" screen; +@import "foo.css" screen, print; +@import "foo.css" screen, print and (foo: 0); +@import "foo.css" screen, only print, screen and (foo: 0); +/* line 254, numbered/scss_css.scss */ +foo { +a: foo !important; +b: foo bar !important; +b: foo, bar !important; } +/* line 260, numbered/scss_css.scss */ +foo { +a: -moz-bar-baz; +b: foo -o-bar-baz; } +foo {a: /* b; c: */ d} +foo {a /*: b; c */: d} +/* Foo +* Bar */ +/* line 275, numbered/scss_css.scss */ +.foo { +/* Foo +* Bar */ } +/* line 280, numbered/scss_css.scss */ +[foo] { +a: b; } +/* line 284, numbered/scss_css.scss */ +[foo="bar"] { +a: b; } +/* line 288, numbered/scss_css.scss */ +[foo~="bar"] { +a: b; } +/* line 292, numbered/scss_css.scss */ +[foo^="bar"] { +a: b; } +/* line 296, numbered/scss_css.scss */ +[foo$="bar"] { +a: b; } +/* line 300, numbered/scss_css.scss */ +[foo*="bar"] { +a: b; } +/* line 304, numbered/scss_css.scss */ +[foo|="en"] { +a: b; } +/* line 308, numbered/scss_css.scss */ +:root { +a: b; } +/* line 312, numbered/scss_css.scss */ +:nth-child(n) { +a: b; } +/* line 316, numbered/scss_css.scss */ +:nth-last-child(n) { +a: b; } +/* line 320, numbered/scss_css.scss */ +:nth-of-type(n) { +a: b; } +/* line 324, numbered/scss_css.scss */ +:nth-last-of-type(n) { +a: b; } +/* line 328, numbered/scss_css.scss */ +:first-child { +a: b; } +/* line 332, numbered/scss_css.scss */ +:last-child { +a: b; } +/* line 336, numbered/scss_css.scss */ +:first-of-type { +a: b; } +/* line 340, numbered/scss_css.scss */ +:last-of-type { +a: b; } +/* line 344, numbered/scss_css.scss */ +:only-child { +a: b; } +/* line 348, numbered/scss_css.scss */ +:only-of-type { +a: b; } +/* line 352, numbered/scss_css.scss */ +:empty { +a: b; } +/* line 356, numbered/scss_css.scss */ +:link { +a: b; } +/* line 360, numbered/scss_css.scss */ +:visited { +a: b; } +/* line 364, numbered/scss_css.scss */ +:active { +a: b; } +/* line 368, numbered/scss_css.scss */ +:hover { +a: b; } +/* line 372, numbered/scss_css.scss */ +:focus { +a: b; } +/* line 376, numbered/scss_css.scss */ +:target { +a: b; } +/* line 380, numbered/scss_css.scss */ +:lang(fr) { +a: b; } +/* line 384, numbered/scss_css.scss */ +:enabled { +a: b; } +/* line 388, numbered/scss_css.scss */ +:disabled { +a: b; } +/* line 392, numbered/scss_css.scss */ +:checked { +a: b; } +/* line 396, numbered/scss_css.scss */ +::first-line { +a: b; } +/* line 400, numbered/scss_css.scss */ +::first-letter { +a: b; } +/* line 404, numbered/scss_css.scss */ +::before { +a: b; } +/* line 408, numbered/scss_css.scss */ +::after { +a: b; } +/* line 412, numbered/scss_css.scss */ +.warning { +a: b; } +/* line 416, numbered/scss_css.scss */ +#myid { +a: b; } +/* line 420, numbered/scss_css.scss */ +:not(s) { +a: b; } +/* line 424, numbered/scss_css.scss */ +@media all { +/* line 425, numbered/scss_css.scss */ +rule1 { +prop: val; } +/* line 428, numbered/scss_css.scss */ +rule2 { +prop: val; } } +/* line 432, numbered/scss_css.scss */ +@media screen, print { +/* line 433, numbered/scss_css.scss */ +rule1 { +prop: val; } +/* line 436, numbered/scss_css.scss */ +rule2 { +prop: val; } } +/* line 440, numbered/scss_css.scss */ +@media screen and (-webkit-min-device-pixel-ratio:0) { +a: b; } +/* line 444, numbered/scss_css.scss */ +@media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { +a: b; } +/* line 448, numbered/scss_css.scss */ +:-moz-any(h1, h2, h3) { +a: b; } +/* line 452, numbered/scss_css.scss */ +:-moz-any(.foo) { +a: b; } +/* line 456, numbered/scss_css.scss */ +:-moz-any(foo bar, .baz > .bang) { +a: b; } +@-moz-document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 463, numbered/scss_css.scss */ +regexp("^https:.*") { +/* line 464, numbered/scss_css.scss */ +.foo {a: b} +} +/* line 468, numbered/scss_css.scss */ +foo { +filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); +filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } +/* line 473, numbered/scss_css.scss */ +foo { +filter: alpha(opacity=20); +filter: alpha(opacity=20, enabled=true); +filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } +/* line 479, numbered/scss_css.scss */ +@foo bar { +a: b; } +/* line 482, numbered/scss_css.scss */ +@bar baz { +c: d; } +@foo bar; +@bar baz; +/* Foo +* Bar */ +/* Baz +* Bang */ +/* line 496, numbered/scss_css.scss */ +.foo { +/* Foo +* Bar */ +/* Baz +* Bang */ } +/* line 503, numbered/scss_css.scss */ +.foo { +/* Foo Bar *//* Baz Bang */ } +@namespace "http://www.w3.org/Profiles/xhtml1-strict"; +@namespace url(http://www.w3.org/Profiles/xhtml1-strict); +@namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); +/* line 513, numbered/scss_css.scss */ +[foo|bar=baz] { +a: b; } +/* line 517, numbered/scss_css.scss */ +[*|bar=baz] { +a: b; } +/* line 521, numbered/scss_css.scss */ +[foo|bar|=baz] { +a: b; } +/* line 525, numbered/scss_css.scss */ +foo|E { +a: b; } +/* line 529, numbered/scss_css.scss */ +*|E { +a: b; } +/* line 533, numbered/scss_css.scss */ +foo|* { +a: b; } +/* line 537, numbered/scss_css.scss */ +*|* { +a: b; } +/* line 541, numbered/scss_css.scss */ +:not(foo|bar) { +a: b; } +/* line 545, numbered/scss_css.scss */ +:not(*|bar) { +a: b; } +/* line 549, numbered/scss_css.scss */ +:not(foo|*) { +a: b; } +/* line 553, numbered/scss_css.scss */ +:not(*|*) { +a: b; } +/* line 557, numbered/scss_css.scss */ +:not(#blah) { +a: b; } +/* line 561, numbered/scss_css.scss */ +:not(.blah) { +a: b; } +/* line 565, numbered/scss_css.scss */ +:not([foo]) { +a: b; } +/* line 569, numbered/scss_css.scss */ +:not([foo^="bar"]) { +a: b; } +/* line 573, numbered/scss_css.scss */ +:not([baz|foo~="bar"]) { +a: b; } +/* line 577, numbered/scss_css.scss */ +:not(:hover) { +a: b; } +/* line 581, numbered/scss_css.scss */ +:not(:nth-child(2n + 3)) { +a: b; } +/* line 585, numbered/scss_css.scss */ +:not(:not(#foo)) { +a: b; } +/* line 589, numbered/scss_css.scss */ +:not(a#foo.bar) { +a: b; } +/* line 593, numbered/scss_css.scss */ +:not(#foo .bar > baz) { +a: b; } +/* line 597, numbered/scss_css.scss */ +:not(h1, h2, h3) { +a: b; } +@mixin foo { +a: b; } +/* line 605, numbered/scss_css.scss */ +foo { +/* line 606, numbered/scss_css.scss */ +a: "bang #{1 + " bar "} bip"; } +/* line 609, numbered/scss_css.scss */ +:nth-child(-n) { +a: b; } +/* line 613, numbered/scss_css.scss */ +:nth-child(+n) { +a: b; } +/* line 617, numbered/scss_css.scss */ +:nth-child(even) { +a: b; } +/* line 621, numbered/scss_css.scss */ +:nth-child(odd) { +a: b; } +/* line 625, numbered/scss_css.scss */ +:nth-child(50) { +a: b; } +/* line 629, numbered/scss_css.scss */ +:nth-child(-50) { +a: b; } +/* line 633, numbered/scss_css.scss */ +:nth-child(+50) { +a: b; } +/* line 637, numbered/scss_css.scss */ +:nth-child(2n+3) { +a: b; } +/* line 641, numbered/scss_css.scss */ +:nth-child(2n-3) { +a: b; } +/* line 645, numbered/scss_css.scss */ +:nth-child(+2n-3) { +a: b; } +/* line 649, numbered/scss_css.scss */ +:nth-child(-2n+3) { +a: b; } +/* line 653, numbered/scss_css.scss */ +:nth-child(-2n+ 3) { +a: b; } +/* line 657, numbered/scss_css.scss */ +:nth-child( 2n + 3 ) { +a: b; } +/* line 661, numbered/scss_css.scss */ +foo { +a: foo bar baz; +b: foo, #aabbcc, -12; +c: 1px/2px/-3px; +d: foo bar, baz/bang; } +/* line 668, numbered/scss_css.scss */ +@page { +prop1: val; +prop2: val; } +/* line 673, numbered/scss_css.scss */ +@page flap { +prop1: val; +prop2: val; } +/* line 678, numbered/scss_css.scss */ +@page :first { +prop1: val; +prop2: val; } +/* line 683, numbered/scss_css.scss */ +@page flap:first { +prop1: val; +prop2: val; } +/* line 688, numbered/scss_css.scss */ +.foo { +/* Foo */ +a: b; } +/* line 693, numbered/scss_css.scss */ +.foo { +/* Foo +* Bar */a: b; } +/* Foo */ +/* line 699, numbered/scss_css.scss */ +.foo { +a: b; } +/* Foo +* Bar */.foo { +a: b; } +.foo /* .a #foo */ #bar:baz(/* bang )*/ bip) { +a: b; } +/* line 712, numbered/scss_css.scss */ +> E { +a: b; } +/* line 716, numbered/scss_css.scss */ ++ E { +a: b; } +/* line 720, numbered/scss_css.scss */ +~ E { +a: b; } +/* line 724, numbered/scss_css.scss */ +> > E { +a: b; } +/* line 728, numbered/scss_css.scss */ +>> E { +a: b; } +/* line 732, numbered/scss_css.scss */ +E* { +a: b; } +/* line 736, numbered/scss_css.scss */ +E*.foo { +a: b; } +/* line 740, numbered/scss_css.scss */ +E*:hover { +a: b; } +E, +/* line 745, numbered/scss_css.scss */ +F { +a: b; } +E +/* line 750, numbered/scss_css.scss */ +F { +a: b; } +E, F +/* line 755, numbered/scss_css.scss */ +G, H { +a: b; } +/* line 759, numbered/scss_css.scss */ +body { +/* +//comment here +*/ +} +/* line 766, numbered/scss_css.scss */ +E>F { a: b;} +/* line 768, numbered/scss_css.scss */ +E~F { a: b;} +/* line 770, numbered/scss_css.scss */ +E+F { a: b;} +/* line 772, numbered/scss_css.scss */ +* { +a: b; } +/* line 776, numbered/scss_css.scss */ +E { +a: b; } +/* line 780, numbered/scss_css.scss */ +E[foo] { +a: b; } +/* line 784, numbered/scss_css.scss */ +E[foo="bar"] { +a: b; } +/* line 788, numbered/scss_css.scss */ +E[foo~="bar"] { +a: b; } +/* line 792, numbered/scss_css.scss */ +E[foo^="bar"] { +a: b; } +/* line 796, numbered/scss_css.scss */ +E[foo$="bar"] { +a: b; } +/* line 800, numbered/scss_css.scss */ +E[foo*="bar"] { +a: b; } +/* line 804, numbered/scss_css.scss */ +E[foo|="en"] { +a: b; } +/* line 808, numbered/scss_css.scss */ +E:root { +a: b; } +/* line 812, numbered/scss_css.scss */ +E:nth-child(n) { +a: b; } +/* line 816, numbered/scss_css.scss */ +E:nth-last-child(n) { +a: b; } +/* line 820, numbered/scss_css.scss */ +E:nth-of-type(n) { +a: b; } +/* line 824, numbered/scss_css.scss */ +E:nth-last-of-type(n) { +a: b; } +/* line 828, numbered/scss_css.scss */ +E:first-child { +a: b; } +/* line 832, numbered/scss_css.scss */ +E:last-child { +a: b; } +/* line 836, numbered/scss_css.scss */ +E:first-of-type { +a: b; } +/* line 840, numbered/scss_css.scss */ +E:last-of-type { +a: b; } +/* line 844, numbered/scss_css.scss */ +E:only-child { +a: b; } +/* line 848, numbered/scss_css.scss */ +E:only-of-type { +a: b; } +/* line 852, numbered/scss_css.scss */ +E:empty { +a: b; } +/* line 856, numbered/scss_css.scss */ +E:link { +a: b; } +/* line 860, numbered/scss_css.scss */ +E:visited { +a: b; } +/* line 864, numbered/scss_css.scss */ +E:active { +a: b; } +/* line 868, numbered/scss_css.scss */ +E:hover { +a: b; } +/* line 872, numbered/scss_css.scss */ +E:focus { +a: b; } +/* line 876, numbered/scss_css.scss */ +E:target { +a: b; } +/* line 880, numbered/scss_css.scss */ +E:lang(fr) { +a: b; } +/* line 884, numbered/scss_css.scss */ +E:enabled { +a: b; } +/* line 888, numbered/scss_css.scss */ +E:disabled { +a: b; } +/* line 892, numbered/scss_css.scss */ +E:checked { +a: b; } +/* line 896, numbered/scss_css.scss */ +E::first-line { +a: b; } +/* line 900, numbered/scss_css.scss */ +E::first-letter { +a: b; } +/* line 904, numbered/scss_css.scss */ +E::before { +a: b; } +/* line 908, numbered/scss_css.scss */ +E::after { +a: b; } +/* line 912, numbered/scss_css.scss */ +E.warning { +a: b; } +/* line 916, numbered/scss_css.scss */ +E#myid { +a: b; } +/* line 920, numbered/scss_css.scss */ +E:not(s) { +a: b; } +/* line 924, numbered/scss_css.scss */ +E F { +a: b; } +/* line 928, numbered/scss_css.scss */ +E > F { +a: b; } +/* line 932, numbered/scss_css.scss */ +E + F { +a: b; } +/* line 936, numbered/scss_css.scss */ +E ~ F { +a: b; } +/* line 940, numbered/scss_css.scss */ +@supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { +/* line 941, numbered/scss_css.scss */ +.foo { +a: b; +} +} +/* line 947, numbered/scss_css.scss */ +@-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { +/* line 948, numbered/scss_css.scss */ +.foo { +a: b; +} +} +/* line 954, numbered/scss_css.scss */ +foo { +foo: bar; +#baz: bang; +#bip: bop; } +/* line 960, numbered/scss_css.scss */ +foo { +a: -2; +b: -2.3em; +c: -50%; +d: -foo(bar baz); } +/* line 967, numbered/scss_css.scss */ +foo { +a: -0.5em; +b: +0.5em; +c: -foo(12px); +d: +foo(12px); +} +@charset "UTF-8"; +/* line 977, numbered/scss_css.scss */ +foo { +-moz-foo-bar: blat; +-o-flat-blang: wibble; } +/* line 982, numbered/scss_css.scss */ +foo { +a: foo(); +b: bar baz-bang() bip; } \ No newline at end of file diff --git a/tests/inputs/numbered/selectors.scss b/tests/inputs/numbered/selectors.scss new file mode 100644 index 00000000..1477ea81 --- /dev/null +++ b/tests/inputs/numbered/selectors.scss @@ -0,0 +1,289 @@ +/* line 1, numbered/selectors.scss */ +* { color: blue; } +/* line 2, numbered/selectors.scss */ +E { color: blue; } +/* line 4, numbered/selectors.scss */ +E:not(:link) { color: blue; } +/* line 5, numbered/selectors.scss */ +E:not(:link):not(:visited) { color: blue; } +/* line 6, numbered/selectors.scss */ +E:not(:link, :visited) { color: blue; } +/* line 7, numbered/selectors.scss */ +E:matches(:hover, :focus) { color: blue; } +/* line 9, numbered/selectors.scss */ +E.warning { color: blue; } +/* line 10, numbered/selectors.scss */ +E#id { color: blue; } +/* line 11, numbered/selectors.scss */ +E[foo] { color: blue; } +/* line 12, numbered/selectors.scss */ +E[foo="barbar"] { color: blue; } +/* line 13, numbered/selectors.scss */ +E[foo="barbar" i] { color: blue; } +/* line 14, numbered/selectors.scss */ +E[foo~="hello#$@%@$#^"] { color: blue; } +/* line 15, numbered/selectors.scss */ +E[foo^="color: green;"] { color: blue; } +/* line 16, numbered/selectors.scss */ +E[foo$="239023"] { color: blue; } +/* line 17, numbered/selectors.scss */ +E[foo*="29302"] { color: blue; } +/* line 18, numbered/selectors.scss */ +E[foo|="239032"] { color: blue; } +/* line 20, numbered/selectors.scss */ +[foo] { color: blue; } +/* line 21, numbered/selectors.scss */ +[foo] .helloWorld { color: blue; } +/* line 22, numbered/selectors.scss */ +[foo].helloWorld { color: blue; } +/* line 23, numbered/selectors.scss */ +[foo="barbar"] { color: blue; } +/* line 24, numbered/selectors.scss */ +[foo~="hello#$@%@$#^"] { color: blue; } +/* line 25, numbered/selectors.scss */ +[foo^="color: green;"] { color: blue; } +/* line 26, numbered/selectors.scss */ +[foo$="239023"] { color: blue; } +/* line 27, numbered/selectors.scss */ +[foo*="29302"] { color: blue; } +/* line 28, numbered/selectors.scss */ +[foo|="239032"] { color: blue; } +/* line 30, numbered/selectors.scss */ +E:dir(ltr) { color: blue; } +/* line 31, numbered/selectors.scss */ +E:lang(en) { color: blue; } +/* line 32, numbered/selectors.scss */ +E:lang(en, fr) { color: blue; } +/* line 34, numbered/selectors.scss */ +E:any-link { color: blue; } +/* line 35, numbered/selectors.scss */ +E:link { color: blue; } +/* line 36, numbered/selectors.scss */ +E:visited { color: blue; } +/* line 37, numbered/selectors.scss */ +E:local-link { color: blue; } +/* line 38, numbered/selectors.scss */ +E:local-link(0) { color: red; } +/* line 39, numbered/selectors.scss */ +E:local-link(1) { color: white; } +/* line 40, numbered/selectors.scss */ +E:local-link(2) { color: red; } +/* line 41, numbered/selectors.scss */ +E:target { color: blue; } +/* line 42, numbered/selectors.scss */ +E:scope { color: blue; } +/* line 44, numbered/selectors.scss */ +E:current { color: blue; } +/* line 45, numbered/selectors.scss */ +E:current(:link) { color: blue; } +/* line 46, numbered/selectors.scss */ +E:past { color: blue; } +/* line 47, numbered/selectors.scss */ +E:future { color: blue; } +/* line 49, numbered/selectors.scss */ +E:active { color: blue; } +/* line 50, numbered/selectors.scss */ +E:hover { color: blue; } +/* line 51, numbered/selectors.scss */ +E:focus { color: blue; } +/* line 52, numbered/selectors.scss */ +E:enabled { color: blue; } +/* line 53, numbered/selectors.scss */ +E:disabled { color: blue; } +/* line 54, numbered/selectors.scss */ +E:indeterminate { color: blue; } +/* line 55, numbered/selectors.scss */ +E:default { color: blue; } +/* line 56, numbered/selectors.scss */ +E:in-range { color: blue; } +/* line 57, numbered/selectors.scss */ +E:out-of-range { color: blue; } +/* line 58, numbered/selectors.scss */ +E:required { color: blue; } +/* line 59, numbered/selectors.scss */ +E:optional { color: blue; } +/* line 60, numbered/selectors.scss */ +E:read-only { color: blue; } +/* line 61, numbered/selectors.scss */ +E:read-write { color: blue; } +/* line 63, numbered/selectors.scss */ +E:root { color: blue; } +/* line 64, numbered/selectors.scss */ +E:empty { color: blue; } +/* line 65, numbered/selectors.scss */ +E:first-child { color: blue; } +/* line 66, numbered/selectors.scss */ +E:nth-child(odd) { color: blue; } +/* line 67, numbered/selectors.scss */ +E:nth-child(2n+1) { color: blue; } +/* line 68, numbered/selectors.scss */ +E:nth-child(5) { color: blue; } +/* line 69, numbered/selectors.scss */ +E:last-child { color: blue; } +/* line 70, numbered/selectors.scss */ +E:nth-last-child(-n+2) { color: blue; } +/* line 71, numbered/selectors.scss */ +E:only-child { color: blue; } +/* line 72, numbered/selectors.scss */ +E:first-of-type { color: blue; } +/* line 73, numbered/selectors.scss */ +E:nth-of-type(2n) { color: blue; } +/* line 74, numbered/selectors.scss */ +E:last-of-type { color: blue; } +/* line 75, numbered/selectors.scss */ +E:nth-last-of-type(n) { color: blue; } +/* line 76, numbered/selectors.scss */ +E:only-of-type { color: blue; } +/* line 77, numbered/selectors.scss */ +E:nth-match(odd) { color: blue; } +/* line 78, numbered/selectors.scss */ +E:nth-last-match(odd) { color: blue; } +/* line 80, numbered/selectors.scss */ +E:column(n) { color: blue; } +/* line 81, numbered/selectors.scss */ +E:nth-column(n) { color: blue; } +/* line 82, numbered/selectors.scss */ +E:nth-last-column(n) { color: blue; } +/* line 84, numbered/selectors.scss */ +E F { color: blue; } +/* line 85, numbered/selectors.scss */ +E > F { color: blue; } +/* line 86, numbered/selectors.scss */ +E + F { color: blue; } +/* line 87, numbered/selectors.scss */ +E ~ F { color: blue; } +/* line 88, numbered/selectors.scss */ +E /foo/ F { color: blue; } +/* line 89, numbered/selectors.scss */ +E! > F { color: blue; } +// namespaces +/* line 92, numbered/selectors.scss */ +[foo|att=val] { color: blue } +/* line 93, numbered/selectors.scss */ +[*|att] { color: yellow } +/* line 94, numbered/selectors.scss */ +[|att] { color: green } +/* line 95, numbered/selectors.scss */ +[att] { color: green } +// CSS2.1 +/* line 98, numbered/selectors.scss */ +E::first-line { color: blue; } +/* line 99, numbered/selectors.scss */ +E::first-letter { color: blue; } +/* line 100, numbered/selectors.scss */ +E::before { color: blue; } +/* line 101, numbered/selectors.scss */ +E::after { color: blue; } +// CSS3 UI (at risk) +/* line 104, numbered/selectors.scss */ +E::choices { color: blue; } +/* line 105, numbered/selectors.scss */ +E::value { color: blue; } +/* line 106, numbered/selectors.scss */ +E::repeat-index { color: blue; } +/* line 107, numbered/selectors.scss */ +E::repeat-item { color: blue; } +/* line 109, numbered/selectors.scss */ +E:first { color: blue; } +/* line 110, numbered/selectors.scss */ +E:first-line { color: blue; } +/* line 111, numbered/selectors.scss */ +E:first-letter { color: blue; } +/* line 112, numbered/selectors.scss */ +E:before{ color: blue; } +/* line 113, numbered/selectors.scss */ +E:after { color: blue; } +/* line 114, numbered/selectors.scss */ +E:checked { color: blue; } +/* line 115, numbered/selectors.scss */ +E:invalid { color: blue; } +/* line 116, numbered/selectors.scss */ +E:valid { color: blue; } +/* line 117, numbered/selectors.scss */ +E:left { color: blue; } +/* line 118, numbered/selectors.scss */ +E:right { color: blue; } +// -moz experimental +/* line 121, numbered/selectors.scss */ +E:any(ol) { color: blue; } +/* line 122, numbered/selectors.scss */ +E::selection { color: blue; } +// one of these is nested property, +// the other is a css block. +/* line 126, numbered/selectors.scss */ +div { +/* line 127, numbered/selectors.scss */ +font:something { +size: 30em; +} +/* line 131, numbered/selectors.scss */ +font: something { +size: 30em; +} +} +// self selector +/* line 139, numbered/selectors.scss */ +.something { +/* line 140, numbered/selectors.scss */ +&.world { +color: blue; +} +/* line 144, numbered/selectors.scss */ +& .mold { +height: 200px; +} +/* line 148, numbered/selectors.scss */ +.dog & { +color: blue; +} +} +/* line 153, numbered/selectors.scss */ +.simple { +/* line 154, numbered/selectors.scss */ +.dad & .wolf { +color: blue; +} +/* line 158, numbered/selectors.scss */ +.rad&.bad { +color: blue; +} +} +/* line 164, numbered/selectors.scss */ +div { +/* line 165, numbered/selectors.scss */ +.something & .what { +/* line 166, numbered/selectors.scss */ +&.world { +color: blue; +} +} +} +/* line 172, numbered/selectors.scss */ +div { +/* line 173, numbered/selectors.scss */ +&.foo & { +color: blue; +} +} +/* line 178, numbered/selectors.scss */ +.main, div { +/* line 179, numbered/selectors.scss */ +.message div { +/* line 180, numbered/selectors.scss */ +.title { +/* line 181, numbered/selectors.scss */ +.nice-fonts & { +font-size: 24px; +} +} +} +} +$name: escape; +/* line 189, numbered/selectors.scss */ +.#{$name}\% { +color: red; +} +/* line 193, numbered/selectors.scss */ +.escape-plan\% { +color: green; +} \ No newline at end of file diff --git a/tests/inputs/numbered/values.scss b/tests/inputs/numbered/values.scss new file mode 100644 index 00000000..891f9102 --- /dev/null +++ b/tests/inputs/numbered/values.scss @@ -0,0 +1,42 @@ +/* line 2, numbered/values.scss */ +#values { +color: #eee; +color: #eeeeee; +height: 20px; +width: 80%; +color: "hello world"; +height: url("http://google.com"); +dads: url(http://leafo.net); +padding: 10px 10px 10px 10px, 3px 3px 3px; +textblock: "This is a \ +multiline block \ +/* line 13, numbered/values.scss */ +#not { color: #eee;}"; +margin: 4,3,1; +content: "This is a \ +multiline string."; +border-radius: -1px -1px -1px black; +} +/* line 20, numbered/values.scss */ +#subtraction { +lit: 10 -11; +lit: 10 - 11; +lit: 10- 11; +lit: 10-11; +$num: 100; +var: 10 -$num; +var: 10 - $num; +var: 10- $num; +var: 10-$num; +} +/* line 34, numbered/values.scss */ +#special { +/* line 35, numbered/values.scss */ +a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); +} +/* line 38, numbered/values.scss */ +#unary { +b: +0.5em; +c: -foo(12px); +d: +foo(12px); +} \ No newline at end of file diff --git a/tests/inputs/temp/tempfile.scss b/tests/inputs/numbered/variables.scss similarity index 71% rename from tests/inputs/temp/tempfile.scss rename to tests/inputs/numbered/variables.scss index 72c06c0e..3f7e3f8d 100644 --- a/tests/inputs/temp/tempfile.scss +++ b/tests/inputs/numbered/variables.scss @@ -1,34 +1,34 @@ $color: red, two, three; -/* line 4, variables.scss */ +/* line 4, numbered/variables.scss */ div { height: $color; } $a: 1000; -/* line 10, variables.scss */ +/* line 10, numbered/variables.scss */ div { $a: 2000 !default; num: $a; } -/* line 15, variables.scss */ +/* line 15, numbered/variables.scss */ div { $b: 2000 !default; num: $b; } $cool_color: null; $cool_color: blue !default; -/* line 23, variables.scss */ +/* line 23, numbered/variables.scss */ pre { color: $cool_color; } $something_man: 100px; cool: $something_man; -/* line 31, variables.scss */ +/* line 31, numbered/variables.scss */ del { $something: blue; -/* line 34, variables.scss */ +/* line 34, numbered/variables.scss */ div { $something: red; -/* line 36, variables.scss */ +/* line 36, numbered/variables.scss */ pre { color: $something; } @@ -40,7 +40,7 @@ $font-family-spaces: Helvetica Neue !default; $font-family-quotes: "Helvetica Neue" !default; $font-family-commas: Helvetica, Arial, sans-serif !default; $font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif !default; -/* line 50, variables.scss */ +/* line 50, numbered/variables.scss */ body { font-family: $font-family-simple; font-family: $font-family-spaces; diff --git a/tests/outputs/builtins_numbered.css b/tests/outputs/builtins_numbered.css index 7e26341c..2c50531f 100644 --- a/tests/outputs/builtins_numbered.css +++ b/tests/outputs/builtins_numbered.css @@ -1,4 +1,4 @@ -/* line 2, builtins.scss */ +/* line 2, numbered/builtins.scss */ #color { color: #22ea18; red: 34; @@ -11,14 +11,14 @@ rgba: rgba(170, 119, 204, 0.4); rgba: rgba(170, 119, 204, 0.4); green: 139; } -/* line 21, builtins.scss */ +/* line 21, numbered/builtins.scss */ #hsl { color: #79c653; color: rgba(121, 198, 83, 0.5); hue: 100deg; sat: 50%; lig: 55%; } -/* line 30, builtins.scss */ +/* line 30, numbered/builtins.scss */ #more-color { light: #7e3d9e; dark: #432154; @@ -27,7 +27,7 @@ gray: #545454; comp: #48792f; inv: #9fd086; } -/* line 44, builtins.scss */ +/* line 44, numbered/builtins.scss */ #more-more-color { op: 0.5; opacify: rgba(1, 2, 3, 0.6); @@ -35,7 +35,7 @@ transparentize: rgba(1, 2, 3, 0.4); transparentize: rgba(1, 2, 3, 0.4); transparentize: rgba(52, 130, 3, 0.9); } -/* line 56, builtins.scss */ +/* line 56, numbered/builtins.scss */ #more-more-more-color { color: rgba(65, 110, 79, 0.4); color: rgba(20, 255, 216, 0); @@ -47,12 +47,12 @@ color: rgba(5, 5, 5, 0); color: #000A0A0A; color: #FFAABBCC; } -/* line 74, builtins.scss */ +/* line 74, numbered/builtins.scss */ #string { color: hello what is going on; color: "yeah"; color: "I do?"; } -/* line 81, builtins.scss */ +/* line 81, numbered/builtins.scss */ #number { color: 250%; color: 3; @@ -63,7 +63,7 @@ width: 200%; bottom: 10px; padding: 3em 1in 96px 72pt; } -/* line 94, builtins.scss */ +/* line 94, numbered/builtins.scss */ #list { len: 3; len: 1; @@ -80,7 +80,7 @@ index: false; index: 2; index: 2; - /* line 115, builtins.scss */ + /* line 115, numbered/builtins.scss */ index: 1; world: one, two, three, great, job; world: one, two, three, great job; @@ -88,7 +88,7 @@ cool: great job one two three; zip: 1px solid, 2px dashed; zip: 1px solid red, 2px dashed green; } -/* line 129, builtins.scss */ +/* line 129, numbered/builtins.scss */ #introspection { t: number; t: string; @@ -108,19 +108,19 @@ c: true; c: false; c: true; } -/* line 153, builtins.scss */ +/* line 153, numbered/builtins.scss */ #if { color: yes; color: no; color: yes; color: yes; } -/* line 160, builtins.scss */ +/* line 160, numbered/builtins.scss */ .transparent { r: 0; g: 0; b: 0; a: 0; } -/* line 167, builtins.scss */ +/* line 167, numbered/builtins.scss */ .alpha { a: 1; a: 1; diff --git a/tests/outputs/comments_numbered.css b/tests/outputs/comments_numbered.css index 9ffe49c7..0c7ca477 100644 --- a/tests/outputs/comments_numbered.css +++ b/tests/outputs/comments_numbered.css @@ -16,11 +16,11 @@ div { what-ever: 100px; background: url(); /*this is not a comment?*/ } -/* line 31, comments.scss */ +/* line 31, numbered/comments.scss */ .dummy { color: blue; } /* comment 1 */ -/* line 36, comments.scss */ +/* line 36, numbered/comments.scss */ a { /* comment 2 */ /* comment 3 */ diff --git a/tests/outputs/compass_extract_numbered.css b/tests/outputs/compass_extract_numbered.css index 923c1cac..7f0ec077 100644 --- a/tests/outputs/compass_extract_numbered.css +++ b/tests/outputs/compass_extract_numbered.css @@ -1,4 +1,4 @@ -/* line 224, compass_extract.scss */ +/* line 224, numbered/compass_extract.scss */ #test-0 { unit: false; unit: true; @@ -8,29 +8,29 @@ size: 1; size: 2; size: 2; } -/* line 236, compass_extract.scss */ +/* line 236, numbered/compass_extract.scss */ #test-1 { - /* line 142, compass_extract.scss */ + /* line 142, numbered/compass_extract.scss */ margin-top: 7.5em; padding-top: 9em; padding-bottom: 10.5em; - /* line 157, compass_extract.scss */ + /* line 157, numbered/compass_extract.scss */ margin-bottom: 0em; } -/* line 240, compass_extract.scss */ +/* line 240, numbered/compass_extract.scss */ #test-2 { - /* line 196, compass_extract.scss */ + /* line 196, numbered/compass_extract.scss */ border-style: solid; border-width: 0.0625em; padding: 1.4375em; } -/* line 244, compass_extract.scss */ +/* line 244, numbered/compass_extract.scss */ #test-3 { - /* line 184, compass_extract.scss */ + /* line 184, numbered/compass_extract.scss */ border-top-style: solid; border-top-width: 0.0625em; padding-top: 1.4375em; - /* line 188, compass_extract.scss */ - /* line 184, compass_extract.scss */ + /* line 188, numbered/compass_extract.scss */ + /* line 184, numbered/compass_extract.scss */ border-bottom-style: solid; border-bottom-width: 0.0625em; padding-bottom: 1.4375em; - /* line 188, compass_extract.scss */ } + /* line 188, numbered/compass_extract.scss */ } diff --git a/tests/outputs/content_numbered.css b/tests/outputs/content_numbered.css index e64b573f..682fee11 100644 --- a/tests/outputs/content_numbered.css +++ b/tests/outputs/content_numbered.css @@ -1,36 +1,36 @@ -/* line 3, content.scss */ +/* line 3, numbered/content.scss */ * html { - /* line 8, content.scss */ } + /* line 8, numbered/content.scss */ } * html #logo { background-image: url(/logo.gif); } -/* line 20, content.scss */ +/* line 20, numbered/content.scss */ .colors { background-color: blue; color: white; border-color: blue; } -/* line 26, content.scss */ +/* line 26, numbered/content.scss */ @media only screen and (max-width: 480px) { - /* line 32, content.scss */ + /* line 32, numbered/content.scss */ body { color: red; } } -/* line 36, content.scss */ +/* line 36, numbered/content.scss */ #sidebar { width: 300px; - /* line 26, content.scss */ } + /* line 26, numbered/content.scss */ } @media only screen and (max-width: 480px) { #sidebar { width: 100px; } } -/* line 46, content.scss */ +/* line 46, numbered/content.scss */ @media only screen and (min-width: 40em) { - /* line 51, content.scss */ + /* line 51, numbered/content.scss */ .grid-1 { width: 100%; } .grid-2 { width: 100%; } } -/* line 46, content.scss */ +/* line 46, numbered/content.scss */ @media only screen and (min-width: 40em) { - /* line 58, content.scss */ - /* line 58, content.scss */ + /* line 58, numbered/content.scss */ + /* line 58, numbered/content.scss */ .grid-1 { width: 100%; } .grid-2 { diff --git a/tests/outputs/content_with_function_numbered.css b/tests/outputs/content_with_function_numbered.css index a107e172..0bfbf868 100644 --- a/tests/outputs/content_with_function_numbered.css +++ b/tests/outputs/content_with_function_numbered.css @@ -1,3 +1,3 @@ -/* line 13, content_with_function.scss */ +/* line 13, numbered/content_with_function.scss */ body { padding: 1 px; } diff --git a/tests/outputs/default_args_numbered.css b/tests/outputs/default_args_numbered.css index 32d65ad7..e62a99b9 100644 --- a/tests/outputs/default_args_numbered.css +++ b/tests/outputs/default_args_numbered.css @@ -1,4 +1,4 @@ -/* line 11, default_args.scss */ +/* line 11, numbered/default_args.scss */ div { height: red; margin: 100px; } diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css index c04fa5d9..468efc82 100644 --- a/tests/outputs/directives_numbered.css +++ b/tests/outputs/directives_numbered.css @@ -1,45 +1,45 @@ @charset "hello-world"; -/* line 4, directives.scss */ +/* line 4, numbered/directives.scss */ @page :left { - /* line 5, directives.scss */ + /* line 5, numbered/directives.scss */ div { color: red; } } -/* line 10, directives.scss */ +/* line 10, numbered/directives.scss */ @page test { - /* line 11, directives.scss */ + /* line 11, numbered/directives.scss */ @media yes { - /* line 12, directives.scss */ - /* line 16, directives.scss */ + /* line 12, numbered/directives.scss */ + /* line 16, numbered/directives.scss */ div { color: red; } } } -/* line 24, directives.scss */ +/* line 24, numbered/directives.scss */ @media something { - /* line 25, directives.scss */ + /* line 25, numbered/directives.scss */ @page { - /* line 26, directives.scss */ + /* line 26, numbered/directives.scss */ @media else { - /* line 27, directives.scss */ + /* line 27, numbered/directives.scss */ div { height: 200px; } } } } -/* line 35, directives.scss */ +/* line 35, numbered/directives.scss */ div { color: red; - /* line 37, directives.scss */ } + /* line 37, numbered/directives.scss */ } @page yeah { - /* line 38, directives.scss */ + /* line 38, numbered/directives.scss */ div pre { height: 20px; } } -/* line 44, directives.scss */ +/* line 44, numbered/directives.scss */ @font-face { color: red; height: 20px; } -/* line 50, directives.scss */ +/* line 50, numbered/directives.scss */ @keyframes 'bounce' { - /* line 51, directives.scss */ - /* line 56, directives.scss */ - /* line 61, directives.scss */ - /* line 66, directives.scss */ - /* line 71, directives.scss */ + /* line 51, numbered/directives.scss */ + /* line 56, numbered/directives.scss */ + /* line 61, numbered/directives.scss */ + /* line 66, numbered/directives.scss */ + /* line 71, numbered/directives.scss */ from { top: 100px; animation-timing-function: ease-out; } @@ -58,11 +58,11 @@ div { to { top: 100px; } } -/* line 76, directives.scss */ +/* line 76, numbered/directives.scss */ @-webkit-keyframes flowouttoleft { - /* line 77, directives.scss */ - /* line 78, directives.scss */ - /* line 79, directives.scss */ + /* line 77, numbered/directives.scss */ + /* line 78, numbered/directives.scss */ + /* line 79, numbered/directives.scss */ 0% { -webkit-transform: translateX(0) scale(1); } @@ -71,15 +71,15 @@ div { 100% { -webkit-transform: translateX(-100%) scale(0.7); } } -/* line 82, directives.scss */ +/* line 82, numbered/directives.scss */ div { animation-name: 'diagonal-slide'; animation-duration: 5s; animation-iteration-count: 10; } -/* line 88, directives.scss */ +/* line 88, numbered/directives.scss */ @keyframes 'diagonal-slide' { - /* line 90, directives.scss */ - /* line 95, directives.scss */ + /* line 90, numbered/directives.scss */ + /* line 95, numbered/directives.scss */ from { left: 0; top: 0; } @@ -91,9 +91,9 @@ div { @document url(http://www.w3.org/), url-prefix(http://www.w3.org/Style/), domain(mozilla.org), -/* line 105, directives.scss */ +/* line 105, numbered/directives.scss */ regexp("https:.*") { - /* line 107, directives.scss */ + /* line 107, numbered/directives.scss */ body { color: purple; background: yellow; } } diff --git a/tests/outputs/extends_numbered.css b/tests/outputs/extends_numbered.css index b316bba6..df0cdc93 100644 --- a/tests/outputs/extends_numbered.css +++ b/tests/outputs/extends_numbered.css @@ -1,132 +1,132 @@ -/* line 2, extends.scss */ +/* line 2, numbered/extends.scss */ error, pre seriousError, span seriousError, other, hello { border: 1px #f00; background-color: #fdd; } -/* line 7, extends.scss */ +/* line 7, numbered/extends.scss */ pre, span { - /* line 8, extends.scss */ } + /* line 8, numbered/extends.scss */ } pre seriousError, span seriousError { font-size: 20px; } -/* line 14, extends.scss */ +/* line 14, numbered/extends.scss */ hello { color: green; - /* line 17, extends.scss */ } + /* line 17, numbered/extends.scss */ } hello div { margin: 10px; } -/* line 22, extends.scss */ +/* line 22, numbered/extends.scss */ .cool, .me { color: red; } -/* line 26, extends.scss */ +/* line 26, numbered/extends.scss */ .blue, .me { color: purple; } -/* line 30, extends.scss */ -/* line 34, extends.scss */ +/* line 30, numbered/extends.scss */ +/* line 34, numbered/extends.scss */ -/* line 35, extends.scss */ +/* line 35, numbered/extends.scss */ a:hover, .hoverlink, #demo .overview .fakelink:hover { text-decoration: underline; } -/* line 40, extends.scss */ +/* line 40, numbered/extends.scss */ div.hello.world.hmm, pre div.okay.span.world.hmm, pre #butt .umm div.sure.span.world.hmm, #butt .umm pre div.sure.span.world.hmm, code div.okay.span.world.hmm, code #butt .umm div.sure.span.world.hmm, #butt .umm code div.sure.span.world.hmm { color: blue; } -/* line 44, extends.scss */ +/* line 44, numbered/extends.scss */ pre, code { - /* line 45, extends.scss */ } - /* line 51, extends.scss */ + /* line 45, numbered/extends.scss */ } + /* line 51, numbered/extends.scss */ .xxxxx .xxxxx .xxxxx, code .xxxxx .xxxxx, code code .xxxxx, code code code, code .xxxxx code, .xxxxx code .xxxxx, .xxxxx code code, .xxxxx .xxxxx code { color: green; } -/* line 55, extends.scss */ +/* line 55, numbered/extends.scss */ code { color: red; } -/* line 63, extends.scss */ +/* line 63, numbered/extends.scss */ .alpha, .beta, .gama { color: red; } -/* line 67, extends.scss */ +/* line 67, numbered/extends.scss */ .beta, .gama { color: white; } -/* line 72, extends.scss */ +/* line 72, numbered/extends.scss */ .gama { color: blue; } -/* line 79, extends.scss */ +/* line 79, numbered/extends.scss */ #admin .tabbar a, #admin .tabbar #demo .overview .fakelink, #demo .overview #admin .tabbar .fakelink { font-weight: bold; } -/* line 80, extends.scss */ -/* line 82, extends.scss */ +/* line 80, numbered/extends.scss */ +/* line 82, numbered/extends.scss */ a1 b1 c1 d1, x1 y1 z1 w1 b1 c1 d1 { color: red; } -/* line 83, extends.scss */ -/* line 85, extends.scss */ +/* line 83, numbered/extends.scss */ +/* line 85, numbered/extends.scss */ a2 b2 c2 d2, a2 x2 y2 z2 w2 c2 d2, x2 y2 z2 a2 w2 c2 d2 { color: red; } -/* line 86, extends.scss */ -/* line 89, extends.scss */ +/* line 86, numbered/extends.scss */ +/* line 89, numbered/extends.scss */ a3 b3 c3 d3, a3 b3 x3 y3 z3 w3 d3, x3 y3 z3 a3 b3 w3 d3 { color: red; } -/* line 90, extends.scss */ -/* line 93, extends.scss */ +/* line 90, numbered/extends.scss */ +/* line 93, numbered/extends.scss */ a4 b4 c4 d4, a4 b4 c4 x4 y4 z4 w4, x4 y4 z4 a4 b4 c4 w4 { color: red; } -/* line 94, extends.scss */ -/* line 98, extends.scss */ +/* line 94, numbered/extends.scss */ +/* line 98, numbered/extends.scss */ #butt .yeah .okay, #butt .yeah .umm .sure, #butt .umm .yeah .sure { font-weight: bold; } -/* line 99, extends.scss */ -/* line 101, extends.scss */ +/* line 99, numbered/extends.scss */ +/* line 101, numbered/extends.scss */ a9 b9 s9 t9 v9, a9 b9 s9 t9 x9 y9 z9, a9 b9 x9 y9 s9 t9 z9 { color: red; } -/* line 103, extends.scss */ -/* line 109, extends.scss */ +/* line 103, numbered/extends.scss */ +/* line 109, numbered/extends.scss */ @media print { - /* line 110, extends.scss */ + /* line 110, numbered/extends.scss */ horse, man { color: blue; } } -/* line 115, extends.scss */ +/* line 115, numbered/extends.scss */ man { color: red; } -/* line 123, extends.scss */ +/* line 123, numbered/extends.scss */ wassup { color: blue; } -/* line 128, extends.scss */ +/* line 128, numbered/extends.scss */ .foo { - /* line 129, extends.scss */ } + /* line 129, numbered/extends.scss */ } .foo .wassup { color: blue; } -/* line 137, extends.scss */ +/* line 137, numbered/extends.scss */ #something, .x, .y { color: red; } -/* line 141, extends.scss */ -/* line 145, extends.scss */ +/* line 141, numbered/extends.scss */ +/* line 145, numbered/extends.scss */ -/* line 151, extends.scss */ +/* line 151, numbered/extends.scss */ .nav-tabs { - /* line 152, extends.scss */ } - /* line 156, extends.scss */ + /* line 152, numbered/extends.scss */ } + /* line 156, numbered/extends.scss */ .nav-justified, .nav-tabs.nav-justified { text-align: justify; } .btn:hover, .edit .actions button:hover, .edit .new .actions button:hover, .btn:active, .edit .actions button:active, .edit .new .actions button:active, .btn.active, .edit .actions button.active, .edit .new .actions button.active, .btn.disabled, .edit .actions button.disabled, .edit .new .actions button.disabled, .btn[disabled], .edit .actions button[disabled], .edit .new .actions button[disabled] { - /* line 166, extends.scss */ + /* line 166, numbered/extends.scss */ color: red; } -/* line 169, extends.scss */ +/* line 169, numbered/extends.scss */ .edit .actions { - /* line 170, extends.scss */ } + /* line 170, numbered/extends.scss */ } .edit .actions button { float: right; } -/* line 175, extends.scss */ +/* line 175, numbered/extends.scss */ .edit { - /* line 176, extends.scss */ } + /* line 176, numbered/extends.scss */ } .edit .new { - /* line 177, extends.scss */ - /* line 180, extends.scss */ } + /* line 177, numbered/extends.scss */ + /* line 180, numbered/extends.scss */ } .edit .new .actions { padding: 0; } diff --git a/tests/outputs/filter_effects_numbered.css b/tests/outputs/filter_effects_numbered.css index a5eef6d3..ff2cd87f 100644 --- a/tests/outputs/filter_effects_numbered.css +++ b/tests/outputs/filter_effects_numbered.css @@ -1,21 +1,21 @@ -/* line 1, filter_effects.scss */ +/* line 1, numbered/filter_effects.scss */ #number { -webkit-filter: grayscale(1) sepia(0.5) saturate(0.1) invert(1) opacity(0.5) brightness(0.5) contrast(0.5); } -/* line 11, filter_effects.scss */ +/* line 11, numbered/filter_effects.scss */ #percentage { -webkit-filter: grayscale(100%) sepia(50%) saturate(10%) invert(100%) opacity(50%) brightness(50%) contrast(50%); } -/* line 21, filter_effects.scss */ +/* line 21, numbered/filter_effects.scss */ #misc { -webkit-filter: hue-rotate(90deg) blur(10px) drop-shadow(10px -16px 30px purple); } -/* line 37, filter_effects.scss */ +/* line 37, numbered/filter_effects.scss */ #decimal { opacity: 0.5; filter: alpha(opacity=50, style=1); } -/* line 41, filter_effects.scss */ +/* line 41, numbered/filter_effects.scss */ #percent { opacity: 0.5; filter: alpha(opacity=50); } -/* line 45, filter_effects.scss */ +/* line 45, numbered/filter_effects.scss */ .row { background-color: #071c23; color: #2284a1; } diff --git a/tests/outputs/functions_numbered.css b/tests/outputs/functions_numbered.css index 499d86ca..fd39c2ef 100644 --- a/tests/outputs/functions_numbered.css +++ b/tests/outputs/functions_numbered.css @@ -1,28 +1,28 @@ -/* line 10, functions.scss */ +/* line 10, numbered/functions.scss */ div { color: 14px; sum: 23; } -/* line 33, functions.scss */ +/* line 33, numbered/functions.scss */ div { hello: 10 55; hello: 1010 55; hello: "hello 10 and 55"; } -/* line 44, functions.scss */ +/* line 44, numbered/functions.scss */ del { color: 1000; } -/* line 48, functions.scss */ +/* line 48, numbered/functions.scss */ div { hello: "hello foo and bar"; hello: "hello bar and default"; hello: "hello Alice, Bob, Tom"; } -/* line 61, functions.scss */ +/* line 61, numbered/functions.scss */ .foo { test2: -moz-art; } -/* line 77, functions.scss */ +/* line 77, numbered/functions.scss */ div { - /* line 67, functions.scss */ } + /* line 67, numbered/functions.scss */ } div span { height: 3px; } -/* line 87, functions.scss */ +/* line 87, numbered/functions.scss */ div { width: 2; } diff --git a/tests/outputs/ie7_numbered.css b/tests/outputs/ie7_numbered.css index 1dfe7ab0..d7ee6e0c 100644 --- a/tests/outputs/ie7_numbered.css +++ b/tests/outputs/ie7_numbered.css @@ -1,9 +1,9 @@ -/* line 2, ie7.scss */ +/* line 2, numbered/ie7.scss */ #foo:before { content: counter(item,".") ": "; } -/* line 6, ie7.scss */ +/* line 6, numbered/ie7.scss */ #bar:before { content: counter(item,"."); } -/* line 10, ie7.scss */ +/* line 10, numbered/ie7.scss */ #fu:before { content: counter(item); } diff --git a/tests/outputs/if_numbered.css b/tests/outputs/if_numbered.css index 921baab7..f2e04451 100644 --- a/tests/outputs/if_numbered.css +++ b/tests/outputs/if_numbered.css @@ -1,22 +1,22 @@ -/* line 10, if.scss */ +/* line 10, numbered/if.scss */ div { color: blue; } -/* line 16, if.scss */ +/* line 16, numbered/if.scss */ pre { val-1: "red"; val-2: "blue"; val-3: "blue"; val-4: "red"; val-5: "red"; } -/* line 25, if.scss */ +/* line 25, numbered/if.scss */ span { color: blue; height: 10px; width: 20px; } -/* line 47, if.scss */ +/* line 47, numbered/if.scss */ div { color: blue; border-color: green; } -/* line 67, if.scss */ +/* line 67, numbered/if.scss */ del { thing: no; } diff --git a/tests/outputs/if_on_null_numbered.css b/tests/outputs/if_on_null_numbered.css index d7e5d5f7..4a3fcdf3 100644 --- a/tests/outputs/if_on_null_numbered.css +++ b/tests/outputs/if_on_null_numbered.css @@ -1,3 +1,3 @@ -/* line 6, if_on_null.scss */ +/* line 6, numbered/if_on_null.scss */ body { background-color: "red"; } diff --git a/tests/outputs/import_numbered.css b/tests/outputs/import_numbered.css index 747ab27a..c3e45741 100644 --- a/tests/outputs/import_numbered.css +++ b/tests/outputs/import_numbered.css @@ -5,13 +5,13 @@ div { height: 200px; color: red; } -/* line 9, import.scss */ +/* line 9, numbered/import.scss */ pre { color: red; } pre div { height: 200px; color: red; } -/* line 14, import.scss */ +/* line 14, numbered/import.scss */ code div { height: 200px; color: red; } @@ -21,7 +21,7 @@ code div { #partial { color: blue; } -/* line 20, import.scss */ +/* line 20, numbered/import.scss */ body { color: #7c2; background: gray; } diff --git a/tests/outputs/interpolation_numbered.css b/tests/outputs/interpolation_numbered.css index 82f2f908..19520ff7 100644 --- a/tests/outputs/interpolation_numbered.css +++ b/tests/outputs/interpolation_numbered.css @@ -1,45 +1,45 @@ -/* line 2, interpolation.scss */ +/* line 2, numbered/interpolation.scss */ div { - /* line 3, interpolation.scss */ + /* line 3, numbered/interpolation.scss */ color: redwhite blue; - /* line 4, interpolation.scss */ + /* line 4, numbered/interpolation.scss */ color: red white blue; - /* line 5, interpolation.scss */ + /* line 5, numbered/interpolation.scss */ color: red whiteblue; - /* line 6, interpolation.scss */ + /* line 6, numbered/interpolation.scss */ color: redwhiteblue; - /* line 7, interpolation.scss */ + /* line 7, numbered/interpolation.scss */ color: ummyeahwhat; - /* line 8, interpolation.scss */ + /* line 8, numbered/interpolation.scss */ color: stacked; - /* line 10, interpolation.scss */ + /* line 10, numbered/interpolation.scss */ font-size: 10px/something; - /* line 11, interpolation.scss */ + /* line 11, numbered/interpolation.scss */ font-size: 10px / something; - /* line 13, interpolation.scss */ + /* line 13, numbered/interpolation.scss */ test: "whatworldwrong"; - /* line 14, interpolation.scss */ + /* line 14, numbered/interpolation.scss */ test: "whatworldwrong"; - /* line 15, interpolation.scss */ + /* line 15, numbered/interpolation.scss */ test: "whatworldwrong"; - /* line 16, interpolation.scss */ + /* line 16, numbered/interpolation.scss */ test: "what"world"wrong"; - /* line 18, interpolation.scss */ + /* line 18, numbered/interpolation.scss */ hi: "what is 16 end"; } -/* line 24, interpolation.scss */ +/* line 24, numbered/interpolation.scss */ pre { - /* line 27, interpolation.scss */ - /* line 31, interpolation.scss */ - /* line 35, interpolation.scss */ } + /* line 27, numbered/interpolation.scss */ + /* line 31, numbered/interpolation.scss */ + /* line 35, numbered/interpolation.scss */ } pre var { color: red; } pre var dad { color: red; } pre bedvardad { color: red; } -/* line 40, interpolation.scss */ +/* line 40, numbered/interpolation.scss */ cool { - /* line 42, interpolation.scss */ } + /* line 42, numbered/interpolation.scss */ } cool .thing-1 { color: red; } cool .thing-2 { @@ -50,34 +50,34 @@ cool { color: red; } cool .thing-5 { color: red; } -/* line 48, interpolation.scss */ +/* line 48, numbered/interpolation.scss */ abcde { color: red; } -/* line 52, interpolation.scss */ +/* line 52, numbered/interpolation.scss */ #hello, .world { color: red; } -/* line 56, interpolation.scss */ +/* line 56, numbered/interpolation.scss */ #abchelloyeah, .coolworldyes { color: red; } -/* line 62, interpolation.scss */ +/* line 62, numbered/interpolation.scss */ div.element:nth-child(2n) { display: none; } -/* line 69, interpolation.scss */ +/* line 69, numbered/interpolation.scss */ div { - /* line 71, interpolation.scss */ + /* line 71, numbered/interpolation.scss */ hello: world; coolhello: world; - /* line 72, interpolation.scss */ + /* line 72, numbered/interpolation.scss */ helloone: world; - /* line 73, interpolation.scss */ + /* line 73, numbered/interpolation.scss */ twohelloone: world; - /* line 74, interpolation.scss */ + /* line 74, numbered/interpolation.scss */ oneabtwo: cool; - /* line 76, interpolation.scss */ - /* line 78, interpolation.scss */ - /* line 79, interpolation.scss */ + /* line 76, numbered/interpolation.scss */ + /* line 78, numbered/interpolation.scss */ + /* line 79, numbered/interpolation.scss */ hello-world: red; hello-mold: white; - /* line 80, interpolation.scss */ + /* line 80, numbered/interpolation.scss */ hello-hello: blue; - /* line 81, interpolation.scss */ } + /* line 81, numbered/interpolation.scss */ } diff --git a/tests/outputs/keyword_args_numbered.css b/tests/outputs/keyword_args_numbered.css index 501ae411..fc101b91 100644 --- a/tests/outputs/keyword_args_numbered.css +++ b/tests/outputs/keyword_args_numbered.css @@ -1,7 +1,7 @@ -/* line 8, keyword_args.scss */ +/* line 8, numbered/keyword_args.scss */ pre { out: alpha fort three palace; } -/* line 19, keyword_args.scss */ +/* line 19, numbered/keyword_args.scss */ div { hello: 5; world: -5; } diff --git a/tests/outputs/list_numbered.css b/tests/outputs/list_numbered.css index e8701f9f..66ef481c 100644 --- a/tests/outputs/list_numbered.css +++ b/tests/outputs/list_numbered.css @@ -1,8 +1,8 @@ -/* line 4, list.scss */ +/* line 4, numbered/list.scss */ div { padding: 10px 20px 30px 40px; margin: 0 10px 10px 10px; background: linear-gradient(black, white); } -/* line 13, list.scss */ +/* line 13, numbered/list.scss */ p { background: linear-gradient(red, blue); } diff --git a/tests/outputs/looping_numbered.css b/tests/outputs/looping_numbered.css index 9e12ec7e..485a640d 100644 --- a/tests/outputs/looping_numbered.css +++ b/tests/outputs/looping_numbered.css @@ -1,4 +1,4 @@ -/* line 2, looping.scss */ +/* line 2, numbered/looping.scss */ div { color: what; color: is; @@ -12,7 +12,7 @@ div { border: what; border: is; border: this; } -/* line 23, looping.scss */ +/* line 23, numbered/looping.scss */ span { color: 0; color: 1; @@ -25,7 +25,7 @@ span { color: 8; color: 9; color: 10; } -/* line 31, looping.scss */ +/* line 31, numbered/looping.scss */ pre { color: 1; color: 2; diff --git a/tests/outputs/media_numbered.css b/tests/outputs/media_numbered.css index b4ea5d47..cb2a0f4c 100644 --- a/tests/outputs/media_numbered.css +++ b/tests/outputs/media_numbered.css @@ -1,165 +1,165 @@ -/* line 3, media.scss */ +/* line 3, numbered/media.scss */ @media { - /* line 4, media.scss */ + /* line 4, numbered/media.scss */ div { color: blue; } } -/* line 6, media.scss */ +/* line 6, numbered/media.scss */ @media what { - /* line 7, media.scss */ + /* line 7, numbered/media.scss */ div { color: blue; } } -/* line 10, media.scss */ +/* line 10, numbered/media.scss */ @media (cool) { - /* line 11, media.scss */ + /* line 11, numbered/media.scss */ div { color: blue; } } -/* line 13, media.scss */ +/* line 13, numbered/media.scss */ @media (cool: blue) { - /* line 14, media.scss */ + /* line 14, numbered/media.scss */ div { color: blue; } } -/* line 17, media.scss */ +/* line 17, numbered/media.scss */ @media hello and (world) and (butt: man) { - /* line 18, media.scss */ + /* line 18, numbered/media.scss */ div { color: blue; } } -/* line 23, media.scss */ +/* line 23, numbered/media.scss */ @media (max-width: 940px) { color: red; } -/* line 28, media.scss */ +/* line 28, numbered/media.scss */ @media not hello and (world) { color: blue; - /* line 30, media.scss */ - /* line 34, media.scss */ + /* line 30, numbered/media.scss */ + /* line 34, numbered/media.scss */ pre { color: blue; } } @media butt and (world) { color: red; - /* line 36, media.scss */ + /* line 36, numbered/media.scss */ div { color: red; } } -/* line 42, media.scss */ +/* line 42, numbered/media.scss */ @media a, b { - /* line 43, media.scss */ } -/* line 48, media.scss */ + /* line 43, numbered/media.scss */ } +/* line 48, numbered/media.scss */ @media a { - /* line 49, media.scss */ } -/* line 54, media.scss */ + /* line 49, numbered/media.scss */ } +/* line 54, numbered/media.scss */ @media a, b { - /* line 55, media.scss */ } -/* line 64, media.scss */ + /* line 55, numbered/media.scss */ } +/* line 64, numbered/media.scss */ div { color: blue; - /* line 66, media.scss */ } + /* line 66, numbered/media.scss */ } @media screen and (-webkit-min-device-pixel-ratio: 1.5) { div { - /* line 67, media.scss */ } + /* line 67, numbered/media.scss */ } div .sidebar { width: 500px; } } -/* line 81, media.scss */ +/* line 81, numbered/media.scss */ div { position: absolute; - /* line 84, media.scss */ } + /* line 84, numbered/media.scss */ } @media screen { div { top: 0; - /* line 87, media.scss */ + /* line 87, numbered/media.scss */ bottom: 8em; color: red; - /* line 76, media.scss */ } + /* line 76, numbered/media.scss */ } div p { margin: 5px; } div .success { color: green; } } -/* line 95, media.scss */ +/* line 95, numbered/media.scss */ .button { width: 300px; height: 100px; background: #eee; - /* line 100, media.scss */ - /* line 104, media.scss */ } + /* line 100, numbered/media.scss */ + /* line 104, numbered/media.scss */ } .button :hover { background: #aaa; } @media only screen and (max-width: 300px) { .button { width: 100px; height: 100px; } } -/* line 110, media.scss */ +/* line 110, numbered/media.scss */ code { position: absolute; - /* line 112, media.scss */ } + /* line 112, numbered/media.scss */ } @media screen { code { - /* line 113, media.scss */ + /* line 113, numbered/media.scss */ height: 10px; } code pre { height: 20px; } } -/* line 120, media.scss */ +/* line 120, numbered/media.scss */ dt { - /* line 121, media.scss */ } + /* line 121, numbered/media.scss */ } @media screen { dt { - /* line 122, media.scss */ } } + /* line 122, numbered/media.scss */ } } @media screen and (color: blue) { dt { height: 10px; } } -/* line 129, media.scss */ +/* line 129, numbered/media.scss */ @media screen { - /* line 130, media.scss */ - /* line 133, media.scss */ + /* line 130, numbered/media.scss */ + /* line 133, numbered/media.scss */ .screen { width: 12px; } } @media only screen { - /* line 134, media.scss */ + /* line 134, numbered/media.scss */ .only-screen { height: 11px; } } -/* line 140, media.scss */ +/* line 140, numbered/media.scss */ @media only screen { - /* line 141, media.scss */ - /* line 144, media.scss */ + /* line 141, numbered/media.scss */ + /* line 144, numbered/media.scss */ .only-screen { width: 14px; } } @media only screen { - /* line 145, media.scss */ + /* line 145, numbered/media.scss */ .only-screen { height: 16px; } } -/* line 151, media.scss */ +/* line 151, numbered/media.scss */ @media not screen { - /* line 152, media.scss */ } -/* line 159, media.scss */ + /* line 152, numbered/media.scss */ } +/* line 159, numbered/media.scss */ @media not screen { - /* line 160, media.scss */ } + /* line 160, numbered/media.scss */ } @media print { - /* line 161, media.scss */ + /* line 161, numbered/media.scss */ .only-print { height: 12px; } } -/* line 167, media.scss */ +/* line 167, numbered/media.scss */ @media screen { - /* line 168, media.scss */ } + /* line 168, numbered/media.scss */ } @media screen { - /* line 169, media.scss */ + /* line 169, numbered/media.scss */ .only-print { height: 12px; } } -/* line 175, media.scss */ +/* line 175, numbered/media.scss */ @media not screen { - /* line 176, media.scss */ } -/* line 183, media.scss */ + /* line 176, numbered/media.scss */ } +/* line 183, numbered/media.scss */ @media not screen { - /* line 184, media.scss */ } + /* line 184, numbered/media.scss */ } @media not screen { - /* line 185, media.scss */ + /* line 185, numbered/media.scss */ .not-screen { height: 15px; } } -/* line 191, media.scss */ +/* line 191, numbered/media.scss */ @media only screen { - /* line 192, media.scss */ } -/* line 199, media.scss */ + /* line 192, numbered/media.scss */ } +/* line 199, numbered/media.scss */ @media only screen { - /* line 200, media.scss */ } + /* line 200, numbered/media.scss */ } @media only screen and (color: blue) { - /* line 201, media.scss */ } + /* line 201, numbered/media.scss */ } @media only screen and (color: blue) and (width: 13) { - /* line 202, media.scss */ + /* line 202, numbered/media.scss */ .only-screen { height: 15px; } } diff --git a/tests/outputs/mixins_numbered.css b/tests/outputs/mixins_numbered.css index bee388d8..800b0386 100644 --- a/tests/outputs/mixins_numbered.css +++ b/tests/outputs/mixins_numbered.css @@ -1,31 +1,31 @@ -/* line 9, mixins.scss */ +/* line 9, numbered/mixins.scss */ div { color: blue; color: red; - /* line 4, mixins.scss */ } + /* line 4, numbered/mixins.scss */ } div pre { height: 200px; } -/* line 26, mixins.scss */ +/* line 26, numbered/mixins.scss */ span { color: blue; - /* line 17, mixins.scss */ } + /* line 17, numbered/mixins.scss */ } span div { height: 20px; } -/* line 30, mixins.scss */ +/* line 30, numbered/mixins.scss */ html { height: 43px; } -/* line 39, mixins.scss */ +/* line 39, numbered/mixins.scss */ del { height: 20px; } -/* line 52, mixins.scss */ +/* line 52, numbered/mixins.scss */ div { color: white; color: blue; color: white; } -/* line 62, mixins.scss */ +/* line 62, numbered/mixins.scss */ div { background-image: linear-gradient(left top, red, green); } -/* line 72, mixins.scss */ +/* line 72, numbered/mixins.scss */ div { -moz-box-shadow: 10px 10px 5px #888; -webkit-box-shadow: 10px 10px 5px #888; @@ -33,59 +33,59 @@ div { -moz-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; -webkit-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; } -/* line 81, mixins.scss */ +/* line 81, numbered/mixins.scss */ div { - /* line 82, mixins.scss */ } + /* line 82, numbered/mixins.scss */ } div p { - /* line 83, mixins.scss */ + /* line 83, numbered/mixins.scss */ color: red; - /* line 17, mixins.scss */ - /* line 89, mixins.scss */ + /* line 17, numbered/mixins.scss */ + /* line 89, numbered/mixins.scss */ color: blue; } div p .class { color: red; - /* line 17, mixins.scss */ } + /* line 17, numbered/mixins.scss */ } div p .class div { height: 20px; } div p div { height: 20px; } div p .top { top: 0; - /* line 92, mixins.scss */ } + /* line 92, numbered/mixins.scss */ } div p .top div { color: red; } -/* line 103, mixins.scss */ +/* line 103, numbered/mixins.scss */ div.mixin-content-simple { color: red; } -/* line 109, mixins.scss */ +/* line 109, numbered/mixins.scss */ div.mixin-content-with-arg { background: blue; color: red; } -/* line 109, mixins.scss */ +/* line 109, numbered/mixins.scss */ div.mixin-content-with-arg { background: purple; height: 20px; } -/* line 103, mixins.scss */ +/* line 103, numbered/mixins.scss */ div.mixin-content-simple { height: 43px; } -/* line 103, mixins.scss */ +/* line 103, numbered/mixins.scss */ div.mixin-content-simple { color: orange; - /* line 17, mixins.scss */ } + /* line 17, numbered/mixins.scss */ } div.mixin-content-simple div { height: 20px; } -/* line 109, mixins.scss */ +/* line 109, numbered/mixins.scss */ div.mixin-content-with-arg { background: purple; height: 43px; } -/* line 109, mixins.scss */ +/* line 109, numbered/mixins.scss */ div.mixin-content-with-arg { background: purple; color: orange; - /* line 17, mixins.scss */ } + /* line 17, numbered/mixins.scss */ } div.mixin-content-with-arg div { height: 20px; } -/* line 156, mixins.scss */ +/* line 156, numbered/mixins.scss */ #please-wait { background: url(/images/logo.png); position: absolute; @@ -93,14 +93,14 @@ div.mixin-content-with-arg { right: 0; bottom: 3em; left: 4em; } -/* line 168, mixins.scss */ +/* line 168, numbered/mixins.scss */ div.parameter-name-scope { - /* line 161, mixins.scss */ + /* line 161, numbered/mixins.scss */ -webkit-transform: translateX(50px); } -/* line 174, mixins.scss */ +/* line 174, numbered/mixins.scss */ @-webkit-keyframes change-color { - /* line 181, mixins.scss */ - /* line 182, mixins.scss */ + /* line 181, numbered/mixins.scss */ + /* line 182, numbered/mixins.scss */ 0% { color: green; } diff --git a/tests/outputs/nesting_numbered.css b/tests/outputs/nesting_numbered.css index be8fb840..8d676e91 100644 --- a/tests/outputs/nesting_numbered.css +++ b/tests/outputs/nesting_numbered.css @@ -1,28 +1,28 @@ div: blue; -/* line 3, nesting.scss */ +/* line 3, numbered/nesting.scss */ body { color: red; } -/* line 8, nesting.scss */ +/* line 8, numbered/nesting.scss */ div { color: red; height: yes; - /* line 12, nesting.scss */ } + /* line 12, numbered/nesting.scss */ } div pre { color: blue; } -/* line 21, nesting.scss */ +/* line 21, numbered/nesting.scss */ div { - /* line 22, nesting.scss */ + /* line 22, numbered/nesting.scss */ font: 10px hello world; font-size: 10px; font-color: blue; - /* line 27, nesting.scss */ + /* line 27, numbered/nesting.scss */ border-left: 1px solid blue; border-right: 2px dashed green; } -/* line 34, nesting.scss */ +/* line 34, numbered/nesting.scss */ #nested-nesting { bar: baz; - /* line 36, nesting.scss */ + /* line 36, numbered/nesting.scss */ bang-bop: bar; bang-bip: 1px; - /* line 39, nesting.scss */ + /* line 39, numbered/nesting.scss */ bang-blat-baf: bort; } diff --git a/tests/outputs/null_numbered.css b/tests/outputs/null_numbered.css index e5e476cf..64449980 100644 --- a/tests/outputs/null_numbered.css +++ b/tests/outputs/null_numbered.css @@ -1,29 +1,29 @@ -/* line 2, null.scss */ +/* line 2, numbered/null.scss */ .div { one: null; one: world; one: NULL world; one: a, b; two: a, b; } -/* line 12, null.scss */ +/* line 12, numbered/null.scss */ p:before { - /* line 13, null.scss */ + /* line 13, numbered/null.scss */ content: "I ate pies!"; } -/* line 31, null.scss */ +/* line 31, numbered/null.scss */ .foo { - /* line 26, null.scss */ + /* line 26, numbered/null.scss */ -webkit-border-radius: 10; border-radius: 10; - /* line 27, null.scss */ } -/* line 35, null.scss */ + /* line 27, numbered/null.scss */ } +/* line 35, numbered/null.scss */ .fu { - /* line 26, null.scss */ + /* line 26, numbered/null.scss */ -webkit-border-radius: 20; border-radius: 20; - /* line 27, null.scss */ } -/* line 39, null.scss */ + /* line 27, numbered/null.scss */ } +/* line 39, numbered/null.scss */ .bar { - /* line 26, null.scss */ + /* line 26, numbered/null.scss */ -webkit-border-top-left-radius: 30; border-top-left-radius: 30; - /* line 27, null.scss */ } + /* line 27, numbered/null.scss */ } diff --git a/tests/outputs/operators_numbered.css b/tests/outputs/operators_numbered.css index 703bb365..4723c8c7 100644 --- a/tests/outputs/operators_numbered.css +++ b/tests/outputs/operators_numbered.css @@ -1,4 +1,4 @@ -/* line 3, operators.scss */ +/* line 3, numbered/operators.scss */ body { color: 8; color: 16; @@ -9,25 +9,25 @@ body { top: 1.5em; left: -1cm; top: 6.29921; } -/* line 15, operators.scss */ +/* line 15, numbered/operators.scss */ div { color: false; color: true; color: true; color: false; color: what > 3; } -/* line 25, operators.scss */ +/* line 25, numbered/operators.scss */ #units { test: 2.5748in; test: 13mm; test: 4em; test: 11mm; test: 1.1cm; } -/* line 33, operators.scss */ +/* line 33, numbered/operators.scss */ #modulo { test: 1; test: 1cm; } -/* line 38, operators.scss */ +/* line 38, numbered/operators.scss */ #colors { color: #ff0203; color: #fe0000; @@ -42,11 +42,11 @@ div { color: true; color: true; color: false; } -/* line 59, operators.scss */ +/* line 59, numbered/operators.scss */ #preserve { hello: what -going; hello: what - going; } -/* line 64, operators.scss */ +/* line 64, numbered/operators.scss */ #strings { hello: what -going; hello: whatgoing; @@ -56,12 +56,12 @@ div { hello: "whatgoing"; hello: goingwhat; hello: "whatwhat"; } -/* line 77, operators.scss */ +/* line 77, numbered/operators.scss */ #negation { a: -60; b: -90; b: -90; } -/* line 84, operators.scss */ +/* line 84, numbered/operators.scss */ #bools-fail { and: false and two; and: one and two; @@ -69,7 +69,7 @@ div { or: false or two; or: one or two; or: one or false; } -/* line 94, operators.scss */ +/* line 94, numbered/operators.scss */ #bools { and: false; and: two; @@ -77,7 +77,7 @@ div { or: two; or: one; or: one; } -/* line 105, operators.scss */ +/* line 105, numbered/operators.scss */ #nots-fail { not: false2; not: not false; @@ -85,7 +85,7 @@ div { not: not 1; not: not ""; not: not hello; } -/* line 114, operators.scss */ +/* line 114, numbered/operators.scss */ #nots { not: false2; not: true; @@ -93,76 +93,76 @@ div { not: false; not: false; not: false; } -/* line 123, operators.scss */ +/* line 123, numbered/operators.scss */ #string-test { str: true; str: false; str: true; - /* line 131, operators.scss */ + /* line 131, numbered/operators.scss */ str: true; - /* line 133, operators.scss */ + /* line 133, numbered/operators.scss */ str: xhellohellofalse; str: true; } -/* line 139, operators.scss */ +/* line 139, numbered/operators.scss */ #special { cancel-unit: 1; } -/* line 146, operators.scss */ +/* line 146, numbered/operators.scss */ .row .a { margin: -0.5em; } -/* line 147, operators.scss */ +/* line 147, numbered/operators.scss */ .row .b { margin: -0.5em; } -/* line 148, operators.scss */ +/* line 148, numbered/operators.scss */ .row .c { margin: -0.5em; } -/* line 149, operators.scss */ +/* line 149, numbered/operators.scss */ .row .d { margin: -0.5em; } -/* line 150, operators.scss */ +/* line 150, numbered/operators.scss */ .row .e { margin: 0 -0.5em; } -/* line 152, operators.scss */ +/* line 152, numbered/operators.scss */ .alt .a { margin: -0.5em; } -/* line 153, operators.scss */ +/* line 153, numbered/operators.scss */ .alt .b { margin: -0.5em; } -/* line 154, operators.scss */ +/* line 154, numbered/operators.scss */ .alt .c { margin: -0.5em; } -/* line 155, operators.scss */ +/* line 155, numbered/operators.scss */ .alt .d { margin: 0 -1em / 2; } -/* line 156, operators.scss */ +/* line 156, numbered/operators.scss */ .alt .e { margin: 0 -0.5em; } -/* line 158, operators.scss */ +/* line 158, numbered/operators.scss */ .row .f { margin: -2em; } -/* line 159, operators.scss */ +/* line 159, numbered/operators.scss */ .row .g { margin: -2em; } -/* line 160, operators.scss */ +/* line 160, numbered/operators.scss */ .row .h { margin: -2em; } -/* line 161, operators.scss */ +/* line 161, numbered/operators.scss */ .row .i { margin: -2em; } -/* line 162, operators.scss */ +/* line 162, numbered/operators.scss */ .row .j { margin: 0 -2em; } -/* line 164, operators.scss */ +/* line 164, numbered/operators.scss */ .alt .f { margin: -2em; } -/* line 165, operators.scss */ +/* line 165, numbered/operators.scss */ .alt .g { margin: -2em; } -/* line 166, operators.scss */ +/* line 166, numbered/operators.scss */ .alt .h { margin: -2em; } -/* line 167, operators.scss */ +/* line 167, numbered/operators.scss */ .alt .i { margin: 0 -2em; } -/* line 168, operators.scss */ +/* line 168, numbered/operators.scss */ .alt .j { margin: 0 -2em; } diff --git a/tests/outputs/parsing_comments_numbered.css b/tests/outputs/parsing_comments_numbered.css index 0085190e..d5d9cd8d 100644 --- a/tests/outputs/parsing_comments_numbered.css +++ b/tests/outputs/parsing_comments_numbered.css @@ -1,5 +1,5 @@ /* comment 1 */ -/* line 2, parsing_comments.scss */ +/* line 2, numbered/parsing_comments.scss */ a { /* comment 2 */ color: red; @@ -7,7 +7,7 @@ a { /* comment 4 */ } /* comment 5 */ /*! comment 1 */ -/* line 10, parsing_comments.scss */ +/* line 10, numbered/parsing_comments.scss */ b { /*! comment 2 */ color: red; @@ -17,7 +17,7 @@ b { /* * multi-line comment 1 */ -/* line 20, parsing_comments.scss */ +/* line 20, numbered/parsing_comments.scss */ c { /* * multi-line comment 2 @@ -35,7 +35,7 @@ c { /*! * multi-line comment 1 */ -/* line 38, parsing_comments.scss */ +/* line 38, numbered/parsing_comments.scss */ d { /*! * multi-line comment 2 @@ -50,6 +50,6 @@ d { /*! * multi-line comment 5 */ -/* line 54, parsing_comments.scss */ +/* line 54, numbered/parsing_comments.scss */ e { color: red; } diff --git a/tests/outputs/placeholder_selector_numbered.css b/tests/outputs/placeholder_selector_numbered.css index 2c01113f..87bc33f2 100644 --- a/tests/outputs/placeholder_selector_numbered.css +++ b/tests/outputs/placeholder_selector_numbered.css @@ -1,11 +1,11 @@ -/* line 1, placeholder_selector.scss */ +/* line 1, numbered/placeholder_selector.scss */ p a.notice span, p a.error span, #context a.notice span, #context a.error span { color: blue; font-weight: bold; font-size: 2em; } -/* line 7, placeholder_selector.scss */ -/* line 9, placeholder_selector.scss */ -/* line 13, placeholder_selector.scss */ +/* line 7, numbered/placeholder_selector.scss */ +/* line 9, numbered/placeholder_selector.scss */ +/* line 13, numbered/placeholder_selector.scss */ p { padding: 2em; } -/* line 18, placeholder_selector.scss */ +/* line 18, numbered/placeholder_selector.scss */ diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css index 3d13a5aa..1130ff2c 100644 --- a/tests/outputs/scss_css_numbered.css +++ b/tests/outputs/scss_css_numbered.css @@ -6,22 +6,22 @@ @import "foo.css" screen; @import "foo.css" screen, print; @charset "UTF-8"; -/* line 1, scss_css.scss */ +/* line 1, numbered/scss_css.scss */ [foo~=bar] { a: b; } -/* line 5, scss_css.scss */ +/* line 5, numbered/scss_css.scss */ [foo^=bar] { a: b; } -/* line 9, scss_css.scss */ +/* line 9, numbered/scss_css.scss */ [foo$=bar] { a: b; } -/* line 13, scss_css.scss */ +/* line 13, numbered/scss_css.scss */ [foo*=bar] { a: b; } -/* line 17, scss_css.scss */ +/* line 17, numbered/scss_css.scss */ [foo|=en] { a: b; } -/* line 21, scss_css.scss */ +/* line 21, numbered/scss_css.scss */ foo { a: 2; b: 2.3em; @@ -30,20 +30,20 @@ foo { e: flanny-blanny-blan; f: url(http://sass-lang.com); h: #abc; } -/* line 32, scss_css.scss */ +/* line 32, numbered/scss_css.scss */ selector { property: value; property2: value; } -/* line 37, scss_css.scss */ +/* line 37, numbered/scss_css.scss */ sel { p: v; } -/* line 39, scss_css.scss */ +/* line 39, numbered/scss_css.scss */ .foo { /* Foo Bar Baz */ a: b; } -/* line 46, scss_css.scss */ +/* line 46, numbered/scss_css.scss */ .foo { /* Foo Bar @@ -60,28 +60,28 @@ sel { Bar Baz */ a: b; } -/* line 64, scss_css.scss */ +/* line 64, numbered/scss_css.scss */ @foo { - /* line 65, scss_css.scss */ + /* line 65, numbered/scss_css.scss */ a: b; rule { a: b; } } -/* line 71, scss_css.scss */ +/* line 71, numbered/scss_css.scss */ @foo { a: b; } @bar { - /* line 72, scss_css.scss */ + /* line 72, numbered/scss_css.scss */ a: b; } @foo "bar" -/* line 77, scss_css.scss */ +/* line 77, numbered/scss_css.scss */ foo { a: 12px calc(100%/3 - 2*1em - 2*1px); b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } -/* line 84, scss_css.scss */ +/* line 84, numbered/scss_css.scss */ foo { bar: baz; } @@ -93,16 +93,16 @@ baz { /* * foo */ -/* line 94, scss_css.scss */ +/* line 94, numbered/scss_css.scss */ bar { baz: bang; } -/* line 97, scss_css.scss */ +/* line 97, numbered/scss_css.scss */ E, F { a: b; } -/* line 101, scss_css.scss */ +/* line 101, numbered/scss_css.scss */ E F, G H { a: b; } -/* line 105, scss_css.scss */ +/* line 105, numbered/scss_css.scss */ E > F, G > H { a: b; } /* This is a CSS comment. */ @@ -116,36 +116,36 @@ E > F, G > H { /* color: red; */ } /** .four {color: red;} */ -/* line 116, scss_css.scss */ +/* line 116, numbered/scss_css.scss */ .five { color: green; } /**/ -/* line 118, scss_css.scss */ +/* line 118, numbered/scss_css.scss */ .six { color: green; } /*********/ -/* line 120, scss_css.scss */ +/* line 120, numbered/scss_css.scss */ .seven { color: green; } /* a comment **/ -/* line 122, scss_css.scss */ +/* line 122, numbered/scss_css.scss */ .eight { color: green; } -/* line 125, scss_css.scss */ +/* line 125, numbered/scss_css.scss */ foo { a: \foo bar; b: foo\ bar; c: \2022 \0020; d: foo\\bar; e: foo\"\'bar; } -/* line 133, scss_css.scss */ +/* line 133, numbered/scss_css.scss */ foo { a: "\foo bar"; b: "foo\ bar"; c: "\2022 \0020"; d: "foo\\bar"; e: "foo\"'bar"; } -/* line 141, scss_css.scss */ +/* line 141, numbered/scss_css.scss */ foo { _name: val; *name: val; @@ -157,75 +157,75 @@ foo { name: val; } @foo "bar" ; -/* line 154, scss_css.scss */ +/* line 154, numbered/scss_css.scss */ foo { a: -moz-element(#foo); b: -webkit-element(#foo); b: -foobar-element(#foo); } -/* line 160, scss_css.scss */ -/* line 162, scss_css.scss */ +/* line 160, numbered/scss_css.scss */ +/* line 162, numbered/scss_css.scss */ @foo ; -/* line 168, scss_css.scss */ +/* line 168, numbered/scss_css.scss */ foo { bar: baz; } -/* line 173, scss_css.scss */ -/* line 175, scss_css.scss */ +/* line 173, numbered/scss_css.scss */ +/* line 175, numbered/scss_css.scss */ -/* line 179, scss_css.scss */ +/* line 179, numbered/scss_css.scss */ 0% { a: b; } -/* line 183, scss_css.scss */ +/* line 183, numbered/scss_css.scss */ 60% { a: b; } -/* line 187, scss_css.scss */ +/* line 187, numbered/scss_css.scss */ 100% { a: b; } -/* line 191, scss_css.scss */ +/* line 191, numbered/scss_css.scss */ 12px { a: b; } -/* line 195, scss_css.scss */ +/* line 195, numbered/scss_css.scss */ "foo" { a: b; } -/* line 199, scss_css.scss */ +/* line 199, numbered/scss_css.scss */ foo { - /* line 200, scss_css.scss */ + /* line 200, numbered/scss_css.scss */ a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 203, scss_css.scss */ +/* line 203, numbered/scss_css.scss */ :foo("bar") { a: b; } -/* line 207, scss_css.scss */ +/* line 207, numbered/scss_css.scss */ :foo(bar) { a: b; } -/* line 211, scss_css.scss */ +/* line 211, numbered/scss_css.scss */ :foo(12px) { a: b; } -/* line 215, scss_css.scss */ +/* line 215, numbered/scss_css.scss */ :foo(+) { a: b; } -/* line 219, scss_css.scss */ +/* line 219, numbered/scss_css.scss */ :foo(-) { a: b; } -/* line 223, scss_css.scss */ +/* line 223, numbered/scss_css.scss */ :foo(+"bar") { a: b; } -/* line 227, scss_css.scss */ +/* line 227, numbered/scss_css.scss */ :foo(-++--baz-"bar"12px) { a: b; } -/* line 231, scss_css.scss */ +/* line 231, numbered/scss_css.scss */ foo { a: foo-bar(12); b: -foo-bar-baz(13, 14 15); } @import "foo.css" screen, print and (foo: 0); @import "foo.css" screen, only print, screen and (foo: 0); -/* line 254, scss_css.scss */ +/* line 254, numbered/scss_css.scss */ foo { a: foo !important; b: foo bar !important; b: foo, bar !important; } -/* line 260, scss_css.scss */ +/* line 260, numbered/scss_css.scss */ foo { a: -moz-bar-baz; b: foo -o-bar-baz; } @@ -239,171 +239,171 @@ foo { /*: b; c */ } /* Foo * Bar */ -/* line 275, scss_css.scss */ +/* line 275, numbered/scss_css.scss */ .foo { /* Foo * Bar */ } -/* line 280, scss_css.scss */ +/* line 280, numbered/scss_css.scss */ [foo] { a: b; } -/* line 284, scss_css.scss */ +/* line 284, numbered/scss_css.scss */ [foo="bar"] { a: b; } -/* line 288, scss_css.scss */ +/* line 288, numbered/scss_css.scss */ [foo~="bar"] { a: b; } -/* line 292, scss_css.scss */ +/* line 292, numbered/scss_css.scss */ [foo^="bar"] { a: b; } -/* line 296, scss_css.scss */ +/* line 296, numbered/scss_css.scss */ [foo$="bar"] { a: b; } -/* line 300, scss_css.scss */ +/* line 300, numbered/scss_css.scss */ [foo*="bar"] { a: b; } -/* line 304, scss_css.scss */ +/* line 304, numbered/scss_css.scss */ [foo|="en"] { a: b; } -/* line 308, scss_css.scss */ +/* line 308, numbered/scss_css.scss */ :root { a: b; } -/* line 312, scss_css.scss */ +/* line 312, numbered/scss_css.scss */ :nth-child(n) { a: b; } -/* line 316, scss_css.scss */ +/* line 316, numbered/scss_css.scss */ :nth-last-child(n) { a: b; } -/* line 320, scss_css.scss */ +/* line 320, numbered/scss_css.scss */ :nth-of-type(n) { a: b; } -/* line 324, scss_css.scss */ +/* line 324, numbered/scss_css.scss */ :nth-last-of-type(n) { a: b; } -/* line 328, scss_css.scss */ +/* line 328, numbered/scss_css.scss */ :first-child { a: b; } -/* line 332, scss_css.scss */ +/* line 332, numbered/scss_css.scss */ :last-child { a: b; } -/* line 336, scss_css.scss */ +/* line 336, numbered/scss_css.scss */ :first-of-type { a: b; } -/* line 340, scss_css.scss */ +/* line 340, numbered/scss_css.scss */ :last-of-type { a: b; } -/* line 344, scss_css.scss */ +/* line 344, numbered/scss_css.scss */ :only-child { a: b; } -/* line 348, scss_css.scss */ +/* line 348, numbered/scss_css.scss */ :only-of-type { a: b; } -/* line 352, scss_css.scss */ +/* line 352, numbered/scss_css.scss */ :empty { a: b; } -/* line 356, scss_css.scss */ +/* line 356, numbered/scss_css.scss */ :link { a: b; } -/* line 360, scss_css.scss */ +/* line 360, numbered/scss_css.scss */ :visited { a: b; } -/* line 364, scss_css.scss */ +/* line 364, numbered/scss_css.scss */ :active { a: b; } -/* line 368, scss_css.scss */ +/* line 368, numbered/scss_css.scss */ :hover { a: b; } -/* line 372, scss_css.scss */ +/* line 372, numbered/scss_css.scss */ :focus { a: b; } -/* line 376, scss_css.scss */ +/* line 376, numbered/scss_css.scss */ :target { a: b; } -/* line 380, scss_css.scss */ +/* line 380, numbered/scss_css.scss */ :lang(fr) { a: b; } -/* line 384, scss_css.scss */ +/* line 384, numbered/scss_css.scss */ :enabled { a: b; } -/* line 388, scss_css.scss */ +/* line 388, numbered/scss_css.scss */ :disabled { a: b; } -/* line 392, scss_css.scss */ +/* line 392, numbered/scss_css.scss */ :checked { a: b; } -/* line 396, scss_css.scss */ +/* line 396, numbered/scss_css.scss */ ::first-line { a: b; } -/* line 400, scss_css.scss */ +/* line 400, numbered/scss_css.scss */ ::first-letter { a: b; } -/* line 404, scss_css.scss */ +/* line 404, numbered/scss_css.scss */ ::before { a: b; } -/* line 408, scss_css.scss */ +/* line 408, numbered/scss_css.scss */ ::after { a: b; } -/* line 412, scss_css.scss */ +/* line 412, numbered/scss_css.scss */ .warning { a: b; } -/* line 416, scss_css.scss */ +/* line 416, numbered/scss_css.scss */ #myid { a: b; } -/* line 420, scss_css.scss */ +/* line 420, numbered/scss_css.scss */ :not(s) { a: b; } -/* line 424, scss_css.scss */ +/* line 424, numbered/scss_css.scss */ @media all { - /* line 425, scss_css.scss */ - /* line 428, scss_css.scss */ + /* line 425, numbered/scss_css.scss */ + /* line 428, numbered/scss_css.scss */ rule1 { prop: val; } rule2 { prop: val; } } -/* line 432, scss_css.scss */ +/* line 432, numbered/scss_css.scss */ @media screen, print { - /* line 433, scss_css.scss */ - /* line 436, scss_css.scss */ + /* line 433, numbered/scss_css.scss */ + /* line 436, numbered/scss_css.scss */ rule1 { prop: val; } rule2 { prop: val; } } -/* line 440, scss_css.scss */ +/* line 440, numbered/scss_css.scss */ @media screen and (-webkit-min-device-pixel-ratio: 0) { a: b; } -/* line 444, scss_css.scss */ +/* line 444, numbered/scss_css.scss */ @media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { a: b; } -/* line 448, scss_css.scss */ +/* line 448, numbered/scss_css.scss */ :-moz-any(h1, h2, h3) { a: b; } -/* line 452, scss_css.scss */ +/* line 452, numbered/scss_css.scss */ :-moz-any(.foo) { a: b; } -/* line 456, scss_css.scss */ +/* line 456, numbered/scss_css.scss */ :-moz-any(foo bar, .baz > .bang) { a: b; } @-moz-document url(http://www.w3.org/), url-prefix(http://www.w3.org/Style/), domain(mozilla.org), -/* line 463, scss_css.scss */ +/* line 463, numbered/scss_css.scss */ regexp("^https:.*") { - /* line 464, scss_css.scss */ + /* line 464, numbered/scss_css.scss */ .foo { a: b; } } -/* line 468, scss_css.scss */ +/* line 468, numbered/scss_css.scss */ foo { filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } -/* line 473, scss_css.scss */ +/* line 473, numbered/scss_css.scss */ foo { filter: alpha(opacity=20); filter: alpha(opacity=20, enabled=true); filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } -/* line 479, scss_css.scss */ +/* line 479, numbered/scss_css.scss */ @foo bar { a: b; } -/* line 482, scss_css.scss */ +/* line 482, numbered/scss_css.scss */ @bar baz { c: d; } @@ -413,13 +413,13 @@ foo { * Bar */ /* Baz * Bang */ -/* line 496, scss_css.scss */ +/* line 496, numbered/scss_css.scss */ .foo { /* Foo * Bar */ /* Baz * Bang */ } -/* line 503, scss_css.scss */ +/* line 503, numbered/scss_css.scss */ .foo { /* Foo Bar */ /* Baz Bang */ } @@ -427,148 +427,148 @@ foo { @namespace "http://www.w3.org/Profiles/xhtml1-strict"; @namespace url(http://www.w3.org/Profiles/xhtml1-strict); @namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); -/* line 513, scss_css.scss */ +/* line 513, numbered/scss_css.scss */ [foo|bar=baz] { a: b; } -/* line 517, scss_css.scss */ +/* line 517, numbered/scss_css.scss */ [*|bar=baz] { a: b; } -/* line 521, scss_css.scss */ +/* line 521, numbered/scss_css.scss */ [foo|bar|=baz] { a: b; } -/* line 525, scss_css.scss */ +/* line 525, numbered/scss_css.scss */ foo|E { a: b; } -/* line 529, scss_css.scss */ +/* line 529, numbered/scss_css.scss */ *|E { a: b; } -/* line 533, scss_css.scss */ +/* line 533, numbered/scss_css.scss */ foo|* { a: b; } -/* line 537, scss_css.scss */ +/* line 537, numbered/scss_css.scss */ *|* { a: b; } -/* line 541, scss_css.scss */ +/* line 541, numbered/scss_css.scss */ :not(foo|bar) { a: b; } -/* line 545, scss_css.scss */ +/* line 545, numbered/scss_css.scss */ :not(*|bar) { a: b; } -/* line 549, scss_css.scss */ +/* line 549, numbered/scss_css.scss */ :not(foo|*) { a: b; } -/* line 553, scss_css.scss */ +/* line 553, numbered/scss_css.scss */ :not(*|*) { a: b; } -/* line 557, scss_css.scss */ +/* line 557, numbered/scss_css.scss */ :not(#blah) { a: b; } -/* line 561, scss_css.scss */ +/* line 561, numbered/scss_css.scss */ :not(.blah) { a: b; } -/* line 565, scss_css.scss */ +/* line 565, numbered/scss_css.scss */ :not([foo]) { a: b; } -/* line 569, scss_css.scss */ +/* line 569, numbered/scss_css.scss */ :not([foo^="bar"]) { a: b; } -/* line 573, scss_css.scss */ +/* line 573, numbered/scss_css.scss */ :not([baz|foo~="bar"]) { a: b; } -/* line 577, scss_css.scss */ +/* line 577, numbered/scss_css.scss */ :not(:hover) { a: b; } -/* line 581, scss_css.scss */ +/* line 581, numbered/scss_css.scss */ :not(:nth-child(2n + 3)) { a: b; } -/* line 585, scss_css.scss */ +/* line 585, numbered/scss_css.scss */ :not(:not(#foo)) { a: b; } -/* line 589, scss_css.scss */ +/* line 589, numbered/scss_css.scss */ :not(a#foo.bar) { a: b; } -/* line 593, scss_css.scss */ +/* line 593, numbered/scss_css.scss */ :not(#foo .bar > baz) { a: b; } -/* line 597, scss_css.scss */ +/* line 597, numbered/scss_css.scss */ :not(h1, h2, h3) { a: b; } -/* line 605, scss_css.scss */ +/* line 605, numbered/scss_css.scss */ foo { - /* line 606, scss_css.scss */ + /* line 606, numbered/scss_css.scss */ a: "bang 1 bar bip"; } -/* line 609, scss_css.scss */ +/* line 609, numbered/scss_css.scss */ :nth-child(-n) { a: b; } -/* line 613, scss_css.scss */ +/* line 613, numbered/scss_css.scss */ :nth-child(+n) { a: b; } -/* line 617, scss_css.scss */ +/* line 617, numbered/scss_css.scss */ :nth-child(even) { a: b; } -/* line 621, scss_css.scss */ +/* line 621, numbered/scss_css.scss */ :nth-child(odd) { a: b; } -/* line 625, scss_css.scss */ +/* line 625, numbered/scss_css.scss */ :nth-child(50) { a: b; } -/* line 629, scss_css.scss */ +/* line 629, numbered/scss_css.scss */ :nth-child(-50) { a: b; } -/* line 633, scss_css.scss */ +/* line 633, numbered/scss_css.scss */ :nth-child(+50) { a: b; } -/* line 637, scss_css.scss */ +/* line 637, numbered/scss_css.scss */ :nth-child(2n+3) { a: b; } -/* line 641, scss_css.scss */ +/* line 641, numbered/scss_css.scss */ :nth-child(2n-3) { a: b; } -/* line 645, scss_css.scss */ +/* line 645, numbered/scss_css.scss */ :nth-child(+2n-3) { a: b; } -/* line 649, scss_css.scss */ +/* line 649, numbered/scss_css.scss */ :nth-child(-2n+3) { a: b; } -/* line 653, scss_css.scss */ +/* line 653, numbered/scss_css.scss */ :nth-child(-2n+ 3) { a: b; } -/* line 657, scss_css.scss */ +/* line 657, numbered/scss_css.scss */ :nth-child( 2n + 3) { a: b; } -/* line 661, scss_css.scss */ +/* line 661, numbered/scss_css.scss */ foo { a: foo bar baz; b: foo, #abc, -12; c: 1px/2px/-3px; d: foo bar, baz/bang; } -/* line 668, scss_css.scss */ +/* line 668, numbered/scss_css.scss */ @page { prop1: val; prop2: val; } -/* line 673, scss_css.scss */ +/* line 673, numbered/scss_css.scss */ @page flap { prop1: val; prop2: val; } -/* line 678, scss_css.scss */ +/* line 678, numbered/scss_css.scss */ @page :first { prop1: val; prop2: val; } -/* line 683, scss_css.scss */ +/* line 683, numbered/scss_css.scss */ @page flap:first { prop1: val; prop2: val; } -/* line 688, scss_css.scss */ +/* line 688, numbered/scss_css.scss */ .foo { /* Foo */ a: b; } -/* line 693, scss_css.scss */ +/* line 693, numbered/scss_css.scss */ .foo { /* Foo * Bar */ a: b; } /* Foo */ -/* line 699, scss_css.scss */ +/* line 699, numbered/scss_css.scss */ .foo { a: b; } /* Foo @@ -579,214 +579,214 @@ foo { .foo #bar:baz(/* bang )*/ bip) { /* .a #foo */ a: b; } -/* line 712, scss_css.scss */ +/* line 712, numbered/scss_css.scss */ > E { a: b; } -/* line 716, scss_css.scss */ +/* line 716, numbered/scss_css.scss */ + E { a: b; } -/* line 720, scss_css.scss */ +/* line 720, numbered/scss_css.scss */ ~ E { a: b; } -/* line 724, scss_css.scss */ +/* line 724, numbered/scss_css.scss */ > > E { a: b; } -/* line 728, scss_css.scss */ +/* line 728, numbered/scss_css.scss */ >> E { a: b; } -/* line 732, scss_css.scss */ +/* line 732, numbered/scss_css.scss */ E* { a: b; } -/* line 736, scss_css.scss */ +/* line 736, numbered/scss_css.scss */ E*.foo { a: b; } -/* line 740, scss_css.scss */ +/* line 740, numbered/scss_css.scss */ E*:hover { a: b; } E, F { - /* line 745, scss_css.scss */ + /* line 745, numbered/scss_css.scss */ a: b; } E F { - /* line 750, scss_css.scss */ + /* line 750, numbered/scss_css.scss */ a: b; } E, F G, H { - /* line 755, scss_css.scss */ + /* line 755, numbered/scss_css.scss */ a: b; } -/* line 759, scss_css.scss */ +/* line 759, numbered/scss_css.scss */ body { /* //comment here */ } -/* line 766, scss_css.scss */ +/* line 766, numbered/scss_css.scss */ E > F { a: b; } -/* line 768, scss_css.scss */ +/* line 768, numbered/scss_css.scss */ E ~ F { a: b; } -/* line 770, scss_css.scss */ +/* line 770, numbered/scss_css.scss */ E + F { a: b; } -/* line 772, scss_css.scss */ +/* line 772, numbered/scss_css.scss */ * { a: b; } -/* line 776, scss_css.scss */ +/* line 776, numbered/scss_css.scss */ E { a: b; } -/* line 780, scss_css.scss */ +/* line 780, numbered/scss_css.scss */ E[foo] { a: b; } -/* line 784, scss_css.scss */ +/* line 784, numbered/scss_css.scss */ E[foo="bar"] { a: b; } -/* line 788, scss_css.scss */ +/* line 788, numbered/scss_css.scss */ E[foo~="bar"] { a: b; } -/* line 792, scss_css.scss */ +/* line 792, numbered/scss_css.scss */ E[foo^="bar"] { a: b; } -/* line 796, scss_css.scss */ +/* line 796, numbered/scss_css.scss */ E[foo$="bar"] { a: b; } -/* line 800, scss_css.scss */ +/* line 800, numbered/scss_css.scss */ E[foo*="bar"] { a: b; } -/* line 804, scss_css.scss */ +/* line 804, numbered/scss_css.scss */ E[foo|="en"] { a: b; } -/* line 808, scss_css.scss */ +/* line 808, numbered/scss_css.scss */ E:root { a: b; } -/* line 812, scss_css.scss */ +/* line 812, numbered/scss_css.scss */ E:nth-child(n) { a: b; } -/* line 816, scss_css.scss */ +/* line 816, numbered/scss_css.scss */ E:nth-last-child(n) { a: b; } -/* line 820, scss_css.scss */ +/* line 820, numbered/scss_css.scss */ E:nth-of-type(n) { a: b; } -/* line 824, scss_css.scss */ +/* line 824, numbered/scss_css.scss */ E:nth-last-of-type(n) { a: b; } -/* line 828, scss_css.scss */ +/* line 828, numbered/scss_css.scss */ E:first-child { a: b; } -/* line 832, scss_css.scss */ +/* line 832, numbered/scss_css.scss */ E:last-child { a: b; } -/* line 836, scss_css.scss */ +/* line 836, numbered/scss_css.scss */ E:first-of-type { a: b; } -/* line 840, scss_css.scss */ +/* line 840, numbered/scss_css.scss */ E:last-of-type { a: b; } -/* line 844, scss_css.scss */ +/* line 844, numbered/scss_css.scss */ E:only-child { a: b; } -/* line 848, scss_css.scss */ +/* line 848, numbered/scss_css.scss */ E:only-of-type { a: b; } -/* line 852, scss_css.scss */ +/* line 852, numbered/scss_css.scss */ E:empty { a: b; } -/* line 856, scss_css.scss */ +/* line 856, numbered/scss_css.scss */ E:link { a: b; } -/* line 860, scss_css.scss */ +/* line 860, numbered/scss_css.scss */ E:visited { a: b; } -/* line 864, scss_css.scss */ +/* line 864, numbered/scss_css.scss */ E:active { a: b; } -/* line 868, scss_css.scss */ +/* line 868, numbered/scss_css.scss */ E:hover { a: b; } -/* line 872, scss_css.scss */ +/* line 872, numbered/scss_css.scss */ E:focus { a: b; } -/* line 876, scss_css.scss */ +/* line 876, numbered/scss_css.scss */ E:target { a: b; } -/* line 880, scss_css.scss */ +/* line 880, numbered/scss_css.scss */ E:lang(fr) { a: b; } -/* line 884, scss_css.scss */ +/* line 884, numbered/scss_css.scss */ E:enabled { a: b; } -/* line 888, scss_css.scss */ +/* line 888, numbered/scss_css.scss */ E:disabled { a: b; } -/* line 892, scss_css.scss */ +/* line 892, numbered/scss_css.scss */ E:checked { a: b; } -/* line 896, scss_css.scss */ +/* line 896, numbered/scss_css.scss */ E::first-line { a: b; } -/* line 900, scss_css.scss */ +/* line 900, numbered/scss_css.scss */ E::first-letter { a: b; } -/* line 904, scss_css.scss */ +/* line 904, numbered/scss_css.scss */ E::before { a: b; } -/* line 908, scss_css.scss */ +/* line 908, numbered/scss_css.scss */ E::after { a: b; } -/* line 912, scss_css.scss */ +/* line 912, numbered/scss_css.scss */ E.warning { a: b; } -/* line 916, scss_css.scss */ +/* line 916, numbered/scss_css.scss */ E#myid { a: b; } -/* line 920, scss_css.scss */ +/* line 920, numbered/scss_css.scss */ E:not(s) { a: b; } -/* line 924, scss_css.scss */ +/* line 924, numbered/scss_css.scss */ E F { a: b; } -/* line 928, scss_css.scss */ +/* line 928, numbered/scss_css.scss */ E > F { a: b; } -/* line 932, scss_css.scss */ +/* line 932, numbered/scss_css.scss */ E + F { a: b; } -/* line 936, scss_css.scss */ +/* line 936, numbered/scss_css.scss */ E ~ F { a: b; } -/* line 940, scss_css.scss */ +/* line 940, numbered/scss_css.scss */ @supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 941, scss_css.scss */ + /* line 941, numbered/scss_css.scss */ .foo { a: b; } } -/* line 947, scss_css.scss */ +/* line 947, numbered/scss_css.scss */ @-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 948, scss_css.scss */ + /* line 948, numbered/scss_css.scss */ .foo { a: b; } } -/* line 954, scss_css.scss */ +/* line 954, numbered/scss_css.scss */ foo { foo: bar; #baz: bang; #bip: bop; } -/* line 960, scss_css.scss */ +/* line 960, numbered/scss_css.scss */ foo { a: -2; b: -2.3em; c: -50%; d: -foo(bar baz); } -/* line 967, scss_css.scss */ +/* line 967, numbered/scss_css.scss */ foo { a: -0.5em; b: 0.5em; c: -foo(12px); d: +foo(12px); } -/* line 977, scss_css.scss */ +/* line 977, numbered/scss_css.scss */ foo { -moz-foo-bar: blat; -o-flat-blang: wibble; } -/* line 982, scss_css.scss */ +/* line 982, numbered/scss_css.scss */ foo { a: foo(); b: bar baz-bang() bip; } diff --git a/tests/outputs/selectors_numbered.css b/tests/outputs/selectors_numbered.css index 1cf1a5ed..d1f24695 100644 --- a/tests/outputs/selectors_numbered.css +++ b/tests/outputs/selectors_numbered.css @@ -1,363 +1,363 @@ -/* line 1, selectors.scss */ +/* line 1, numbered/selectors.scss */ * { color: blue; } -/* line 2, selectors.scss */ +/* line 2, numbered/selectors.scss */ E { color: blue; } -/* line 4, selectors.scss */ +/* line 4, numbered/selectors.scss */ E:not(:link) { color: blue; } -/* line 5, selectors.scss */ +/* line 5, numbered/selectors.scss */ E:not(:link):not(:visited) { color: blue; } -/* line 6, selectors.scss */ +/* line 6, numbered/selectors.scss */ E:not(:link, :visited) { color: blue; } -/* line 7, selectors.scss */ +/* line 7, numbered/selectors.scss */ E:matches(:hover, :focus) { color: blue; } -/* line 9, selectors.scss */ +/* line 9, numbered/selectors.scss */ E.warning { color: blue; } -/* line 10, selectors.scss */ +/* line 10, numbered/selectors.scss */ E#id { color: blue; } -/* line 11, selectors.scss */ +/* line 11, numbered/selectors.scss */ E[foo] { color: blue; } -/* line 12, selectors.scss */ +/* line 12, numbered/selectors.scss */ E[foo="barbar"] { color: blue; } -/* line 13, selectors.scss */ +/* line 13, numbered/selectors.scss */ E[foo="barbar" i] { color: blue; } -/* line 14, selectors.scss */ +/* line 14, numbered/selectors.scss */ E[foo~="hello#$@%@$#^"] { color: blue; } -/* line 15, selectors.scss */ +/* line 15, numbered/selectors.scss */ E[foo^="color: green;"] { color: blue; } -/* line 16, selectors.scss */ +/* line 16, numbered/selectors.scss */ E[foo$="239023"] { color: blue; } -/* line 17, selectors.scss */ +/* line 17, numbered/selectors.scss */ E[foo*="29302"] { color: blue; } -/* line 18, selectors.scss */ +/* line 18, numbered/selectors.scss */ E[foo|="239032"] { color: blue; } -/* line 20, selectors.scss */ +/* line 20, numbered/selectors.scss */ [foo] { color: blue; } -/* line 21, selectors.scss */ +/* line 21, numbered/selectors.scss */ [foo] .helloWorld { color: blue; } -/* line 22, selectors.scss */ +/* line 22, numbered/selectors.scss */ [foo].helloWorld { color: blue; } -/* line 23, selectors.scss */ +/* line 23, numbered/selectors.scss */ [foo="barbar"] { color: blue; } -/* line 24, selectors.scss */ +/* line 24, numbered/selectors.scss */ [foo~="hello#$@%@$#^"] { color: blue; } -/* line 25, selectors.scss */ +/* line 25, numbered/selectors.scss */ [foo^="color: green;"] { color: blue; } -/* line 26, selectors.scss */ +/* line 26, numbered/selectors.scss */ [foo$="239023"] { color: blue; } -/* line 27, selectors.scss */ +/* line 27, numbered/selectors.scss */ [foo*="29302"] { color: blue; } -/* line 28, selectors.scss */ +/* line 28, numbered/selectors.scss */ [foo|="239032"] { color: blue; } -/* line 30, selectors.scss */ +/* line 30, numbered/selectors.scss */ E:dir(ltr) { color: blue; } -/* line 31, selectors.scss */ +/* line 31, numbered/selectors.scss */ E:lang(en) { color: blue; } -/* line 32, selectors.scss */ +/* line 32, numbered/selectors.scss */ E:lang(en, fr) { color: blue; } -/* line 34, selectors.scss */ +/* line 34, numbered/selectors.scss */ E:any-link { color: blue; } -/* line 35, selectors.scss */ +/* line 35, numbered/selectors.scss */ E:link { color: blue; } -/* line 36, selectors.scss */ +/* line 36, numbered/selectors.scss */ E:visited { color: blue; } -/* line 37, selectors.scss */ +/* line 37, numbered/selectors.scss */ E:local-link { color: blue; } -/* line 38, selectors.scss */ +/* line 38, numbered/selectors.scss */ E:local-link(0) { color: red; } -/* line 39, selectors.scss */ +/* line 39, numbered/selectors.scss */ E:local-link(1) { color: white; } -/* line 40, selectors.scss */ +/* line 40, numbered/selectors.scss */ E:local-link(2) { color: red; } -/* line 41, selectors.scss */ +/* line 41, numbered/selectors.scss */ E:target { color: blue; } -/* line 42, selectors.scss */ +/* line 42, numbered/selectors.scss */ E:scope { color: blue; } -/* line 44, selectors.scss */ +/* line 44, numbered/selectors.scss */ E:current { color: blue; } -/* line 45, selectors.scss */ +/* line 45, numbered/selectors.scss */ E:current(:link) { color: blue; } -/* line 46, selectors.scss */ +/* line 46, numbered/selectors.scss */ E:past { color: blue; } -/* line 47, selectors.scss */ +/* line 47, numbered/selectors.scss */ E:future { color: blue; } -/* line 49, selectors.scss */ +/* line 49, numbered/selectors.scss */ E:active { color: blue; } -/* line 50, selectors.scss */ +/* line 50, numbered/selectors.scss */ E:hover { color: blue; } -/* line 51, selectors.scss */ +/* line 51, numbered/selectors.scss */ E:focus { color: blue; } -/* line 52, selectors.scss */ +/* line 52, numbered/selectors.scss */ E:enabled { color: blue; } -/* line 53, selectors.scss */ +/* line 53, numbered/selectors.scss */ E:disabled { color: blue; } -/* line 54, selectors.scss */ +/* line 54, numbered/selectors.scss */ E:indeterminate { color: blue; } -/* line 55, selectors.scss */ +/* line 55, numbered/selectors.scss */ E:default { color: blue; } -/* line 56, selectors.scss */ +/* line 56, numbered/selectors.scss */ E:in-range { color: blue; } -/* line 57, selectors.scss */ +/* line 57, numbered/selectors.scss */ E:out-of-range { color: blue; } -/* line 58, selectors.scss */ +/* line 58, numbered/selectors.scss */ E:required { color: blue; } -/* line 59, selectors.scss */ +/* line 59, numbered/selectors.scss */ E:optional { color: blue; } -/* line 60, selectors.scss */ +/* line 60, numbered/selectors.scss */ E:read-only { color: blue; } -/* line 61, selectors.scss */ +/* line 61, numbered/selectors.scss */ E:read-write { color: blue; } -/* line 63, selectors.scss */ +/* line 63, numbered/selectors.scss */ E:root { color: blue; } -/* line 64, selectors.scss */ +/* line 64, numbered/selectors.scss */ E:empty { color: blue; } -/* line 65, selectors.scss */ +/* line 65, numbered/selectors.scss */ E:first-child { color: blue; } -/* line 66, selectors.scss */ +/* line 66, numbered/selectors.scss */ E:nth-child(odd) { color: blue; } -/* line 67, selectors.scss */ +/* line 67, numbered/selectors.scss */ E:nth-child(2n+1) { color: blue; } -/* line 68, selectors.scss */ +/* line 68, numbered/selectors.scss */ E:nth-child(5) { color: blue; } -/* line 69, selectors.scss */ +/* line 69, numbered/selectors.scss */ E:last-child { color: blue; } -/* line 70, selectors.scss */ +/* line 70, numbered/selectors.scss */ E:nth-last-child(-n+2) { color: blue; } -/* line 71, selectors.scss */ +/* line 71, numbered/selectors.scss */ E:only-child { color: blue; } -/* line 72, selectors.scss */ +/* line 72, numbered/selectors.scss */ E:first-of-type { color: blue; } -/* line 73, selectors.scss */ +/* line 73, numbered/selectors.scss */ E:nth-of-type(2n) { color: blue; } -/* line 74, selectors.scss */ +/* line 74, numbered/selectors.scss */ E:last-of-type { color: blue; } -/* line 75, selectors.scss */ +/* line 75, numbered/selectors.scss */ E:nth-last-of-type(n) { color: blue; } -/* line 76, selectors.scss */ +/* line 76, numbered/selectors.scss */ E:only-of-type { color: blue; } -/* line 77, selectors.scss */ +/* line 77, numbered/selectors.scss */ E:nth-match(odd) { color: blue; } -/* line 78, selectors.scss */ +/* line 78, numbered/selectors.scss */ E:nth-last-match(odd) { color: blue; } -/* line 80, selectors.scss */ +/* line 80, numbered/selectors.scss */ E:column(n) { color: blue; } -/* line 81, selectors.scss */ +/* line 81, numbered/selectors.scss */ E:nth-column(n) { color: blue; } -/* line 82, selectors.scss */ +/* line 82, numbered/selectors.scss */ E:nth-last-column(n) { color: blue; } -/* line 84, selectors.scss */ +/* line 84, numbered/selectors.scss */ E F { color: blue; } -/* line 85, selectors.scss */ +/* line 85, numbered/selectors.scss */ E > F { color: blue; } -/* line 86, selectors.scss */ +/* line 86, numbered/selectors.scss */ E + F { color: blue; } -/* line 87, selectors.scss */ +/* line 87, numbered/selectors.scss */ E ~ F { color: blue; } -/* line 88, selectors.scss */ +/* line 88, numbered/selectors.scss */ E /foo/ F { color: blue; } -/* line 89, selectors.scss */ +/* line 89, numbered/selectors.scss */ E! > F { color: blue; } -/* line 92, selectors.scss */ +/* line 92, numbered/selectors.scss */ [foo|att=val] { color: blue; } -/* line 93, selectors.scss */ +/* line 93, numbered/selectors.scss */ [*|att] { color: yellow; } -/* line 94, selectors.scss */ +/* line 94, numbered/selectors.scss */ [|att] { color: green; } -/* line 95, selectors.scss */ +/* line 95, numbered/selectors.scss */ [att] { color: green; } -/* line 98, selectors.scss */ +/* line 98, numbered/selectors.scss */ E::first-line { color: blue; } -/* line 99, selectors.scss */ +/* line 99, numbered/selectors.scss */ E::first-letter { color: blue; } -/* line 100, selectors.scss */ +/* line 100, numbered/selectors.scss */ E::before { color: blue; } -/* line 101, selectors.scss */ +/* line 101, numbered/selectors.scss */ E::after { color: blue; } -/* line 104, selectors.scss */ +/* line 104, numbered/selectors.scss */ E::choices { color: blue; } -/* line 105, selectors.scss */ +/* line 105, numbered/selectors.scss */ E::value { color: blue; } -/* line 106, selectors.scss */ +/* line 106, numbered/selectors.scss */ E::repeat-index { color: blue; } -/* line 107, selectors.scss */ +/* line 107, numbered/selectors.scss */ E::repeat-item { color: blue; } -/* line 109, selectors.scss */ +/* line 109, numbered/selectors.scss */ E:first { color: blue; } -/* line 110, selectors.scss */ +/* line 110, numbered/selectors.scss */ E:first-line { color: blue; } -/* line 111, selectors.scss */ +/* line 111, numbered/selectors.scss */ E:first-letter { color: blue; } -/* line 112, selectors.scss */ +/* line 112, numbered/selectors.scss */ E:before { color: blue; } -/* line 113, selectors.scss */ +/* line 113, numbered/selectors.scss */ E:after { color: blue; } -/* line 114, selectors.scss */ +/* line 114, numbered/selectors.scss */ E:checked { color: blue; } -/* line 115, selectors.scss */ +/* line 115, numbered/selectors.scss */ E:invalid { color: blue; } -/* line 116, selectors.scss */ +/* line 116, numbered/selectors.scss */ E:valid { color: blue; } -/* line 117, selectors.scss */ +/* line 117, numbered/selectors.scss */ E:left { color: blue; } -/* line 118, selectors.scss */ +/* line 118, numbered/selectors.scss */ E:right { color: blue; } -/* line 121, selectors.scss */ +/* line 121, numbered/selectors.scss */ E:any(ol) { color: blue; } -/* line 122, selectors.scss */ +/* line 122, numbered/selectors.scss */ E::selection { color: blue; } -/* line 126, selectors.scss */ +/* line 126, numbered/selectors.scss */ div { - /* line 127, selectors.scss */ - /* line 131, selectors.scss */ + /* line 127, numbered/selectors.scss */ + /* line 131, numbered/selectors.scss */ font: something; font-size: 30em; } div font:something { size: 30em; } -/* line 139, selectors.scss */ +/* line 139, numbered/selectors.scss */ .something { - /* line 140, selectors.scss */ - /* line 144, selectors.scss */ - /* line 148, selectors.scss */ } + /* line 140, numbered/selectors.scss */ + /* line 144, numbered/selectors.scss */ + /* line 148, numbered/selectors.scss */ } .something.world { color: blue; } .something .mold { height: 200px; } .dog .something { color: blue; } -/* line 153, selectors.scss */ +/* line 153, numbered/selectors.scss */ .simple { - /* line 154, selectors.scss */ - /* line 158, selectors.scss */ } + /* line 154, numbered/selectors.scss */ + /* line 158, numbered/selectors.scss */ } .dad .simple .wolf { color: blue; } .rad.simple.bad { color: blue; } -/* line 164, selectors.scss */ +/* line 164, numbered/selectors.scss */ div { - /* line 165, selectors.scss */ } + /* line 165, numbered/selectors.scss */ } .something div .what { - /* line 166, selectors.scss */ } + /* line 166, numbered/selectors.scss */ } .something div .what.world { color: blue; } -/* line 172, selectors.scss */ +/* line 172, numbered/selectors.scss */ div { - /* line 173, selectors.scss */ } + /* line 173, numbered/selectors.scss */ } div.foo div { color: blue; } -/* line 178, selectors.scss */ +/* line 178, numbered/selectors.scss */ .main, div { - /* line 179, selectors.scss */ } + /* line 179, numbered/selectors.scss */ } .main .message div, div .message div { - /* line 180, selectors.scss */ } + /* line 180, numbered/selectors.scss */ } .main .message div .title, div .message div .title { - /* line 181, selectors.scss */ } + /* line 181, numbered/selectors.scss */ } .nice-fonts .main .message div .title, .nice-fonts div .message div .title { font-size: 24px; } -/* line 189, selectors.scss */ +/* line 189, numbered/selectors.scss */ .escape\% { color: red; } -/* line 193, selectors.scss */ +/* line 193, numbered/selectors.scss */ .escape-plan\% { color: green; } diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css index c72f5c07..18cdc73f 100644 --- a/tests/outputs/values_numbered.css +++ b/tests/outputs/values_numbered.css @@ -1,4 +1,4 @@ -/* line 2, values.scss */ +/* line 2, numbered/values.scss */ #values { color: #eee; color: #eee; @@ -10,13 +10,13 @@ padding: 10px 10px 10px 10px, 3px 3px 3px; textblock: "This is a \ multiline block \ -/* line 13, values.scss */ +/* line 13, numbered/values.scss */ #not { color: #eee;}"; margin: 4, 3, 1; content: "This is a \ multiline string."; border-radius: -1px -1px -1px black; } -/* line 20, values.scss */ +/* line 20, numbered/values.scss */ #subtraction { lit: 10 -11; lit: -1; @@ -26,11 +26,11 @@ multiline string."; var: -90; var: -90; var: -90; } -/* line 34, values.scss */ +/* line 34, numbered/values.scss */ #special { - /* line 35, values.scss */ + /* line 35, numbered/values.scss */ a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 38, values.scss */ +/* line 38, numbered/values.scss */ #unary { b: 0.5em; c: -foo(12px); diff --git a/tests/outputs/variables_numbered.css b/tests/outputs/variables_numbered.css index 2c90541f..31b3b254 100644 --- a/tests/outputs/variables_numbered.css +++ b/tests/outputs/variables_numbered.css @@ -1,25 +1,25 @@ cool: 100px; -/* line 4, variables.scss */ +/* line 4, numbered/variables.scss */ div { height: red, two, three; } -/* line 10, variables.scss */ +/* line 10, numbered/variables.scss */ div { num: 1000; } -/* line 15, variables.scss */ +/* line 15, numbered/variables.scss */ div { num: 2000; } -/* line 23, variables.scss */ +/* line 23, numbered/variables.scss */ pre { color: blue; } -/* line 31, variables.scss */ +/* line 31, numbered/variables.scss */ del { - /* line 34, variables.scss */ + /* line 34, numbered/variables.scss */ color: red; } del div { - /* line 36, variables.scss */ } + /* line 36, numbered/variables.scss */ } del div pre { color: red; } -/* line 50, variables.scss */ +/* line 50, numbered/variables.scss */ body { font-family: Arial; font-family: Helvetica Neue; From 541859daefd3941beec920844897683cf84a51e1 Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 01:11:36 +0100 Subject: [PATCH 19/33] simplified testing method note: Travis CI keeps failing 3 tests (for no apparent reason) but locally all tests pass --- tests/InputTest.php | 15 +- tests/inputs/numbered/builtins.scss | 149 ---- tests/inputs/numbered/comments.scss | 34 - tests/inputs/numbered/compass_extract.scss | 219 ----- tests/inputs/numbered/content.scss | 58 -- .../numbered/content_with_function.scss | 15 - tests/inputs/numbered/default_args.scss | 11 - tests/inputs/numbered/directives.scss | 118 --- tests/inputs/numbered/extends.scss | 190 ----- tests/inputs/numbered/filter_effects.scss | 48 -- tests/inputs/numbered/functions.scss | 77 -- tests/inputs/numbered/ie7.scss | 13 - tests/inputs/numbered/if.scss | 67 -- tests/inputs/numbered/if_on_null.scss | 8 - tests/inputs/numbered/import.scss | 20 - tests/inputs/numbered/interpolation.scss | 97 --- tests/inputs/numbered/keyword_args.scss | 17 - tests/inputs/numbered/list.scss | 14 - tests/inputs/numbered/looping.scss | 44 - tests/inputs/numbered/media.scss | 246 ------ tests/inputs/numbered/mixins.scss | 163 ---- tests/inputs/numbered/nesting.scss | 40 - tests/inputs/numbered/null.scss | 46 -- tests/inputs/numbered/operators.scss | 167 ---- tests/inputs/numbered/parsing_comments.scss | 60 -- .../inputs/numbered/placeholder_selector.scss | 19 - tests/inputs/numbered/scss_css.scss | 765 ------------------ tests/inputs/numbered/selectors.scss | 289 ------- tests/inputs/numbered/values.scss | 42 - tests/inputs/numbered/variables.scss | 50 -- tests/outputs/builtins_numbered.css | 26 +- tests/outputs/comments_numbered.css | 4 +- tests/outputs/compass_extract_numbered.css | 22 +- tests/outputs/content_numbered.css | 24 +- .../content_with_function_numbered.css | 2 +- tests/outputs/default_args_numbered.css | 2 +- tests/outputs/directives_numbered.css | 60 +- tests/outputs/extends_numbered.css | 102 +-- tests/outputs/filter_effects_numbered.css | 12 +- tests/outputs/functions_numbered.css | 16 +- tests/outputs/ie7_numbered.css | 6 +- tests/outputs/if_numbered.css | 10 +- tests/outputs/if_on_null_numbered.css | 2 +- tests/outputs/import_numbered.css | 6 +- tests/outputs/interpolation_numbered.css | 68 +- tests/outputs/keyword_args_numbered.css | 4 +- tests/outputs/list_numbered.css | 4 +- tests/outputs/looping_numbered.css | 6 +- tests/outputs/media_numbered.css | 128 +-- tests/outputs/mixins_numbered.css | 62 +- tests/outputs/nesting_numbered.css | 18 +- tests/outputs/null_numbered.css | 24 +- tests/outputs/operators_numbered.css | 72 +- tests/outputs/parsing_comments_numbered.css | 10 +- .../outputs/placeholder_selector_numbered.css | 10 +- tests/outputs/scss_css_numbered.css | 434 +++++----- tests/outputs/selectors_numbered.css | 248 +++--- tests/outputs/values_numbered.css | 12 +- tests/outputs/variables_numbered.css | 16 +- 59 files changed, 708 insertions(+), 3803 deletions(-) delete mode 100644 tests/inputs/numbered/builtins.scss delete mode 100644 tests/inputs/numbered/comments.scss delete mode 100644 tests/inputs/numbered/compass_extract.scss delete mode 100644 tests/inputs/numbered/content.scss delete mode 100644 tests/inputs/numbered/content_with_function.scss delete mode 100644 tests/inputs/numbered/default_args.scss delete mode 100644 tests/inputs/numbered/directives.scss delete mode 100644 tests/inputs/numbered/extends.scss delete mode 100644 tests/inputs/numbered/filter_effects.scss delete mode 100644 tests/inputs/numbered/functions.scss delete mode 100644 tests/inputs/numbered/ie7.scss delete mode 100644 tests/inputs/numbered/if.scss delete mode 100644 tests/inputs/numbered/if_on_null.scss delete mode 100644 tests/inputs/numbered/import.scss delete mode 100644 tests/inputs/numbered/interpolation.scss delete mode 100644 tests/inputs/numbered/keyword_args.scss delete mode 100644 tests/inputs/numbered/list.scss delete mode 100644 tests/inputs/numbered/looping.scss delete mode 100644 tests/inputs/numbered/media.scss delete mode 100644 tests/inputs/numbered/mixins.scss delete mode 100644 tests/inputs/numbered/nesting.scss delete mode 100644 tests/inputs/numbered/null.scss delete mode 100644 tests/inputs/numbered/operators.scss delete mode 100644 tests/inputs/numbered/parsing_comments.scss delete mode 100644 tests/inputs/numbered/placeholder_selector.scss delete mode 100644 tests/inputs/numbered/scss_css.scss delete mode 100644 tests/inputs/numbered/selectors.scss delete mode 100644 tests/inputs/numbered/values.scss delete mode 100644 tests/inputs/numbered/variables.scss diff --git a/tests/InputTest.php b/tests/InputTest.php index ea5c2497..73ef7cf9 100644 --- a/tests/InputTest.php +++ b/tests/InputTest.php @@ -23,7 +23,6 @@ class InputTest extends \PHPUnit_Framework_TestCase protected static $outputDir = 'outputs'; protected static $line_number_suffix = '_numbered'; - protected static $numbered_folder = 'numbered'; public function setUp() @@ -63,16 +62,12 @@ public function testInputFile($inFname, $outFname) public function testLineNumbering($inFname, $outFname) { - $outPath = self::lineNumberPath($outFname); - $inPath = __DIR__ . '/'.self::$inputDir.'/'.self::$numbered_folder.'/'.self::fileName($inFname); - //write scss - $scss = LineCommentator::insertLineComments(file($inFname), self::$numbered_folder.'/'.self::fileName($inFname)); - file_put_contents($inPath, $scss); + //insert line numbers + $scss = LineCommentator::insertLineComments(file($inFname), self::fileName($inFname)); if (getenv('BUILD')) { - //write css $css = $this->scss->compile($scss); file_put_contents($outPath, $css); @@ -82,13 +77,9 @@ public function testLineNumbering($inFname, $outFname) { $this->fail("$outPath is missing, consider building tests with BUILD=true"); } - - $input = file_get_contents($inPath); $output = file_get_contents($outPath); - $this->assertEquals($output, $this->scss->compile($input)); - - + $this->assertEquals($output, $this->scss->compile($scss)); } public function fileNameProvider() diff --git a/tests/inputs/numbered/builtins.scss b/tests/inputs/numbered/builtins.scss deleted file mode 100644 index 438bcad7..00000000 --- a/tests/inputs/numbered/builtins.scss +++ /dev/null @@ -1,149 +0,0 @@ -/* line 2, numbered/builtins.scss */ -#color { -color: rgb(34,234,24); -red: red(rgb(34,234,24)); -green: green(rgb(34,234,24)); -blue: blue(rgb(34,234,24)); -color: rgba(1,2,4, 0.5); -a1: alpha(rgb(1,2,4)); -a2: alpha(rgba(1,2,4, 0.5)); -mix: mix(rgb(1,2,3), rgb(3,4,5)); -rgba: rgba($color: #a7c, $alpha: 0.4); -rgba: rgba(#a7c, 0.4); -green: green(ForestGreen); -} -/* line 21, numbered/builtins.scss */ -#hsl { -color: hsl(100, 50, 55); -color: hsla(100, 50, 55, 0.5); -hue: hue(hsl(100, 50, 55)); -sat: saturation(hsl(100, 50, 55)); -lig: lightness(hsl(100, 50, 55)); -} -/* line 30, numbered/builtins.scss */ -#more-color { -$color: hsl(-80,44,33); -light: lighten($color, 10%); -dark: darken($color, 10%); -sat: saturate($color, 10%); -desat: desaturate($color, 10%); -gray: grayscale($color); -comp: complement($color); -inv: invert($color); -} -/* line 44, numbered/builtins.scss */ -#more-more-color { -$color: rgba(1,2,3,0.5); -op: opacity($color); -opacify: opacify($color, 0.1); -opacify: fade-in($color, 0.1); -transparentize: transparentize($color, 0.1); -transparentize: fade-out($color, 0.1); -transparentize: transparentize(#348203, 0.1); -} -/* line 56, numbered/builtins.scss */ -#more-more-more-color { -$color: rgba(10,10,10,0); -color: adjust-color($color, $blue: 69, $red: 55, $green: 100, $alpha: 0.4); -color: adjust-color($color, $hue: 170, $saturation: 100, $lightness: 50); -color: change-color($color, $blue: 69, $red: 55, $green: 100, $alpha: 0.4); -color: change-color($color, $hue: 170, $saturation: 100, $lightness: 50); -color: scale-color($color, $red: 55%); -color: scale-color($color, $red: -55%); -color: scale-color($color, $lightness: 55%); -color: scale-color($color, $lightness: -55%); -color: ie-hex-str($color); -color: ie-hex-str(#abc); -} -/* line 74, numbered/builtins.scss */ -#string { -color: unquote("hello what is going on"); -// color: quote(yeah you know it); // ** -color: quote(yeah); -color: quote("I do?"); -} -/* line 81, numbered/builtins.scss */ -#number { -color: percentage(100/40); -color: round(3.4); -color: floor(3.4); -color: ceil(3.4); -top: floor(10.4px); -top: ceil(.4ex); -width: percentage(100px / 50px); -bottom: abs(-10px); -padding: min(5em, 3em, 4em) max(2px, 1in) min(1in, 96px) max(1in, 72pt); -} -/* line 94, numbered/builtins.scss */ -#list { -len: length(hello world what); -len: length(thing); -n: nth(hello world what, 1); -// n: nth(hello world what, 100); // ** -hello: join(one two three, hello, comma); -hello: join(one two three, hello world what is going, comma); -hello: append(one two three, hello, comma); -index: index(1px solid red, solid); -index: index(1px solid red, dashed); -index: index(1px solid red, #f00); -index: index(96px solid red, 1in); -index: index((1in 2) a b, 1in); -index: index((1in 2) a b, (96px 2)); -index: index((1in 2) a b, (1in, 2)); -index: index((1px solid red), solid); -index: index(1px 3px + 3px, 4+2px); -$var: oo; -/* line 115, numbered/builtins.scss */ -index: index(foo bar, f#{$var}); -$yes: one, two, three; -$no: great job; -world: join($yes, $no); -world: append($yes, $no); -cool: join($yes, $no, space); -cool: join($no, $yes); -zip: zip((1px, 2px), (solid dashed)); -zip: zip(1px 2px 3px, solid dashed, red green blue); -} -/* line 129, numbered/builtins.scss */ -#introspection { -t: type-of(100px); -t: type-of(asdf); -t: type-of("asdf"); -t: type-of(true); -t: type-of(#fff); -t: type-of(blue); -t: type-of(one two three); -u: unit(12); -u: unit(12px); -u: unit(12em); -l: unitless(23); -l: unitless(23deg); -c: comparable(2px, 1px); -c: comparable(100px, 3em); -c: comparable(10cm, 3mm); -c: comparable(1, 4); -c: comparable(1ex, 4em); -c: comparable(2em, 5em); -} -/* line 153, numbered/builtins.scss */ -#if { -color: if(true, yes, no); -color: if(false, yes, no); -color: if(false or true, yes, no); -color: if(10px, yes, no); -} -/* line 160, numbered/builtins.scss */ -.transparent { -r: red(transparent); -g: green(transparent); -b: blue(transparent); -a: alpha(transparent); -} -/* line 167, numbered/builtins.scss */ -.alpha { -a: alpha(black); -a: alpha(#fff); -a: alpha(rgb(0, 0, 0)); -a: alpha(rgba(0, 0, 0, 0.5)); -a: alpha(currentColor); -} \ No newline at end of file diff --git a/tests/inputs/numbered/comments.scss b/tests/inputs/numbered/comments.scss deleted file mode 100644 index eca85333..00000000 --- a/tests/inputs/numbered/comments.scss +++ /dev/null @@ -1,34 +0,0 @@ -// what is going on? -/** what the heck **/ -/** -Here is a block comment -**/ -// this is a comment -// trailing backslash \ -/*hello*/div /*yeah*/ { //surew -border: 1px solid red; // world -/* another property */ -color: url('http://mage-page.com'); -string: "hello /* this is not a comment */"; -world: "// neither is this"; -string: 'hello /* this is not a comment */' /*what if this is a comment */; -world: '// neither is this' // hell world; -; -what-ever: 100px; -background: url(/*this is not a comment?*/); // uhh what happens here -} -// begin -/* line 31, numbered/comments.scss */ -.dummy { -color: blue; -} -/* comment 1 */ -/* line 36, numbered/comments.scss */ -a { -/* comment 2 */ -/* comment 3 */ color: red; /* comment 4 */ -background-color: red; /* comment 5 */ -/* comment 6 */ -} -/* comment 7 */ -// end \ No newline at end of file diff --git a/tests/inputs/numbered/compass_extract.scss b/tests/inputs/numbered/compass_extract.scss deleted file mode 100644 index 41cf3dd0..00000000 --- a/tests/inputs/numbered/compass_extract.scss +++ /dev/null @@ -1,219 +0,0 @@ -// Extracted from compass/typography/vertical_rhythm.scss -// The base font size. -$base-font-size: 16px !default; -// The base line height determines the basic unit of vertical rhythm. -$base-line-height: 24px !default; -// Set the default border style for rhythm borders. -$default-rhythm-border-style: solid !default; -// The default font size in all browsers. -$browser-default-font-size: 16px; -// Set to false if you want to use absolute pixels in sizing your typography. -$relative-font-sizing: true !default; -// Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function -// to round the line height to the nearest half line height instead of the -// nearest integral line height to avoid large spacing between lines. -$round-to-nearest-half-line: false !default; -// Ensure there is at least this many pixels -// of vertical padding above and below the text. -$min-line-padding: 2px !default; -// $base-font-size but in your output unit of choice. -// Defaults to 1em when `$relative-font-sizing` is true. -$font-unit: if($relative-font-sizing, 1em, $base-font-size) !default; -// The basic unit of font rhythm. -$base-rhythm-unit: $base-line-height / $base-font-size * $font-unit; -// The leader is the amount of whitespace in a line. -// It might be useful in your calculations. -$base-leader: ($base-line-height - $base-font-size) * $font-unit / $base-font-size; -// The half-leader is the amount of whitespace above and below a line. -// It might be useful in your calculations. -$base-half-leader: $base-leader / 2; -// True if a number has a relative unit. -@function relative-unit($number) { -@return unit($number) == "%" or unit($number) == "em" or unit($number) == "rem" -} -// True if a number has an absolute unit. -@function absolute-unit($number) { -@return not (relative-unit($number) or unitless($number)); -} -@if $relative-font-sizing and not relative-unit($font-unit) { -/* line 54, numbered/compass_extract.scss */ -@warn "$relative-font-sizing is true but $font-unit is set to #{$font-unit} which is not a relative unit."; -} -// Establishes a font baseline for the given font-size. -@mixin establish-baseline($font-size: $base-font-size) { -// IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts -// whose root is set in ems. So we set the root font size in percentages of -// the default font size. -/* line 62, numbered/compass_extract.scss */ -* html { -font-size: 100% * ($font-size / $browser-default-font-size); -} -/* line 65, numbered/compass_extract.scss */ -html { -font-size: $font-size; -@include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size)); -} -} -// Resets the line-height to 1 vertical rhythm unit. -// Does not work on elements whose font-size is different from $base-font-size. -// -// @deprecated This mixin will be removed in the next release. -// Please use the `adjust-leading-to` mixin instead. -@mixin reset-baseline { -@include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size)); -} -// Show a background image that can be used to debug your alignments. -// Include the $img argument if you would rather use your own image than the -// Compass default gradient image. -@mixin debug-vertical-alignment($img: false) { -@if $img { -background: image-url($img); -} @else { -@include baseline-grid-background($base-rhythm-unit); -} -} -// Adjust a block to have a different font size and line height to maintain the -// rhythm. $lines specifies how many multiples of the baseline rhythm each line -// of this font should use up. It does not have to be an integer, but it -// defaults to the smallest integer that is large enough to fit the font. -// Use $from-size to adjust from a font-size other than the base font-size. -@mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) { -@if not $relative-font-sizing and $from-size != $base-font-size { -@warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to"; -} -font-size: $font-unit * $to-size / $from-size; -@include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size)); -} -// Adjust a block to have different line height to maintain the rhythm. -// $lines specifies how many multiples of the baseline rhythm each line of this -// font should use up. It does not have to be an integer, but it defaults to the -// smallest integer that is large enough to fit the font. -@mixin adjust-leading-to($lines, $font-size: $base-font-size) { -line-height: rhythm($lines, $font-size); -} -// Calculate rhythm units. -@function rhythm( -$lines: 1, -$font-size: $base-font-size, -$offset: 0 -/* line 117, numbered/compass_extract.scss */ -) { -@if not $relative-font-sizing and $font-size != $base-font-size { -@warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function"; -} -$rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size; -// Round the pixels down to nearest integer. -@if unit($rhythm) == px { -$rhythm: floor($rhythm); -} -@return $rhythm; -} -// Calculate the minimum multiple of rhythm units needed to contain the font-size. -@function lines-for-font-size($font-size) { -$lines: if($round-to-nearest-half-line, -ceil(2 * $font-size / $base-line-height) / 2, -ceil($font-size / $base-line-height)); -@if $lines * $base-line-height - $font-size < $min-line-padding * 2 { -$lines: $lines + if($round-to-nearest-half-line, 0.5, 1); -} -@return $lines; -} -// Apply leading whitespace. The $property can be margin or padding. -@mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) { -/* line 142, numbered/compass_extract.scss */ -#{$property}-top: rhythm($lines, $font-size); -} -// Apply leading whitespace as padding. -@mixin padding-leader($lines: 1, $font-size: $base-font-size) { -padding-top: rhythm($lines, $font-size); -} -// Apply leading whitespace as margin. -@mixin margin-leader($lines: 1, $font-size: $base-font-size) { -margin-top: rhythm($lines, $font-size); -} -// Apply trailing whitespace. The $property can be margin or padding. -@mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) { -/* line 157, numbered/compass_extract.scss */ -#{$property}-bottom: rhythm($lines, $font-size); -} -// Apply trailing whitespace as padding. -@mixin padding-trailer($lines: 1, $font-size: $base-font-size) { -padding-bottom: rhythm($lines, $font-size); -} -// Apply trailing whitespace as margin. -@mixin margin-trailer($lines: 1, $font-size: $base-font-size) { -margin-bottom: rhythm($lines, $font-size); -} -// Shorthand mixin to apply whitespace for top and bottom margins and padding. -@mixin rhythm($leader: 0, $padding-leader: 0, $padding-trailer: 0, $trailer: 0, $font-size: $base-font-size) { -@include leader($leader, $font-size); -@include padding-leader($padding-leader, $font-size); -@include padding-trailer($padding-trailer, $font-size); -@include trailer($trailer, $font-size); -} -// Apply a border and whitespace to any side without destroying the vertical -// rhythm. The whitespace must be greater than the width of the border. -@mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { -@if not $relative-font-sizing and $font-size != $base-font-size { -@warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border"; -} -/* line 184, numbered/compass_extract.scss */ -border-#{$side}: { -style: $border-style; -width: $font-unit * $width / $font-size; -}; -/* line 188, numbered/compass_extract.scss */ -padding-#{$side}: rhythm($lines, $font-size, $offset: $width); -} -// Apply borders and whitespace equally to all sides. -@mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { -@if not $relative-font-sizing and $font-size != $base-font-size { -@warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders"; -} -/* line 196, numbered/compass_extract.scss */ -border: { -style: $border-style; -width: $font-unit * $width / $font-size; -}; -padding: rhythm($lines, $font-size, $offset: $width); -} -// Apply a leading border. -@mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { -@include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style); -} -// Apply a trailing border. -@mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { -@include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style); -} -// Apply both leading and trailing borders. -@mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { -@include leading-border($width, $lines, $font-size, $border-style); -@include trailing-border($width, $lines, $font-size, $border-style); -} -// Alias for `horizontal-borders` mixin. -@mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) { -@include horizontal-borders($width, $lines, $font-size, $border-style); -} -/* line 224, numbered/compass_extract.scss */ -#test-0 { -unit: relative-unit(10px); -unit: relative-unit(50%); -rhythm: rhythm(); -size: lines-for-font-size(15px); -size: lines-for-font-size(16px); -size: lines-for-font-size(17px); -size: lines-for-font-size(27px); -size: lines-for-font-size(37px); -} -/* line 236, numbered/compass_extract.scss */ -#test-1 { -@include rhythm(5, 6, 7); -} -/* line 240, numbered/compass_extract.scss */ -#test-2 { -@include rhythm-borders; -} -/* line 244, numbered/compass_extract.scss */ -#test-3 { -@include horizontal-borders; -} \ No newline at end of file diff --git a/tests/inputs/numbered/content.scss b/tests/inputs/numbered/content.scss deleted file mode 100644 index b1c81af7..00000000 --- a/tests/inputs/numbered/content.scss +++ /dev/null @@ -1,58 +0,0 @@ -@mixin apply-to-ie6-only { -/* line 3, numbered/content.scss */ -* html { -@content; -} -} -@include apply-to-ie6-only { -/* line 8, numbered/content.scss */ -#logo { -background-image: url(/logo.gif); -} -} -$color: white; -@mixin colors($color: blue) { -background-color: $color; -@content; -border-color: $color; -} -/* line 20, numbered/content.scss */ -.colors { -@include colors { color: $color; } -} -@mixin iphone { -/* line 26, numbered/content.scss */ -@media only screen and (max-width: 480px) { -@content; -} -} -@include iphone { -/* line 32, numbered/content.scss */ -body { color: red } -} -/* line 36, numbered/content.scss */ -#sidebar { -$sidebar-width: 300px; -width: $sidebar-width; -@include iphone { -width: $sidebar-width / 3; -} -} -@mixin respond-to($width) { -/* line 46, numbered/content.scss */ -@media only screen and (min-width: $width) { @content; } -} -@include respond-to(40em) { -@for $i from 1 through 2 { -/* line 51, numbered/content.scss */ -.grid-#{$i} { width: 100%; } -} -} -@include respond-to(40em) { -$i: 1; -@while $i <= 2 { -/* line 58, numbered/content.scss */ -.grid-#{$i} { width: 100%; } -$i: $i + 1; -} -} \ No newline at end of file diff --git a/tests/inputs/numbered/content_with_function.scss b/tests/inputs/numbered/content_with_function.scss deleted file mode 100644 index e563eeb8..00000000 --- a/tests/inputs/numbered/content_with_function.scss +++ /dev/null @@ -1,15 +0,0 @@ -$test-var: true; -@mixin mixin-using-content() { -@content; -} -@function test-function($value) { -@return $value; -} -@include mixin-using-content { -@if $test-var { -/* line 13, numbered/content_with_function.scss */ -body { -padding: test-function(1 px); -} -} -} \ No newline at end of file diff --git a/tests/inputs/numbered/default_args.scss b/tests/inputs/numbered/default_args.scss deleted file mode 100644 index 922b1aca..00000000 --- a/tests/inputs/numbered/default_args.scss +++ /dev/null @@ -1,11 +0,0 @@ -@mixin cool($color: blue) { -margin: 100px; -} -@function what($height: red) { -@return $height; -} -/* line 11, numbered/default_args.scss */ -div { -height: what(); -@include cool; -} \ No newline at end of file diff --git a/tests/inputs/numbered/directives.scss b/tests/inputs/numbered/directives.scss deleted file mode 100644 index 3b7deaab..00000000 --- a/tests/inputs/numbered/directives.scss +++ /dev/null @@ -1,118 +0,0 @@ -@charset "hello-world"; -/* line 4, numbered/directives.scss */ -@page :left { -/* line 5, numbered/directives.scss */ -div { -color: red; -} -} -/* line 10, numbered/directives.scss */ -@page test { -/* line 11, numbered/directives.scss */ -@media yes { -/* line 12, numbered/directives.scss */ -div { -color: red; -} -/* line 16, numbered/directives.scss */ -@media no { -/* line 17, numbered/directives.scss */ -pre { -color: blue; -} -} -} -} -/* line 24, numbered/directives.scss */ -@media something { -/* line 25, numbered/directives.scss */ -@page { -/* line 26, numbered/directives.scss */ -@media else { -/* line 27, numbered/directives.scss */ -div { -height: 200px; -} -} -} -} -/* line 35, numbered/directives.scss */ -div { -color: red; -/* line 37, numbered/directives.scss */ -@page yeah { -/* line 38, numbered/directives.scss */ -pre { -height: 20px; -} -} -} -/* line 44, numbered/directives.scss */ -@font-face { -color: red; -height: 20px; -} -/* line 50, numbered/directives.scss */ -@keyframes 'bounce' { -/* line 51, numbered/directives.scss */ -from { -top: 100px; -animation-timing-function: ease-out; -} -/* line 56, numbered/directives.scss */ -25% { -top: 50px; -animation-timing-function: ease-in; -} -/* line 61, numbered/directives.scss */ -50% { -top: 100px; -animation-timing-function: ease-out; -} -/* line 66, numbered/directives.scss */ -75% { -top: 75px; -animation-timing-function: ease-in; -} -/* line 71, numbered/directives.scss */ -to { -top: 100px; -} -} -/* line 76, numbered/directives.scss */ -@-webkit-keyframes flowouttoleft { -/* line 77, numbered/directives.scss */ -0% { -webkit-transform: translateX(0) scale(1); } -/* line 78, numbered/directives.scss */ -60%, 70% { -webkit-transform: translateX(0) scale(.7); } -/* line 79, numbered/directives.scss */ -100% { -webkit-transform: translateX(-100%) scale(.7); } -} -/* line 82, numbered/directives.scss */ -div { -animation-name: 'diagonal-slide'; -animation-duration: 5s; -animation-iteration-count: 10; -} -/* line 88, numbered/directives.scss */ -@keyframes 'diagonal-slide' { -/* line 90, numbered/directives.scss */ -from { -left: 0; -top: 0; -} -/* line 95, numbered/directives.scss */ -to { -left: 100px; -top: 100px; -} -} -@document url(http://www.w3.org/), -url-prefix(http://www.w3.org/Style/), -domain(mozilla.org), -/* line 105, numbered/directives.scss */ -regexp("https:.*") -{ -/* line 107, numbered/directives.scss */ -body { color: purple; background: yellow; } -} \ No newline at end of file diff --git a/tests/inputs/numbered/extends.scss b/tests/inputs/numbered/extends.scss deleted file mode 100644 index 56db5c7c..00000000 --- a/tests/inputs/numbered/extends.scss +++ /dev/null @@ -1,190 +0,0 @@ -/* line 2, numbered/extends.scss */ -error, other { -border: 1px #f00; -background-color: #fdd; -} -/* line 7, numbered/extends.scss */ -pre, span { -/* line 8, numbered/extends.scss */ -seriousError { -@extend error; -font-size: 20px; -} -} -/* line 14, numbered/extends.scss */ -hello { -@extend other; -color: green; -/* line 17, numbered/extends.scss */ -div { -margin: 10px; -} -} -/* line 22, numbered/extends.scss */ -.cool { -color: red; -} -/* line 26, numbered/extends.scss */ -.blue { -color: purple; -} -/* line 30, numbered/extends.scss */ -.me { -@extend .cool, .blue; -} -/* line 34, numbered/extends.scss */ -.hoverlink { @extend a:hover } -/* line 35, numbered/extends.scss */ -a:hover { text-decoration: underline } -// partial matching and selector merging: -/* line 40, numbered/extends.scss */ -div.hello.world.hmm { -color: blue; -} -/* line 44, numbered/extends.scss */ -pre, code { -/* line 45, numbered/extends.scss */ -.okay.span { -@extend .hello; -} -} -// multiple matches per selector -/* line 51, numbered/extends.scss */ -.xxxxx .xxxxx .xxxxx { -color: green; -} -/* line 55, numbered/extends.scss */ -code { -@extend .xxxxx; -color: red; -} -// chained -/* line 63, numbered/extends.scss */ -.alpha { -color: red; -} -/* line 67, numbered/extends.scss */ -.beta { -@extend .alpha; -color: white; -} -/* line 72, numbered/extends.scss */ -.gama { -@extend .beta; -color: blue; -} -// merging selector sequences -/* line 79, numbered/extends.scss */ -#admin .tabbar a {font-weight: bold} -/* line 80, numbered/extends.scss */ -#demo .overview .fakelink {@extend a} -/* line 82, numbered/extends.scss */ -a1 b1 c1 d1 { color: red; } -/* line 83, numbered/extends.scss */ -x1 y1 z1 w1 { @extend a1; } -/* line 85, numbered/extends.scss */ -a2 b2 c2 d2 { color: red; } -/* line 86, numbered/extends.scss */ -x2 y2 z2 w2 { @extend b2; } -/* line 89, numbered/extends.scss */ -a3 b3 c3 d3 { color: red; } -/* line 90, numbered/extends.scss */ -x3 y3 z3 w3 { @extend c3; } -/* line 93, numbered/extends.scss */ -a4 b4 c4 d4 { color: red; } -/* line 94, numbered/extends.scss */ -x4 y4 z4 w4 { @extend d4; } -// removing common prefix -/* line 98, numbered/extends.scss */ -#butt .yeah .okay { font-weight: bold } -/* line 99, numbered/extends.scss */ -#butt .umm .sure { @extend .okay } -/* line 101, numbered/extends.scss */ -a9 b9 s9 t9 v9 { color: red; } -/* line 103, numbered/extends.scss */ -a9 b9 x9 y9 z9 { -@extend v9; -} -// extends & media -/* line 109, numbered/extends.scss */ -@media print { -/* line 110, numbered/extends.scss */ -horse { -color: blue; -} -} -/* line 115, numbered/extends.scss */ -man { -color: red; -@extend horse; -} -// result == match -/* line 123, numbered/extends.scss */ -wassup { -color: blue; -@extend wassup; -} -/* line 128, numbered/extends.scss */ -.foo { -/* line 129, numbered/extends.scss */ -.wassup { -@extend .wassup; -color: blue; -} -} -// multi-extend -/* line 137, numbered/extends.scss */ -#something { -color: red; -} -/* line 141, numbered/extends.scss */ -.x { -@extend #something; -} -/* line 145, numbered/extends.scss */ -.y { -@extend #something; -} -// twitter-sass-bootstrap infinite loop -/* line 151, numbered/extends.scss */ -.nav-tabs { -/* line 152, numbered/extends.scss */ -&.nav-justified { -@extend .nav-justified; -} -} -/* line 156, numbered/extends.scss */ -.nav-justified { -text-align: justify; -} -// multi-extend with nesting -.btn:hover, -.btn:active, -.btn.active, -.btn.disabled, -/* line 166, numbered/extends.scss */ -.btn[disabled] { -color: red; -} -/* line 169, numbered/extends.scss */ -.edit .actions { -/* line 170, numbered/extends.scss */ -button { -float: right; -@extend .btn; -} -} -/* line 175, numbered/extends.scss */ -.edit { -/* line 176, numbered/extends.scss */ -.new { -/* line 177, numbered/extends.scss */ -.actions { -padding: 0; -} -/* line 180, numbered/extends.scss */ -.actions button { -@extend .btn; -} -} -} \ No newline at end of file diff --git a/tests/inputs/numbered/filter_effects.scss b/tests/inputs/numbered/filter_effects.scss deleted file mode 100644 index de78aa57..00000000 --- a/tests/inputs/numbered/filter_effects.scss +++ /dev/null @@ -1,48 +0,0 @@ -/* line 1, numbered/filter_effects.scss */ -#number { --webkit-filter: grayscale(1) -sepia(0.5) -saturate(0.1) -invert(1) -opacity(0.5) -brightness(0.5) -contrast(0.5); -} -/* line 11, numbered/filter_effects.scss */ -#percentage { --webkit-filter: grayscale(100%) -sepia(50%) -saturate(10%) -invert(100%) -opacity(50%) -brightness(50%) -contrast(50%); -} -/* line 21, numbered/filter_effects.scss */ -#misc { --webkit-filter: hue-rotate(90deg) -blur(10px) -drop-shadow(10px -16px 30px purple); -} -@mixin opacity($opacity, $style: 0) { -@if ($opacity < 1) { -opacity: $opacity; -filter: alpha(opacity=$opacity * 100, style=$style); -} @else { -opacity: $opacity / 100; -filter: alpha(opacity=$opacity); -} -} -/* line 37, numbered/filter_effects.scss */ -#decimal { -@include opacity(.5, 1); -} -/* line 41, numbered/filter_effects.scss */ -#percent { -@include opacity(50); -} -/* line 45, numbered/filter_effects.scss */ -.row { -background-color: darken(#2ba6cb, 40%); -color: darken(#2ba6cb, 10%); -} \ No newline at end of file diff --git a/tests/inputs/numbered/functions.scss b/tests/inputs/numbered/functions.scss deleted file mode 100644 index 5bcc4ffe..00000000 --- a/tests/inputs/numbered/functions.scss +++ /dev/null @@ -1,77 +0,0 @@ -@function hello($x) { -@return $x + 4; -} -@function add($a, $b) { -@return $a + $b; -} -/* line 10, numbered/functions.scss */ -div { -color: hello(10px); -sum: add(11, 12); -} -// make sure values are being reduced before being passed up to previous scope -@function one($a, $b) { -@return $a $b; -} -@function two($a, $b) { -@return $a#{$a} $b; -} -@function three($a, $b: default) { -@return "hello #{$a} and #{$b}" -} -@function all($a...) { -@return "hello #{$a}" -} -/* line 33, numbered/functions.scss */ -div { -hello: one(10, 55); -hello: two(10, 55); -hello: three(10, 55); -} -@function hello_world() { -@return 1000; -} -/* line 44, numbered/functions.scss */ -del { -color: hello-world(); -} -/* line 48, numbered/functions.scss */ -div { -$args: foo bar; -hello: three($args...); -hello: three(bar...); -hello: all(Alice, Bob, Tom); -} -@function stringConcatCompassStyle($start,$last) -{ -// Compass still uses it like this -@return #{$start}-#{$last}; -} -/* line 61, numbered/functions.scss */ -.foo -{ -test2: stringConcatCompassStyle(-moz,art); -} -@mixin content_test { -/* line 67, numbered/functions.scss */ -span { -$color: green; -@content; -} -} -@function func_test($c) { -@return $c + 1; -} -/* line 77, numbered/functions.scss */ -div { -@include content_test { -height: func_test(2px); -} -} -@function test ($a, $b: $a/2) { -@return $b; -} -/* line 87, numbered/functions.scss */ -div { -width: test(4); -} \ No newline at end of file diff --git a/tests/inputs/numbered/ie7.scss b/tests/inputs/numbered/ie7.scss deleted file mode 100644 index 619d04b8..00000000 --- a/tests/inputs/numbered/ie7.scss +++ /dev/null @@ -1,13 +0,0 @@ -// http://jes.st/2013/ie7s-css-breaking-content-counter-bug/ -/* line 2, numbered/ie7.scss */ -#foo:before { -content: counter(item, ".") ": "; -} -/* line 6, numbered/ie7.scss */ -#bar:before { -content: counter(item,"."); -} -/* line 10, numbered/ie7.scss */ -#fu:before { -content: counter(item); -} \ No newline at end of file diff --git a/tests/inputs/numbered/if.scss b/tests/inputs/numbered/if.scss deleted file mode 100644 index 12cea3b2..00000000 --- a/tests/inputs/numbered/if.scss +++ /dev/null @@ -1,67 +0,0 @@ -@function conds($val) { -@if $val { -@return "red"; -} -@return "blue"; -} -/* line 10, numbered/if.scss */ -div { -@if something { -color: blue; -} -} -/* line 16, numbered/if.scss */ -pre { -val-1: conds(true); -val-2: conds(false); -val-3: conds(null); -val-4: conds(1); -val-5: conds(0); -} -/* line 25, numbered/if.scss */ -span { -@if false { -color: red; -} @else { -color: blue; -} -@if true { -height: 10px; -} @else { -color: 20px; -} -@if false { -height: 10px; -} @elseif false { -color: 20px; -} @else { -width: 20px; -} -} -/* line 47, numbered/if.scss */ -div { -@if false { -color: red; -} @else if false { -color: green; -} @else { -color: blue; -} -@if false { -border-color: red; -} @else if true { -border-color: green; -} @else { -border-color: blue; -} -} -// doesn't work in scss, thing loses scope -/* line 67, numbered/if.scss */ -del { -@if false { -$thing: yes; -} @else { -$thing: no; -} -thing: $thing; -} \ No newline at end of file diff --git a/tests/inputs/numbered/if_on_null.scss b/tests/inputs/numbered/if_on_null.scss deleted file mode 100644 index 8e47a601..00000000 --- a/tests/inputs/numbered/if_on_null.scss +++ /dev/null @@ -1,8 +0,0 @@ -@function testfunc($pseudo: null) { -$output: if($pseudo, "green", "red"); -@return $output; -} -/* line 6, numbered/if_on_null.scss */ -body { -background-color: testfunc(); -} \ No newline at end of file diff --git a/tests/inputs/numbered/import.scss b/tests/inputs/numbered/import.scss deleted file mode 100644 index e0515eb3..00000000 --- a/tests/inputs/numbered/import.scss +++ /dev/null @@ -1,20 +0,0 @@ -@import "foo.css"; -@import "foo" screen; -@import "http://foo.com/bar"; -@import url(foo); -@import "imports/simple"; -/* line 9, numbered/import.scss */ -pre { -color: red; -@import "imports/simple.scss"; -} -/* line 14, numbered/import.scss */ -code { -@import "imports/simple", "imports/simple"; -} -@import "imports/partial"; -/* line 20, numbered/import.scss */ -body { -color: $variable; -@include partial-mixin(); -} \ No newline at end of file diff --git a/tests/inputs/numbered/interpolation.scss b/tests/inputs/numbered/interpolation.scss deleted file mode 100644 index 27a51c45..00000000 --- a/tests/inputs/numbered/interpolation.scss +++ /dev/null @@ -1,97 +0,0 @@ -/* line 2, numbered/interpolation.scss */ -div { -/* line 3, numbered/interpolation.scss */ -color: red#{white} blue; -/* line 4, numbered/interpolation.scss */ -color: red #{white} blue; -/* line 5, numbered/interpolation.scss */ -color: red #{white}blue; -/* line 6, numbered/interpolation.scss */ -color: red#{white}blue; -/* line 7, numbered/interpolation.scss */ -color: #{umm}#{yeah}#{what}; -/* line 8, numbered/interpolation.scss */ -color: #{stacked}; -/* line 10, numbered/interpolation.scss */ -font-size: 10px/#{something}; -/* line 11, numbered/interpolation.scss */ -font-size: 10px / #{something}; -/* line 13, numbered/interpolation.scss */ -test: "what#{"world"}wrong"; -/* line 14, numbered/interpolation.scss */ -test: "what#{'world'}wrong"; -/* line 15, numbered/interpolation.scss */ -test: "what#{world}wrong"; -/* line 16, numbered/interpolation.scss */ -test: "what"#{world}"wrong"; -/* line 18, numbered/interpolation.scss */ -hi: "what is #{4 + 12} end" -} -// interpolation in selectors -/* line 24, numbered/interpolation.scss */ -pre { -$var: cool; -/* line 27, numbered/interpolation.scss */ -#{var} { -color: red; -} -/* line 31, numbered/interpolation.scss */ -#{var} dad { -color: red; -} -/* line 35, numbered/interpolation.scss */ -bed#{var}dad { -color: red; -} -} -/* line 40, numbered/interpolation.scss */ -cool { -@for $x from 1 through 5 { -/* line 42, numbered/interpolation.scss */ -.thing-#{$x} { -color: red; -} -} -} -/* line 48, numbered/interpolation.scss */ -a#{b}c#{d}e { -color: red; -} -/* line 52, numbered/interpolation.scss */ -##{hello}, .#{world}{ -color: red; -} -/* line 56, numbered/interpolation.scss */ -#abc#{hello}yeah, .cool#{world}yes{ -color: red; -} -$scope: 2; -/* line 62, numbered/interpolation.scss */ -div.element:nth-child(#{$scope}n) -{ -display: none; -} -// property interpolation -/* line 69, numbered/interpolation.scss */ -div { -$var: hello; -/* line 71, numbered/interpolation.scss */ -#{$var}: world; -/* line 72, numbered/interpolation.scss */ -cool#{$var}:world; -/* line 73, numbered/interpolation.scss */ -#{$var}one:world; -/* line 74, numbered/interpolation.scss */ -two#{$var}one:world; -/* line 76, numbered/interpolation.scss */ -one#{a + b}two: cool; -/* line 78, numbered/interpolation.scss */ -#{hello}: { -/* line 79, numbered/interpolation.scss */ -#{world}: red; -/* line 80, numbered/interpolation.scss */ -#{mold}: white; -/* line 81, numbered/interpolation.scss */ -#{$var}: blue; -} -} \ No newline at end of file diff --git a/tests/inputs/numbered/keyword_args.scss b/tests/inputs/numbered/keyword_args.scss deleted file mode 100644 index 49da7d33..00000000 --- a/tests/inputs/numbered/keyword_args.scss +++ /dev/null @@ -1,17 +0,0 @@ -// mixins -@mixin hello($a: one, $b:two, $c:three, $d: four) { -out: $a $b $c $d; -} -/* line 8, numbered/keyword_args.scss */ -pre { -@include hello(alpha, $d: palace, $b: fort); -} -// functions -@function cool($a, $b) { -@return $a - $b; -} -/* line 19, numbered/keyword_args.scss */ -div { -hello: cool($b: 5, $a: 10); -world: cool(5, 10); -} \ No newline at end of file diff --git a/tests/inputs/numbered/list.scss b/tests/inputs/numbered/list.scss deleted file mode 100644 index bd5282df..00000000 --- a/tests/inputs/numbered/list.scss +++ /dev/null @@ -1,14 +0,0 @@ -$list: (black); -$list: join($list, white, comma); -/* line 4, numbered/list.scss */ -div { -padding: join(10px 20px, 30px 40px); -margin: join((0, 10px), (10px, 10px), space); -background: linear-gradient($list); -} -$list: (); -$list: join($list, (red, blue), comma); -/* line 13, numbered/list.scss */ -p { -background: linear-gradient($list); -} \ No newline at end of file diff --git a/tests/inputs/numbered/looping.scss b/tests/inputs/numbered/looping.scss deleted file mode 100644 index f3d274e8..00000000 --- a/tests/inputs/numbered/looping.scss +++ /dev/null @@ -1,44 +0,0 @@ -/* line 2, numbered/looping.scss */ -div { -@each $var in what is this { -color: $var; -} -@each $var in what, is, this { -font: $var; -} -$list: what is this; -@each $var in $list { -background: $var; -} -$list: what, is, this; -@each $var in $list { -border: $var; -} -} -/* line 23, numbered/looping.scss */ -span { -$i: 0; -@while $i <= 10 { -color: $i; -$i: $i + 1; -} -} -/* line 31, numbered/looping.scss */ -pre { -@for $x from 1 to 5 { -color: $x; -} -@for $x from 1 through 5 { -height: $x; -} -$y: 10; -@for $x from $y through 3 { -cool: $x; -} -} -$j: null; -@while $j { -/* line 49, numbered/looping.scss */ -.item { width: 2em; } -$j: false; -} \ No newline at end of file diff --git a/tests/inputs/numbered/media.scss b/tests/inputs/numbered/media.scss deleted file mode 100644 index 3cf01231..00000000 --- a/tests/inputs/numbered/media.scss +++ /dev/null @@ -1,246 +0,0 @@ -// media syntax -/* line 3, numbered/media.scss */ -@media { -/* line 4, numbered/media.scss */ -div { color: blue; } -} -/* line 6, numbered/media.scss */ -@media what { -/* line 7, numbered/media.scss */ -div { color: blue; } -} -/* line 10, numbered/media.scss */ -@media (cool) { -/* line 11, numbered/media.scss */ -div { color: blue; } -} -/* line 13, numbered/media.scss */ -@media (cool: blue) { -/* line 14, numbered/media.scss */ -div { color: blue; } -} -/* line 17, numbered/media.scss */ -@media hello and (world) and (butt: man) { -/* line 18, numbered/media.scss */ -div { color: blue; } -} -$navbarCollapseWidth: 940px; -/* line 23, numbered/media.scss */ -@media (max-width: $navbarCollapseWidth) { -color: red; -} -// media bubbling -/* line 28, numbered/media.scss */ -@media not hello and (world) { -color: blue; -/* line 30, numbered/media.scss */ -pre { -color: blue; -} -/* line 34, numbered/media.scss */ -@media butt { -color: red; -/* line 36, numbered/media.scss */ -div { -color: red; -} -} -} -/* line 42, numbered/media.scss */ -@media a, b { -/* line 43, numbered/media.scss */ -@media c { -color: blue; -} -} -/* line 48, numbered/media.scss */ -@media a{ -/* line 49, numbered/media.scss */ -@media b, c { -color: blue; -} -} -/* line 54, numbered/media.scss */ -@media a, b{ -/* line 55, numbered/media.scss */ -@media c, d { -color: blue; -} -} -$media: cree; -$feature: -webkit-min-device-pixel-ratio; -$value: 1.5; -/* line 64, numbered/media.scss */ -div { -color: blue; -/* line 66, numbered/media.scss */ -@media s#{$media}n and ($feature: $value) { -/* line 67, numbered/media.scss */ -.sidebar { -width: 500px; -} -} -} -// @media + @mixin -@mixin color { -color: red; -/* line 76, numbered/media.scss */ -.success { -color: green; -} -} -/* line 81, numbered/media.scss */ -div { -position: absolute; -$y: 2em; -/* line 84, numbered/media.scss */ -@media screen { -top: 0; -$x: 5px; -/* line 87, numbered/media.scss */ -p { -margin: $x; -} -bottom: 6em + $y; -@include color; -} -} -/* line 95, numbered/media.scss */ -.button { -width: 300px; -height: 100px; -background: #eee; -/* line 100, numbered/media.scss */ -:hover { -background: #aaa; -} -/* line 104, numbered/media.scss */ -@media only screen and (max-width : 300px){ -width: 100px; -height: 100px; -} -} -/* line 110, numbered/media.scss */ -code { -position: absolute; -/* line 112, numbered/media.scss */ -@media screen { -/* line 113, numbered/media.scss */ -pre { -height: 20px; -} -height: 10px; -} -} -/* line 120, numbered/media.scss */ -dt { -/* line 121, numbered/media.scss */ -@media screen { -/* line 122, numbered/media.scss */ -@media (color: blue) { -height: 10px; -} -} -} -// nesting media queries -/* line 129, numbered/media.scss */ -@media screen { -/* line 130, numbered/media.scss */ -.screen { -width: 12px; -} -/* line 133, numbered/media.scss */ -@media only screen { -/* line 134, numbered/media.scss */ -.only-screen { -height: 11px; -} -} -} -/* line 140, numbered/media.scss */ -@media only screen { -/* line 141, numbered/media.scss */ -.only-screen { -width: 14px; -} -/* line 144, numbered/media.scss */ -@media only screen { -/* line 145, numbered/media.scss */ -.only-screen { -height: 16px; -} -} -} -/* line 151, numbered/media.scss */ -@media not screen { -/* line 152, numbered/media.scss */ -@media screen { -/* line 153, numbered/media.scss */ -.invalid { -height: 12px; -} -} -} -/* line 159, numbered/media.scss */ -@media not screen { -/* line 160, numbered/media.scss */ -@media print { -/* line 161, numbered/media.scss */ -.only-print { -height: 12px; -} -} -} -/* line 167, numbered/media.scss */ -@media screen { -/* line 168, numbered/media.scss */ -@media not print { -/* line 169, numbered/media.scss */ -.only-print { -height: 12px; -} -} -} -/* line 175, numbered/media.scss */ -@media not screen { -/* line 176, numbered/media.scss */ -@media not print { -/* line 177, numbered/media.scss */ -.invalid { -height: 12px; -} -} -} -/* line 183, numbered/media.scss */ -@media not screen { -/* line 184, numbered/media.scss */ -@media not screen { -/* line 185, numbered/media.scss */ -.not-screen { -height: 15px; -} -} -} -/* line 191, numbered/media.scss */ -@media only screen { -/* line 192, numbered/media.scss */ -@media print { -/* line 193, numbered/media.scss */ -.invalid { -height: 15px; -} -} -} -/* line 199, numbered/media.scss */ -@media only screen { -/* line 200, numbered/media.scss */ -@media screen and (color: blue) { -/* line 201, numbered/media.scss */ -@media screen and (width: 13) { -/* line 202, numbered/media.scss */ -.only-screen { -height: 15px; -} -} -} -} \ No newline at end of file diff --git a/tests/inputs/numbered/mixins.scss b/tests/inputs/numbered/mixins.scss deleted file mode 100644 index 7b5bdf35..00000000 --- a/tests/inputs/numbered/mixins.scss +++ /dev/null @@ -1,163 +0,0 @@ -@mixin something { -color: red; -/* line 4, numbered/mixins.scss */ -pre { -height: 200px; -} -} -/* line 9, numbered/mixins.scss */ -div { -color: blue; -@include something; -} -@mixin something($color) { -color: $color; -/* line 17, numbered/mixins.scss */ -div { -height: 20px; -} -} -@mixin cool($a, $b, $c) { -height: $a + $b + $c; -} -/* line 26, numbered/mixins.scss */ -span { -@include something(blue); -} -/* line 30, numbered/mixins.scss */ -html { -@include cool(10px, 12px, 21px); -} -@mixin hello_world { -height: 20px; -} -/* line 39, numbered/mixins.scss */ -del { -@include hello-world; -} -// variable shadowing -$color: white; -@mixin colors($color: blue) { -color: $color; -} -/* line 52, numbered/mixins.scss */ -div { -color: $color; -@include colors(); -color: $color; -} -@mixin linear-gradient($from, $to, $pos: left top) { -background-image: linear-gradient($pos, $from, $to); -} -/* line 62, numbered/mixins.scss */ -div { -@include linear-gradient(red, green); -} -@mixin box-shadow($shadows...) { --moz-box-shadow: $shadows; --webkit-box-shadow: $shadows; -box-shadow: $shadows; -} -/* line 72, numbered/mixins.scss */ -div { -@include box-shadow(10px 10px 5px #888); -@include box-shadow(inset 10px 10px #888, -10px -10px #f4f4f4); -} -@mixin nested { -@include something(red); -} -/* line 81, numbered/mixins.scss */ -div { -/* line 82, numbered/mixins.scss */ -p { -/* line 83, numbered/mixins.scss */ -.class { -@include nested; -} -@include nested; -/* line 89, numbered/mixins.scss */ -.top { -top: 0; -/* line 92, numbered/mixins.scss */ -div { -color: red; -} -} -color: blue; -} -} -// mixin content (http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixin-content) -@mixin content-simple { -/* line 103, numbered/mixins.scss */ -div.mixin-content-simple { -@content; -} -} -@mixin content-with-arg ( $background ) { -/* line 109, numbered/mixins.scss */ -div.mixin-content-with-arg { -background: $background; -@content; -} -} -@include content-simple { -color: red; -} -@include content-with-arg($background: blue) { -color: red; -} -@include content-with-arg($background: purple) { -@include hello_world; -} -@include content-simple { -@include cool(10px, 12px, 21px); -} -@include content-simple { -@include something(orange); -} -@include content-with-arg($background: purple) { -@include cool(10px, 12px, 21px); -} -@include content-with-arg($background: purple) { -@include something(orange); -} -@mixin wallpaper($image, $top: 0, $right: 0, $bottom: 0, $left: 0) { -background: $image; -position: absolute; -top: $top; -right: $right; -bottom: $bottom; -left: $left; -} -@mixin logo($offsets...) { -@include wallpaper(url(/images/logo.png), $offsets...); -} -/* line 156, numbered/mixins.scss */ -#please-wait { -@include logo(1em, $left: 4em, $bottom: 3em); -} -@mixin prefixer($property, $value) { -/* line 161, numbered/mixins.scss */ --webkit-#{$property}: $value; -} -@mixin transform($property: none) { -@include prefixer(transform, $property); -} -/* line 168, numbered/mixins.scss */ -div.parameter-name-scope { -@include transform(translateX(50px)); -} -@mixin keyframes( $name ) -{ -/* line 174, numbered/mixins.scss */ -@-webkit-keyframes $name { -@content; -} -} -@include keyframes( change-color ) -{ -/* line 181, numbered/mixins.scss */ -0% { color: green; } -/* line 182, numbered/mixins.scss */ -100% { color: red; } -} \ No newline at end of file diff --git a/tests/inputs/numbered/nesting.scss b/tests/inputs/numbered/nesting.scss deleted file mode 100644 index 05c25513..00000000 --- a/tests/inputs/numbered/nesting.scss +++ /dev/null @@ -1,40 +0,0 @@ -/* line 3, numbered/nesting.scss */ -body { -color: red; -} -/* line 8, numbered/nesting.scss */ -div { -color: red; -height: yes; -/* line 12, numbered/nesting.scss */ -pre { -color: blue; -} -} -div: blue; -/* line 21, numbered/nesting.scss */ -div { -/* line 22, numbered/nesting.scss */ -font: 10px hello world { -size: 10px; -color: blue; -} -/* line 27, numbered/nesting.scss */ -border: { -left: 1px solid blue; -right: 2px dashed green; -} -} -/* line 34, numbered/nesting.scss */ -#nested-nesting { -bar: baz; -/* line 36, numbered/nesting.scss */ -bang: { -bop: bar; -bip: 1px; -/* line 39, numbered/nesting.scss */ -blat: { -baf: bort -} -} -} \ No newline at end of file diff --git a/tests/inputs/numbered/null.scss b/tests/inputs/numbered/null.scss deleted file mode 100644 index 80eaa691..00000000 --- a/tests/inputs/numbered/null.scss +++ /dev/null @@ -1,46 +0,0 @@ -$list: null; -/* line 2, numbered/null.scss */ -.div { -one: null; -one: null world; -one: NULL world; -one: a null, b; -two: a $list $list, $list, b; -three: $list; -} -$value: null; -/* line 12, numbered/null.scss */ -p:before { -/* line 13, numbered/null.scss */ -content: "I ate #{$value} pies!"; -} -@mixin Rounded($radius1, $direction: null, $radius2: false) { -$corner: null; -@if $direction == TL { $corner: top-left-; } -@if $direction == TR { $corner: top-right-; } -@if $direction == BL { $corner: bottom-left-; } -@if $direction == BR { $corner: bottom-right-; } -@if $radius2 { -/* line 23, numbered/null.scss */ --webkit-border-#{$corner}radius: $radius1 $radius2; -/* line 24, numbered/null.scss */ -border-#{$corner}radius: $radius1 $radius2; -} @else { -/* line 26, numbered/null.scss */ --webkit-border-#{$corner}radius: $radius1; -/* line 27, numbered/null.scss */ -border-#{$corner}radius: $radius1; -} -} -/* line 31, numbered/null.scss */ -.foo { -@include Rounded(10); -} -/* line 35, numbered/null.scss */ -.fu { -@include Rounded(20, null); -} -/* line 39, numbered/null.scss */ -.bar { -@include Rounded(30, TL); -} \ No newline at end of file diff --git a/tests/inputs/numbered/operators.scss b/tests/inputs/numbered/operators.scss deleted file mode 100644 index 85f6e6b2..00000000 --- a/tests/inputs/numbered/operators.scss +++ /dev/null @@ -1,167 +0,0 @@ -/* line 3, numbered/operators.scss */ -body { -color: 1 + 2 + 5; -color: 1 + 2 * 5 + 5; -height: 10px/10px; -color: 10px/2 + 1; -color: (10px/2); -bottom: (4/2px); -top: 1em * (1 * 24px - 0) / 16px; -left: 1 - 2cm; -top: (2cm/12px); -} -/* line 15, numbered/operators.scss */ -div { -color: 4 == 3; -color: hello == hello; -color: 4 > 3; -color: 4 < 3; -color: what > 3; -} -/* line 25, numbered/operators.scss */ -#units { -test: 1in + 4cm; -test: 12mm + 1; -test: 1 + 3em; -test: 1mm + 1cm; -test: 1cm + 1mm; -} -/* line 33, numbered/operators.scss */ -#modulo { -test: 3 % 2; -test: 4cm % 3; -} -/* line 38, numbered/operators.scss */ -#colors { -color: red + rgb(1,2,3); -color: red - rgb(1,2,3); -color: rgba(1,2,3, 0.5) * rgba(3,4,5, 0.5); -color: rgba(10,15,20, 0.5) / rgba(2,2,2, 0.5); -color: rgba(1,2,3, 0.5) * 2; -color: rgba(1,2,3, 0.5) / 2; -color: rgba(1,2,3, 0.5) + 2; -color: rgba(1,2,3, 0.5) - 2; -color: blue + 34; -color: #fff == #000; -color: #fff == #fff; -color: #fff != #000; -color: #fff != #fff; -} -/* line 59, numbered/operators.scss */ -#preserve { -hello: what -going; -hello: what - going; -} -/* line 64, numbered/operators.scss */ -#strings { -hello: what -going; -hello: what +going; -hello: what+going; -hello: what+ going; -hello: what + going; -hello: "what" + going; -hello: going + "what"; -hello: "what" + "what"; -} -/* line 77, numbered/operators.scss */ -#negation { -$num: 100; -a: -$num + 40; -b: 10 -$num; -b: 10 - $num; -} -/* line 84, numbered/operators.scss */ -#bools-fail { -and: false and two; -and: one and two; -and: one and false; -or: false or two; -or: one or two; -or: one or false; -} -/* line 94, numbered/operators.scss */ -#bools { -and: (false and two); -and: (one and two); -and: (one and false); -or: (false or two); -or: (one or two); -or: (one or false); -} -/* line 105, numbered/operators.scss */ -#nots-fail { -not: not true + 2; -not: not false; -not: not 0; -not: not 1; -not: not ""; -not: not hello; -} -/* line 114, numbered/operators.scss */ -#nots { -not: (not true) + 2; -not: (not false); -not: (not 0); -not: (not 1); -not: (not ""); -not: (not hello); -} -/* line 123, numbered/operators.scss */ -#string-test { -str: hi == "hi"; -str: hi == "no"; -str: 'yes' == 'yes'; -$var1: "hello"; -$var2: hello; -/* line 131, numbered/operators.scss */ -str: "#{$var1}" == '#{$var2}'; -/* line 133, numbered/operators.scss */ -str: xhello#{$var1}x == "x#{$var2}hellox"; // xhellohellofalse -str: unit(10px) == px; -} -/* line 139, numbered/operators.scss */ -#special { -cancel-unit: (10px / 10px); -} -// not expecting unary -$form-spacing: 1em; -/* line 146, numbered/operators.scss */ -.row .a { margin: 0-$form-spacing / 2; } -/* line 147, numbered/operators.scss */ -.row .b { margin: 0- $form-spacing / 2; } -/* line 148, numbered/operators.scss */ -.row .c { margin: 0 - $form-spacing / 2; } -/* line 149, numbered/operators.scss */ -.row .d { margin: 0 -$form-spacing / 2; } -/* line 150, numbered/operators.scss */ -.row .e { margin: 0 (-$form-spacing / 2); } -/* line 152, numbered/operators.scss */ -.alt .a { margin: 0-1em / 2; } -/* line 153, numbered/operators.scss */ -.alt .b { margin: 0- 1em / 2; } -/* line 154, numbered/operators.scss */ -.alt .c { margin: 0 - 1em / 2; } -/* line 155, numbered/operators.scss */ -.alt .d { margin: 0 -1em / 2; } -/* line 156, numbered/operators.scss */ -.alt .e { margin: 0 (-1em / 2); } -/* line 158, numbered/operators.scss */ -.row .f { margin: 0-$form-spacing * 2; } -/* line 159, numbered/operators.scss */ -.row .g { margin: 0- $form-spacing * 2; } -/* line 160, numbered/operators.scss */ -.row .h { margin: 0 - $form-spacing * 2; } -/* line 161, numbered/operators.scss */ -.row .i { margin: 0 -$form-spacing * 2; } -/* line 162, numbered/operators.scss */ -.row .j { margin: 0 (-$form-spacing * 2); } -/* line 164, numbered/operators.scss */ -.alt .f { margin: 0-1em * 2; } -/* line 165, numbered/operators.scss */ -.alt .g { margin: 0- 1em * 2; } -/* line 166, numbered/operators.scss */ -.alt .h { margin: 0 - 1em * 2; } -/* line 167, numbered/operators.scss */ -.alt .i { margin: 0 -1em * 2; } -/* line 168, numbered/operators.scss */ -.alt .j { margin: 0 (-1em * 2); } \ No newline at end of file diff --git a/tests/inputs/numbered/parsing_comments.scss b/tests/inputs/numbered/parsing_comments.scss deleted file mode 100644 index c76654dd..00000000 --- a/tests/inputs/numbered/parsing_comments.scss +++ /dev/null @@ -1,60 +0,0 @@ -/* comment 1 */ -/* line 2, numbered/parsing_comments.scss */ -a { -/* comment 2 */ -color: red; /* comment 3 */ -/* comment 4 */ -} -/* comment 5 */ -/*! comment 1 */ -/* line 10, numbered/parsing_comments.scss */ -b { -/*! comment 2 */ -color: red; /*! comment 3 */ -/*! comment 4 */ -} -/*! comment 5 */ -/* -* multi-line comment 1 -*/ -/* line 20, numbered/parsing_comments.scss */ -c { -/* -* multi-line comment 2 -*/ -color: red; /* -* multi-line comment 3 -*/ -/* -* multi-line comment 4 -*/ -} -/* -* multi-line comment 5 -*/ -/*! -* multi-line comment 1 -*/ -/* line 38, numbered/parsing_comments.scss */ -d { -/*! -* multi-line comment 2 -*/ -color: red; /*! -* multi-line comment 3 -*/ -/*! -* multi-line comment 4 -*/ -} -/*! -* multi-line comment 5 -*/ -// comment 1 -/* line 54, numbered/parsing_comments.scss */ -e { -// comment 2 -color: red; // comment 3 -// comment 4 -} -// comment 5 \ No newline at end of file diff --git a/tests/inputs/numbered/placeholder_selector.scss b/tests/inputs/numbered/placeholder_selector.scss deleted file mode 100644 index eb7e86f6..00000000 --- a/tests/inputs/numbered/placeholder_selector.scss +++ /dev/null @@ -1,19 +0,0 @@ -/* line 1, numbered/placeholder_selector.scss */ -#context a%extreme span { -color: blue; -font-weight: bold; -font-size: 2em; -} -/* line 7, numbered/placeholder_selector.scss */ -.notice, .error { @extend %extreme; } -/* line 9, numbered/placeholder_selector.scss */ -.hidden %placeholder { -margin: 0; -} -/* line 13, numbered/placeholder_selector.scss */ -p { -@extend #context; -padding: 2em; -} -/* line 18, numbered/placeholder_selector.scss */ -div { @extend .hidden; } \ No newline at end of file diff --git a/tests/inputs/numbered/scss_css.scss b/tests/inputs/numbered/scss_css.scss deleted file mode 100644 index 660fe237..00000000 --- a/tests/inputs/numbered/scss_css.scss +++ /dev/null @@ -1,765 +0,0 @@ -/* line 1, numbered/scss_css.scss */ -[foo~=bar] { -a: b; } -/* line 5, numbered/scss_css.scss */ -[foo^=bar] { -a: b; } -/* line 9, numbered/scss_css.scss */ -[foo$=bar] { -a: b; } -/* line 13, numbered/scss_css.scss */ -[foo*=bar] { -a: b; } -/* line 17, numbered/scss_css.scss */ -[foo|=en] { -a: b; } -/* line 21, numbered/scss_css.scss */ -foo { -a: 2; -b: 2.3em; -c: 50%; -d: "fraz bran"; -e: flanny-blanny-blan; -f: url(http://sass-lang.com); -// g: U+ffa?; -h: #aabbcc; } -/* line 32, numbered/scss_css.scss */ -selector { -property: value; -property2: value; } -/* line 37, numbered/scss_css.scss */ -sel{p:v} -/* line 39, numbered/scss_css.scss */ -.foo { -/* Foo -Bar -Baz */ -a: b; } -/* line 46, numbered/scss_css.scss */ -.foo { -/* Foo -Bar -Baz */ -a: b; } -.foo {/* Foo -Bar */ -a: b; } -.foo {/* Foo -Bar -Baz */ -a: b; } -/* line 64, numbered/scss_css.scss */ -@foo { -/* line 65, numbered/scss_css.scss */ -rule { -a: b; } -a: b; } -/* line 71, numbered/scss_css.scss */ -@foo {a:b}; -/* line 72, numbered/scss_css.scss */ -@bar {a:b}; -@foo "bar" -/* line 77, numbered/scss_css.scss */ -foo { -a: 12px calc(100%/3 - 2*1em - 2*1px); -b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); -b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); -b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } -/* line 84, numbered/scss_css.scss */ -foo {bar: baz} - -baz {bar: baz} -/* -* foo -*/ -/* line 94, numbered/scss_css.scss */ -bar {baz: bang} -/* line 97, numbered/scss_css.scss */ -E, F { -a: b; } -/* line 101, numbered/scss_css.scss */ -E F, G H { -a: b; } -/* line 105, numbered/scss_css.scss */ -E > F, G > H { -a: b; } -/* This is a CSS comment. */ -.one {color: green;} /* Another comment */ -/* The following should not be used: -.two {color: red;} */ -.three {color: green; /* color: red; */} -/** -.four {color: red;} */ -/* line 116, numbered/scss_css.scss */ -.five {color: green;} -/**/ -/* line 118, numbered/scss_css.scss */ -.six {color: green;} -/*********/ -/* line 120, numbered/scss_css.scss */ -.seven {color: green;} -/* a comment **/ -/* line 122, numbered/scss_css.scss */ -.eight {color: green;} -/* line 125, numbered/scss_css.scss */ -foo { -a: \foo bar; -b: foo\ bar; -c: \2022 \0020; -d: foo\\bar; -e: foo\"\'bar; } -/* line 133, numbered/scss_css.scss */ -foo { -a: "\foo bar"; -b: "foo\ bar"; -c: "\2022 \0020"; -d: "foo\\bar"; -e: "foo\"'bar"; } -/* line 141, numbered/scss_css.scss */ -foo { -_name: val; -*name: val; -:name: val; -.name: val; -#name: val; -name/**/: val; -name/*\**/: val; -name: val; } -@foo "bar" ; -/* line 154, numbered/scss_css.scss */ -foo { -a: -moz-element(#foo); -b: -webkit-element(#foo); -b: -foobar-element(#foo); } -/* line 160, numbered/scss_css.scss */ -@foo {} -/* line 162, numbered/scss_css.scss */ -@foo { -} -@foo; -/* line 168, numbered/scss_css.scss */ -foo {;;;; -bar: baz;;;; -;;} -/* line 173, numbered/scss_css.scss */ -#foo .bar {} -/* line 175, numbered/scss_css.scss */ -#foo .bar { -} -/* line 179, numbered/scss_css.scss */ -0% { -a: b; } -/* line 183, numbered/scss_css.scss */ -60% { -a: b; } -/* line 187, numbered/scss_css.scss */ -100% { -a: b; } -/* line 191, numbered/scss_css.scss */ -12px { -a: b; } -/* line 195, numbered/scss_css.scss */ -"foo" { -a: b; } -/* line 199, numbered/scss_css.scss */ -foo { -/* line 200, numbered/scss_css.scss */ -a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 203, numbered/scss_css.scss */ -:foo("bar") { -a: b; } -/* line 207, numbered/scss_css.scss */ -:foo(bar) { -a: b; } -/* line 211, numbered/scss_css.scss */ -:foo(12px) { -a: b; } -/* line 215, numbered/scss_css.scss */ -:foo(+) { -a: b; } -/* line 219, numbered/scss_css.scss */ -:foo(-) { -a: b; } -/* line 223, numbered/scss_css.scss */ -:foo(+"bar") { -a: b; } -/* line 227, numbered/scss_css.scss */ -:foo(-++--baz-"bar"12px) { -a: b; } -/* line 231, numbered/scss_css.scss */ -foo { -a: foo-bar(12); -b: -foo-bar-baz(13, 14 15); } -@import "foo.css"; -@import 'foo.css'; -@import url("foo.css"); -@import url('foo.css'); -@import url(foo.css); -@import "foo.css" screen; -@import "foo.css" screen, print; -@import "foo.css" screen, print and (foo: 0); -@import "foo.css" screen, only print, screen and (foo: 0); -/* line 254, numbered/scss_css.scss */ -foo { -a: foo !important; -b: foo bar !important; -b: foo, bar !important; } -/* line 260, numbered/scss_css.scss */ -foo { -a: -moz-bar-baz; -b: foo -o-bar-baz; } -foo {a: /* b; c: */ d} -foo {a /*: b; c */: d} -/* Foo -* Bar */ -/* line 275, numbered/scss_css.scss */ -.foo { -/* Foo -* Bar */ } -/* line 280, numbered/scss_css.scss */ -[foo] { -a: b; } -/* line 284, numbered/scss_css.scss */ -[foo="bar"] { -a: b; } -/* line 288, numbered/scss_css.scss */ -[foo~="bar"] { -a: b; } -/* line 292, numbered/scss_css.scss */ -[foo^="bar"] { -a: b; } -/* line 296, numbered/scss_css.scss */ -[foo$="bar"] { -a: b; } -/* line 300, numbered/scss_css.scss */ -[foo*="bar"] { -a: b; } -/* line 304, numbered/scss_css.scss */ -[foo|="en"] { -a: b; } -/* line 308, numbered/scss_css.scss */ -:root { -a: b; } -/* line 312, numbered/scss_css.scss */ -:nth-child(n) { -a: b; } -/* line 316, numbered/scss_css.scss */ -:nth-last-child(n) { -a: b; } -/* line 320, numbered/scss_css.scss */ -:nth-of-type(n) { -a: b; } -/* line 324, numbered/scss_css.scss */ -:nth-last-of-type(n) { -a: b; } -/* line 328, numbered/scss_css.scss */ -:first-child { -a: b; } -/* line 332, numbered/scss_css.scss */ -:last-child { -a: b; } -/* line 336, numbered/scss_css.scss */ -:first-of-type { -a: b; } -/* line 340, numbered/scss_css.scss */ -:last-of-type { -a: b; } -/* line 344, numbered/scss_css.scss */ -:only-child { -a: b; } -/* line 348, numbered/scss_css.scss */ -:only-of-type { -a: b; } -/* line 352, numbered/scss_css.scss */ -:empty { -a: b; } -/* line 356, numbered/scss_css.scss */ -:link { -a: b; } -/* line 360, numbered/scss_css.scss */ -:visited { -a: b; } -/* line 364, numbered/scss_css.scss */ -:active { -a: b; } -/* line 368, numbered/scss_css.scss */ -:hover { -a: b; } -/* line 372, numbered/scss_css.scss */ -:focus { -a: b; } -/* line 376, numbered/scss_css.scss */ -:target { -a: b; } -/* line 380, numbered/scss_css.scss */ -:lang(fr) { -a: b; } -/* line 384, numbered/scss_css.scss */ -:enabled { -a: b; } -/* line 388, numbered/scss_css.scss */ -:disabled { -a: b; } -/* line 392, numbered/scss_css.scss */ -:checked { -a: b; } -/* line 396, numbered/scss_css.scss */ -::first-line { -a: b; } -/* line 400, numbered/scss_css.scss */ -::first-letter { -a: b; } -/* line 404, numbered/scss_css.scss */ -::before { -a: b; } -/* line 408, numbered/scss_css.scss */ -::after { -a: b; } -/* line 412, numbered/scss_css.scss */ -.warning { -a: b; } -/* line 416, numbered/scss_css.scss */ -#myid { -a: b; } -/* line 420, numbered/scss_css.scss */ -:not(s) { -a: b; } -/* line 424, numbered/scss_css.scss */ -@media all { -/* line 425, numbered/scss_css.scss */ -rule1 { -prop: val; } -/* line 428, numbered/scss_css.scss */ -rule2 { -prop: val; } } -/* line 432, numbered/scss_css.scss */ -@media screen, print { -/* line 433, numbered/scss_css.scss */ -rule1 { -prop: val; } -/* line 436, numbered/scss_css.scss */ -rule2 { -prop: val; } } -/* line 440, numbered/scss_css.scss */ -@media screen and (-webkit-min-device-pixel-ratio:0) { -a: b; } -/* line 444, numbered/scss_css.scss */ -@media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { -a: b; } -/* line 448, numbered/scss_css.scss */ -:-moz-any(h1, h2, h3) { -a: b; } -/* line 452, numbered/scss_css.scss */ -:-moz-any(.foo) { -a: b; } -/* line 456, numbered/scss_css.scss */ -:-moz-any(foo bar, .baz > .bang) { -a: b; } -@-moz-document url(http://www.w3.org/), -url-prefix(http://www.w3.org/Style/), -domain(mozilla.org), -/* line 463, numbered/scss_css.scss */ -regexp("^https:.*") { -/* line 464, numbered/scss_css.scss */ -.foo {a: b} -} -/* line 468, numbered/scss_css.scss */ -foo { -filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); -filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } -/* line 473, numbered/scss_css.scss */ -foo { -filter: alpha(opacity=20); -filter: alpha(opacity=20, enabled=true); -filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } -/* line 479, numbered/scss_css.scss */ -@foo bar { -a: b; } -/* line 482, numbered/scss_css.scss */ -@bar baz { -c: d; } -@foo bar; -@bar baz; -/* Foo -* Bar */ -/* Baz -* Bang */ -/* line 496, numbered/scss_css.scss */ -.foo { -/* Foo -* Bar */ -/* Baz -* Bang */ } -/* line 503, numbered/scss_css.scss */ -.foo { -/* Foo Bar *//* Baz Bang */ } -@namespace "http://www.w3.org/Profiles/xhtml1-strict"; -@namespace url(http://www.w3.org/Profiles/xhtml1-strict); -@namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); -/* line 513, numbered/scss_css.scss */ -[foo|bar=baz] { -a: b; } -/* line 517, numbered/scss_css.scss */ -[*|bar=baz] { -a: b; } -/* line 521, numbered/scss_css.scss */ -[foo|bar|=baz] { -a: b; } -/* line 525, numbered/scss_css.scss */ -foo|E { -a: b; } -/* line 529, numbered/scss_css.scss */ -*|E { -a: b; } -/* line 533, numbered/scss_css.scss */ -foo|* { -a: b; } -/* line 537, numbered/scss_css.scss */ -*|* { -a: b; } -/* line 541, numbered/scss_css.scss */ -:not(foo|bar) { -a: b; } -/* line 545, numbered/scss_css.scss */ -:not(*|bar) { -a: b; } -/* line 549, numbered/scss_css.scss */ -:not(foo|*) { -a: b; } -/* line 553, numbered/scss_css.scss */ -:not(*|*) { -a: b; } -/* line 557, numbered/scss_css.scss */ -:not(#blah) { -a: b; } -/* line 561, numbered/scss_css.scss */ -:not(.blah) { -a: b; } -/* line 565, numbered/scss_css.scss */ -:not([foo]) { -a: b; } -/* line 569, numbered/scss_css.scss */ -:not([foo^="bar"]) { -a: b; } -/* line 573, numbered/scss_css.scss */ -:not([baz|foo~="bar"]) { -a: b; } -/* line 577, numbered/scss_css.scss */ -:not(:hover) { -a: b; } -/* line 581, numbered/scss_css.scss */ -:not(:nth-child(2n + 3)) { -a: b; } -/* line 585, numbered/scss_css.scss */ -:not(:not(#foo)) { -a: b; } -/* line 589, numbered/scss_css.scss */ -:not(a#foo.bar) { -a: b; } -/* line 593, numbered/scss_css.scss */ -:not(#foo .bar > baz) { -a: b; } -/* line 597, numbered/scss_css.scss */ -:not(h1, h2, h3) { -a: b; } -@mixin foo { -a: b; } -/* line 605, numbered/scss_css.scss */ -foo { -/* line 606, numbered/scss_css.scss */ -a: "bang #{1 + " bar "} bip"; } -/* line 609, numbered/scss_css.scss */ -:nth-child(-n) { -a: b; } -/* line 613, numbered/scss_css.scss */ -:nth-child(+n) { -a: b; } -/* line 617, numbered/scss_css.scss */ -:nth-child(even) { -a: b; } -/* line 621, numbered/scss_css.scss */ -:nth-child(odd) { -a: b; } -/* line 625, numbered/scss_css.scss */ -:nth-child(50) { -a: b; } -/* line 629, numbered/scss_css.scss */ -:nth-child(-50) { -a: b; } -/* line 633, numbered/scss_css.scss */ -:nth-child(+50) { -a: b; } -/* line 637, numbered/scss_css.scss */ -:nth-child(2n+3) { -a: b; } -/* line 641, numbered/scss_css.scss */ -:nth-child(2n-3) { -a: b; } -/* line 645, numbered/scss_css.scss */ -:nth-child(+2n-3) { -a: b; } -/* line 649, numbered/scss_css.scss */ -:nth-child(-2n+3) { -a: b; } -/* line 653, numbered/scss_css.scss */ -:nth-child(-2n+ 3) { -a: b; } -/* line 657, numbered/scss_css.scss */ -:nth-child( 2n + 3 ) { -a: b; } -/* line 661, numbered/scss_css.scss */ -foo { -a: foo bar baz; -b: foo, #aabbcc, -12; -c: 1px/2px/-3px; -d: foo bar, baz/bang; } -/* line 668, numbered/scss_css.scss */ -@page { -prop1: val; -prop2: val; } -/* line 673, numbered/scss_css.scss */ -@page flap { -prop1: val; -prop2: val; } -/* line 678, numbered/scss_css.scss */ -@page :first { -prop1: val; -prop2: val; } -/* line 683, numbered/scss_css.scss */ -@page flap:first { -prop1: val; -prop2: val; } -/* line 688, numbered/scss_css.scss */ -.foo { -/* Foo */ -a: b; } -/* line 693, numbered/scss_css.scss */ -.foo { -/* Foo -* Bar */a: b; } -/* Foo */ -/* line 699, numbered/scss_css.scss */ -.foo { -a: b; } -/* Foo -* Bar */.foo { -a: b; } -.foo /* .a #foo */ #bar:baz(/* bang )*/ bip) { -a: b; } -/* line 712, numbered/scss_css.scss */ -> E { -a: b; } -/* line 716, numbered/scss_css.scss */ -+ E { -a: b; } -/* line 720, numbered/scss_css.scss */ -~ E { -a: b; } -/* line 724, numbered/scss_css.scss */ -> > E { -a: b; } -/* line 728, numbered/scss_css.scss */ ->> E { -a: b; } -/* line 732, numbered/scss_css.scss */ -E* { -a: b; } -/* line 736, numbered/scss_css.scss */ -E*.foo { -a: b; } -/* line 740, numbered/scss_css.scss */ -E*:hover { -a: b; } -E, -/* line 745, numbered/scss_css.scss */ -F { -a: b; } -E -/* line 750, numbered/scss_css.scss */ -F { -a: b; } -E, F -/* line 755, numbered/scss_css.scss */ -G, H { -a: b; } -/* line 759, numbered/scss_css.scss */ -body { -/* -//comment here -*/ -} -/* line 766, numbered/scss_css.scss */ -E>F { a: b;} -/* line 768, numbered/scss_css.scss */ -E~F { a: b;} -/* line 770, numbered/scss_css.scss */ -E+F { a: b;} -/* line 772, numbered/scss_css.scss */ -* { -a: b; } -/* line 776, numbered/scss_css.scss */ -E { -a: b; } -/* line 780, numbered/scss_css.scss */ -E[foo] { -a: b; } -/* line 784, numbered/scss_css.scss */ -E[foo="bar"] { -a: b; } -/* line 788, numbered/scss_css.scss */ -E[foo~="bar"] { -a: b; } -/* line 792, numbered/scss_css.scss */ -E[foo^="bar"] { -a: b; } -/* line 796, numbered/scss_css.scss */ -E[foo$="bar"] { -a: b; } -/* line 800, numbered/scss_css.scss */ -E[foo*="bar"] { -a: b; } -/* line 804, numbered/scss_css.scss */ -E[foo|="en"] { -a: b; } -/* line 808, numbered/scss_css.scss */ -E:root { -a: b; } -/* line 812, numbered/scss_css.scss */ -E:nth-child(n) { -a: b; } -/* line 816, numbered/scss_css.scss */ -E:nth-last-child(n) { -a: b; } -/* line 820, numbered/scss_css.scss */ -E:nth-of-type(n) { -a: b; } -/* line 824, numbered/scss_css.scss */ -E:nth-last-of-type(n) { -a: b; } -/* line 828, numbered/scss_css.scss */ -E:first-child { -a: b; } -/* line 832, numbered/scss_css.scss */ -E:last-child { -a: b; } -/* line 836, numbered/scss_css.scss */ -E:first-of-type { -a: b; } -/* line 840, numbered/scss_css.scss */ -E:last-of-type { -a: b; } -/* line 844, numbered/scss_css.scss */ -E:only-child { -a: b; } -/* line 848, numbered/scss_css.scss */ -E:only-of-type { -a: b; } -/* line 852, numbered/scss_css.scss */ -E:empty { -a: b; } -/* line 856, numbered/scss_css.scss */ -E:link { -a: b; } -/* line 860, numbered/scss_css.scss */ -E:visited { -a: b; } -/* line 864, numbered/scss_css.scss */ -E:active { -a: b; } -/* line 868, numbered/scss_css.scss */ -E:hover { -a: b; } -/* line 872, numbered/scss_css.scss */ -E:focus { -a: b; } -/* line 876, numbered/scss_css.scss */ -E:target { -a: b; } -/* line 880, numbered/scss_css.scss */ -E:lang(fr) { -a: b; } -/* line 884, numbered/scss_css.scss */ -E:enabled { -a: b; } -/* line 888, numbered/scss_css.scss */ -E:disabled { -a: b; } -/* line 892, numbered/scss_css.scss */ -E:checked { -a: b; } -/* line 896, numbered/scss_css.scss */ -E::first-line { -a: b; } -/* line 900, numbered/scss_css.scss */ -E::first-letter { -a: b; } -/* line 904, numbered/scss_css.scss */ -E::before { -a: b; } -/* line 908, numbered/scss_css.scss */ -E::after { -a: b; } -/* line 912, numbered/scss_css.scss */ -E.warning { -a: b; } -/* line 916, numbered/scss_css.scss */ -E#myid { -a: b; } -/* line 920, numbered/scss_css.scss */ -E:not(s) { -a: b; } -/* line 924, numbered/scss_css.scss */ -E F { -a: b; } -/* line 928, numbered/scss_css.scss */ -E > F { -a: b; } -/* line 932, numbered/scss_css.scss */ -E + F { -a: b; } -/* line 936, numbered/scss_css.scss */ -E ~ F { -a: b; } -/* line 940, numbered/scss_css.scss */ -@supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { -/* line 941, numbered/scss_css.scss */ -.foo { -a: b; -} -} -/* line 947, numbered/scss_css.scss */ -@-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { -/* line 948, numbered/scss_css.scss */ -.foo { -a: b; -} -} -/* line 954, numbered/scss_css.scss */ -foo { -foo: bar; -#baz: bang; -#bip: bop; } -/* line 960, numbered/scss_css.scss */ -foo { -a: -2; -b: -2.3em; -c: -50%; -d: -foo(bar baz); } -/* line 967, numbered/scss_css.scss */ -foo { -a: -0.5em; -b: +0.5em; -c: -foo(12px); -d: +foo(12px); -} -@charset "UTF-8"; -/* line 977, numbered/scss_css.scss */ -foo { --moz-foo-bar: blat; --o-flat-blang: wibble; } -/* line 982, numbered/scss_css.scss */ -foo { -a: foo(); -b: bar baz-bang() bip; } \ No newline at end of file diff --git a/tests/inputs/numbered/selectors.scss b/tests/inputs/numbered/selectors.scss deleted file mode 100644 index 1477ea81..00000000 --- a/tests/inputs/numbered/selectors.scss +++ /dev/null @@ -1,289 +0,0 @@ -/* line 1, numbered/selectors.scss */ -* { color: blue; } -/* line 2, numbered/selectors.scss */ -E { color: blue; } -/* line 4, numbered/selectors.scss */ -E:not(:link) { color: blue; } -/* line 5, numbered/selectors.scss */ -E:not(:link):not(:visited) { color: blue; } -/* line 6, numbered/selectors.scss */ -E:not(:link, :visited) { color: blue; } -/* line 7, numbered/selectors.scss */ -E:matches(:hover, :focus) { color: blue; } -/* line 9, numbered/selectors.scss */ -E.warning { color: blue; } -/* line 10, numbered/selectors.scss */ -E#id { color: blue; } -/* line 11, numbered/selectors.scss */ -E[foo] { color: blue; } -/* line 12, numbered/selectors.scss */ -E[foo="barbar"] { color: blue; } -/* line 13, numbered/selectors.scss */ -E[foo="barbar" i] { color: blue; } -/* line 14, numbered/selectors.scss */ -E[foo~="hello#$@%@$#^"] { color: blue; } -/* line 15, numbered/selectors.scss */ -E[foo^="color: green;"] { color: blue; } -/* line 16, numbered/selectors.scss */ -E[foo$="239023"] { color: blue; } -/* line 17, numbered/selectors.scss */ -E[foo*="29302"] { color: blue; } -/* line 18, numbered/selectors.scss */ -E[foo|="239032"] { color: blue; } -/* line 20, numbered/selectors.scss */ -[foo] { color: blue; } -/* line 21, numbered/selectors.scss */ -[foo] .helloWorld { color: blue; } -/* line 22, numbered/selectors.scss */ -[foo].helloWorld { color: blue; } -/* line 23, numbered/selectors.scss */ -[foo="barbar"] { color: blue; } -/* line 24, numbered/selectors.scss */ -[foo~="hello#$@%@$#^"] { color: blue; } -/* line 25, numbered/selectors.scss */ -[foo^="color: green;"] { color: blue; } -/* line 26, numbered/selectors.scss */ -[foo$="239023"] { color: blue; } -/* line 27, numbered/selectors.scss */ -[foo*="29302"] { color: blue; } -/* line 28, numbered/selectors.scss */ -[foo|="239032"] { color: blue; } -/* line 30, numbered/selectors.scss */ -E:dir(ltr) { color: blue; } -/* line 31, numbered/selectors.scss */ -E:lang(en) { color: blue; } -/* line 32, numbered/selectors.scss */ -E:lang(en, fr) { color: blue; } -/* line 34, numbered/selectors.scss */ -E:any-link { color: blue; } -/* line 35, numbered/selectors.scss */ -E:link { color: blue; } -/* line 36, numbered/selectors.scss */ -E:visited { color: blue; } -/* line 37, numbered/selectors.scss */ -E:local-link { color: blue; } -/* line 38, numbered/selectors.scss */ -E:local-link(0) { color: red; } -/* line 39, numbered/selectors.scss */ -E:local-link(1) { color: white; } -/* line 40, numbered/selectors.scss */ -E:local-link(2) { color: red; } -/* line 41, numbered/selectors.scss */ -E:target { color: blue; } -/* line 42, numbered/selectors.scss */ -E:scope { color: blue; } -/* line 44, numbered/selectors.scss */ -E:current { color: blue; } -/* line 45, numbered/selectors.scss */ -E:current(:link) { color: blue; } -/* line 46, numbered/selectors.scss */ -E:past { color: blue; } -/* line 47, numbered/selectors.scss */ -E:future { color: blue; } -/* line 49, numbered/selectors.scss */ -E:active { color: blue; } -/* line 50, numbered/selectors.scss */ -E:hover { color: blue; } -/* line 51, numbered/selectors.scss */ -E:focus { color: blue; } -/* line 52, numbered/selectors.scss */ -E:enabled { color: blue; } -/* line 53, numbered/selectors.scss */ -E:disabled { color: blue; } -/* line 54, numbered/selectors.scss */ -E:indeterminate { color: blue; } -/* line 55, numbered/selectors.scss */ -E:default { color: blue; } -/* line 56, numbered/selectors.scss */ -E:in-range { color: blue; } -/* line 57, numbered/selectors.scss */ -E:out-of-range { color: blue; } -/* line 58, numbered/selectors.scss */ -E:required { color: blue; } -/* line 59, numbered/selectors.scss */ -E:optional { color: blue; } -/* line 60, numbered/selectors.scss */ -E:read-only { color: blue; } -/* line 61, numbered/selectors.scss */ -E:read-write { color: blue; } -/* line 63, numbered/selectors.scss */ -E:root { color: blue; } -/* line 64, numbered/selectors.scss */ -E:empty { color: blue; } -/* line 65, numbered/selectors.scss */ -E:first-child { color: blue; } -/* line 66, numbered/selectors.scss */ -E:nth-child(odd) { color: blue; } -/* line 67, numbered/selectors.scss */ -E:nth-child(2n+1) { color: blue; } -/* line 68, numbered/selectors.scss */ -E:nth-child(5) { color: blue; } -/* line 69, numbered/selectors.scss */ -E:last-child { color: blue; } -/* line 70, numbered/selectors.scss */ -E:nth-last-child(-n+2) { color: blue; } -/* line 71, numbered/selectors.scss */ -E:only-child { color: blue; } -/* line 72, numbered/selectors.scss */ -E:first-of-type { color: blue; } -/* line 73, numbered/selectors.scss */ -E:nth-of-type(2n) { color: blue; } -/* line 74, numbered/selectors.scss */ -E:last-of-type { color: blue; } -/* line 75, numbered/selectors.scss */ -E:nth-last-of-type(n) { color: blue; } -/* line 76, numbered/selectors.scss */ -E:only-of-type { color: blue; } -/* line 77, numbered/selectors.scss */ -E:nth-match(odd) { color: blue; } -/* line 78, numbered/selectors.scss */ -E:nth-last-match(odd) { color: blue; } -/* line 80, numbered/selectors.scss */ -E:column(n) { color: blue; } -/* line 81, numbered/selectors.scss */ -E:nth-column(n) { color: blue; } -/* line 82, numbered/selectors.scss */ -E:nth-last-column(n) { color: blue; } -/* line 84, numbered/selectors.scss */ -E F { color: blue; } -/* line 85, numbered/selectors.scss */ -E > F { color: blue; } -/* line 86, numbered/selectors.scss */ -E + F { color: blue; } -/* line 87, numbered/selectors.scss */ -E ~ F { color: blue; } -/* line 88, numbered/selectors.scss */ -E /foo/ F { color: blue; } -/* line 89, numbered/selectors.scss */ -E! > F { color: blue; } -// namespaces -/* line 92, numbered/selectors.scss */ -[foo|att=val] { color: blue } -/* line 93, numbered/selectors.scss */ -[*|att] { color: yellow } -/* line 94, numbered/selectors.scss */ -[|att] { color: green } -/* line 95, numbered/selectors.scss */ -[att] { color: green } -// CSS2.1 -/* line 98, numbered/selectors.scss */ -E::first-line { color: blue; } -/* line 99, numbered/selectors.scss */ -E::first-letter { color: blue; } -/* line 100, numbered/selectors.scss */ -E::before { color: blue; } -/* line 101, numbered/selectors.scss */ -E::after { color: blue; } -// CSS3 UI (at risk) -/* line 104, numbered/selectors.scss */ -E::choices { color: blue; } -/* line 105, numbered/selectors.scss */ -E::value { color: blue; } -/* line 106, numbered/selectors.scss */ -E::repeat-index { color: blue; } -/* line 107, numbered/selectors.scss */ -E::repeat-item { color: blue; } -/* line 109, numbered/selectors.scss */ -E:first { color: blue; } -/* line 110, numbered/selectors.scss */ -E:first-line { color: blue; } -/* line 111, numbered/selectors.scss */ -E:first-letter { color: blue; } -/* line 112, numbered/selectors.scss */ -E:before{ color: blue; } -/* line 113, numbered/selectors.scss */ -E:after { color: blue; } -/* line 114, numbered/selectors.scss */ -E:checked { color: blue; } -/* line 115, numbered/selectors.scss */ -E:invalid { color: blue; } -/* line 116, numbered/selectors.scss */ -E:valid { color: blue; } -/* line 117, numbered/selectors.scss */ -E:left { color: blue; } -/* line 118, numbered/selectors.scss */ -E:right { color: blue; } -// -moz experimental -/* line 121, numbered/selectors.scss */ -E:any(ol) { color: blue; } -/* line 122, numbered/selectors.scss */ -E::selection { color: blue; } -// one of these is nested property, -// the other is a css block. -/* line 126, numbered/selectors.scss */ -div { -/* line 127, numbered/selectors.scss */ -font:something { -size: 30em; -} -/* line 131, numbered/selectors.scss */ -font: something { -size: 30em; -} -} -// self selector -/* line 139, numbered/selectors.scss */ -.something { -/* line 140, numbered/selectors.scss */ -&.world { -color: blue; -} -/* line 144, numbered/selectors.scss */ -& .mold { -height: 200px; -} -/* line 148, numbered/selectors.scss */ -.dog & { -color: blue; -} -} -/* line 153, numbered/selectors.scss */ -.simple { -/* line 154, numbered/selectors.scss */ -.dad & .wolf { -color: blue; -} -/* line 158, numbered/selectors.scss */ -.rad&.bad { -color: blue; -} -} -/* line 164, numbered/selectors.scss */ -div { -/* line 165, numbered/selectors.scss */ -.something & .what { -/* line 166, numbered/selectors.scss */ -&.world { -color: blue; -} -} -} -/* line 172, numbered/selectors.scss */ -div { -/* line 173, numbered/selectors.scss */ -&.foo & { -color: blue; -} -} -/* line 178, numbered/selectors.scss */ -.main, div { -/* line 179, numbered/selectors.scss */ -.message div { -/* line 180, numbered/selectors.scss */ -.title { -/* line 181, numbered/selectors.scss */ -.nice-fonts & { -font-size: 24px; -} -} -} -} -$name: escape; -/* line 189, numbered/selectors.scss */ -.#{$name}\% { -color: red; -} -/* line 193, numbered/selectors.scss */ -.escape-plan\% { -color: green; -} \ No newline at end of file diff --git a/tests/inputs/numbered/values.scss b/tests/inputs/numbered/values.scss deleted file mode 100644 index 891f9102..00000000 --- a/tests/inputs/numbered/values.scss +++ /dev/null @@ -1,42 +0,0 @@ -/* line 2, numbered/values.scss */ -#values { -color: #eee; -color: #eeeeee; -height: 20px; -width: 80%; -color: "hello world"; -height: url("http://google.com"); -dads: url(http://leafo.net); -padding: 10px 10px 10px 10px, 3px 3px 3px; -textblock: "This is a \ -multiline block \ -/* line 13, numbered/values.scss */ -#not { color: #eee;}"; -margin: 4,3,1; -content: "This is a \ -multiline string."; -border-radius: -1px -1px -1px black; -} -/* line 20, numbered/values.scss */ -#subtraction { -lit: 10 -11; -lit: 10 - 11; -lit: 10- 11; -lit: 10-11; -$num: 100; -var: 10 -$num; -var: 10 - $num; -var: 10- $num; -var: 10-$num; -} -/* line 34, numbered/values.scss */ -#special { -/* line 35, numbered/values.scss */ -a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); -} -/* line 38, numbered/values.scss */ -#unary { -b: +0.5em; -c: -foo(12px); -d: +foo(12px); -} \ No newline at end of file diff --git a/tests/inputs/numbered/variables.scss b/tests/inputs/numbered/variables.scss deleted file mode 100644 index 3f7e3f8d..00000000 --- a/tests/inputs/numbered/variables.scss +++ /dev/null @@ -1,50 +0,0 @@ -$color: red, two, three; -/* line 4, numbered/variables.scss */ -div { -height: $color; -} -$a: 1000; -/* line 10, numbered/variables.scss */ -div { -$a: 2000 !default; -num: $a; -} -/* line 15, numbered/variables.scss */ -div { -$b: 2000 !default; -num: $b; -} -$cool_color: null; -$cool_color: blue !default; -/* line 23, numbered/variables.scss */ -pre { -color: $cool_color; -} -$something_man: 100px; -cool: $something_man; -/* line 31, numbered/variables.scss */ -del { -$something: blue; -/* line 34, numbered/variables.scss */ -div { -$something: red; -/* line 36, numbered/variables.scss */ -pre { -color: $something; -} -} -color: $something; -} -$font-family-simple: Arial !default; -$font-family-spaces: Helvetica Neue !default; -$font-family-quotes: "Helvetica Neue" !default; -$font-family-commas: Helvetica, Arial, sans-serif !default; -$font-family-sans: "Helvetica Neue", Helvetica, Arial, sans-serif !default; -/* line 50, numbered/variables.scss */ -body { -font-family: $font-family-simple; -font-family: $font-family-spaces; -font-family: $font-family-quotes; -font-family: $font-family-commas; -font-family: $font-family-sans; -} \ No newline at end of file diff --git a/tests/outputs/builtins_numbered.css b/tests/outputs/builtins_numbered.css index 2c50531f..7e26341c 100644 --- a/tests/outputs/builtins_numbered.css +++ b/tests/outputs/builtins_numbered.css @@ -1,4 +1,4 @@ -/* line 2, numbered/builtins.scss */ +/* line 2, builtins.scss */ #color { color: #22ea18; red: 34; @@ -11,14 +11,14 @@ rgba: rgba(170, 119, 204, 0.4); rgba: rgba(170, 119, 204, 0.4); green: 139; } -/* line 21, numbered/builtins.scss */ +/* line 21, builtins.scss */ #hsl { color: #79c653; color: rgba(121, 198, 83, 0.5); hue: 100deg; sat: 50%; lig: 55%; } -/* line 30, numbered/builtins.scss */ +/* line 30, builtins.scss */ #more-color { light: #7e3d9e; dark: #432154; @@ -27,7 +27,7 @@ gray: #545454; comp: #48792f; inv: #9fd086; } -/* line 44, numbered/builtins.scss */ +/* line 44, builtins.scss */ #more-more-color { op: 0.5; opacify: rgba(1, 2, 3, 0.6); @@ -35,7 +35,7 @@ transparentize: rgba(1, 2, 3, 0.4); transparentize: rgba(1, 2, 3, 0.4); transparentize: rgba(52, 130, 3, 0.9); } -/* line 56, numbered/builtins.scss */ +/* line 56, builtins.scss */ #more-more-more-color { color: rgba(65, 110, 79, 0.4); color: rgba(20, 255, 216, 0); @@ -47,12 +47,12 @@ color: rgba(5, 5, 5, 0); color: #000A0A0A; color: #FFAABBCC; } -/* line 74, numbered/builtins.scss */ +/* line 74, builtins.scss */ #string { color: hello what is going on; color: "yeah"; color: "I do?"; } -/* line 81, numbered/builtins.scss */ +/* line 81, builtins.scss */ #number { color: 250%; color: 3; @@ -63,7 +63,7 @@ width: 200%; bottom: 10px; padding: 3em 1in 96px 72pt; } -/* line 94, numbered/builtins.scss */ +/* line 94, builtins.scss */ #list { len: 3; len: 1; @@ -80,7 +80,7 @@ index: false; index: 2; index: 2; - /* line 115, numbered/builtins.scss */ + /* line 115, builtins.scss */ index: 1; world: one, two, three, great, job; world: one, two, three, great job; @@ -88,7 +88,7 @@ cool: great job one two three; zip: 1px solid, 2px dashed; zip: 1px solid red, 2px dashed green; } -/* line 129, numbered/builtins.scss */ +/* line 129, builtins.scss */ #introspection { t: number; t: string; @@ -108,19 +108,19 @@ c: true; c: false; c: true; } -/* line 153, numbered/builtins.scss */ +/* line 153, builtins.scss */ #if { color: yes; color: no; color: yes; color: yes; } -/* line 160, numbered/builtins.scss */ +/* line 160, builtins.scss */ .transparent { r: 0; g: 0; b: 0; a: 0; } -/* line 167, numbered/builtins.scss */ +/* line 167, builtins.scss */ .alpha { a: 1; a: 1; diff --git a/tests/outputs/comments_numbered.css b/tests/outputs/comments_numbered.css index 0c7ca477..9ffe49c7 100644 --- a/tests/outputs/comments_numbered.css +++ b/tests/outputs/comments_numbered.css @@ -16,11 +16,11 @@ div { what-ever: 100px; background: url(); /*this is not a comment?*/ } -/* line 31, numbered/comments.scss */ +/* line 31, comments.scss */ .dummy { color: blue; } /* comment 1 */ -/* line 36, numbered/comments.scss */ +/* line 36, comments.scss */ a { /* comment 2 */ /* comment 3 */ diff --git a/tests/outputs/compass_extract_numbered.css b/tests/outputs/compass_extract_numbered.css index 7f0ec077..923c1cac 100644 --- a/tests/outputs/compass_extract_numbered.css +++ b/tests/outputs/compass_extract_numbered.css @@ -1,4 +1,4 @@ -/* line 224, numbered/compass_extract.scss */ +/* line 224, compass_extract.scss */ #test-0 { unit: false; unit: true; @@ -8,29 +8,29 @@ size: 1; size: 2; size: 2; } -/* line 236, numbered/compass_extract.scss */ +/* line 236, compass_extract.scss */ #test-1 { - /* line 142, numbered/compass_extract.scss */ + /* line 142, compass_extract.scss */ margin-top: 7.5em; padding-top: 9em; padding-bottom: 10.5em; - /* line 157, numbered/compass_extract.scss */ + /* line 157, compass_extract.scss */ margin-bottom: 0em; } -/* line 240, numbered/compass_extract.scss */ +/* line 240, compass_extract.scss */ #test-2 { - /* line 196, numbered/compass_extract.scss */ + /* line 196, compass_extract.scss */ border-style: solid; border-width: 0.0625em; padding: 1.4375em; } -/* line 244, numbered/compass_extract.scss */ +/* line 244, compass_extract.scss */ #test-3 { - /* line 184, numbered/compass_extract.scss */ + /* line 184, compass_extract.scss */ border-top-style: solid; border-top-width: 0.0625em; padding-top: 1.4375em; - /* line 188, numbered/compass_extract.scss */ - /* line 184, numbered/compass_extract.scss */ + /* line 188, compass_extract.scss */ + /* line 184, compass_extract.scss */ border-bottom-style: solid; border-bottom-width: 0.0625em; padding-bottom: 1.4375em; - /* line 188, numbered/compass_extract.scss */ } + /* line 188, compass_extract.scss */ } diff --git a/tests/outputs/content_numbered.css b/tests/outputs/content_numbered.css index 682fee11..e64b573f 100644 --- a/tests/outputs/content_numbered.css +++ b/tests/outputs/content_numbered.css @@ -1,36 +1,36 @@ -/* line 3, numbered/content.scss */ +/* line 3, content.scss */ * html { - /* line 8, numbered/content.scss */ } + /* line 8, content.scss */ } * html #logo { background-image: url(/logo.gif); } -/* line 20, numbered/content.scss */ +/* line 20, content.scss */ .colors { background-color: blue; color: white; border-color: blue; } -/* line 26, numbered/content.scss */ +/* line 26, content.scss */ @media only screen and (max-width: 480px) { - /* line 32, numbered/content.scss */ + /* line 32, content.scss */ body { color: red; } } -/* line 36, numbered/content.scss */ +/* line 36, content.scss */ #sidebar { width: 300px; - /* line 26, numbered/content.scss */ } + /* line 26, content.scss */ } @media only screen and (max-width: 480px) { #sidebar { width: 100px; } } -/* line 46, numbered/content.scss */ +/* line 46, content.scss */ @media only screen and (min-width: 40em) { - /* line 51, numbered/content.scss */ + /* line 51, content.scss */ .grid-1 { width: 100%; } .grid-2 { width: 100%; } } -/* line 46, numbered/content.scss */ +/* line 46, content.scss */ @media only screen and (min-width: 40em) { - /* line 58, numbered/content.scss */ - /* line 58, numbered/content.scss */ + /* line 58, content.scss */ + /* line 58, content.scss */ .grid-1 { width: 100%; } .grid-2 { diff --git a/tests/outputs/content_with_function_numbered.css b/tests/outputs/content_with_function_numbered.css index 0bfbf868..a107e172 100644 --- a/tests/outputs/content_with_function_numbered.css +++ b/tests/outputs/content_with_function_numbered.css @@ -1,3 +1,3 @@ -/* line 13, numbered/content_with_function.scss */ +/* line 13, content_with_function.scss */ body { padding: 1 px; } diff --git a/tests/outputs/default_args_numbered.css b/tests/outputs/default_args_numbered.css index e62a99b9..32d65ad7 100644 --- a/tests/outputs/default_args_numbered.css +++ b/tests/outputs/default_args_numbered.css @@ -1,4 +1,4 @@ -/* line 11, numbered/default_args.scss */ +/* line 11, default_args.scss */ div { height: red; margin: 100px; } diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css index 468efc82..c04fa5d9 100644 --- a/tests/outputs/directives_numbered.css +++ b/tests/outputs/directives_numbered.css @@ -1,45 +1,45 @@ @charset "hello-world"; -/* line 4, numbered/directives.scss */ +/* line 4, directives.scss */ @page :left { - /* line 5, numbered/directives.scss */ + /* line 5, directives.scss */ div { color: red; } } -/* line 10, numbered/directives.scss */ +/* line 10, directives.scss */ @page test { - /* line 11, numbered/directives.scss */ + /* line 11, directives.scss */ @media yes { - /* line 12, numbered/directives.scss */ - /* line 16, numbered/directives.scss */ + /* line 12, directives.scss */ + /* line 16, directives.scss */ div { color: red; } } } -/* line 24, numbered/directives.scss */ +/* line 24, directives.scss */ @media something { - /* line 25, numbered/directives.scss */ + /* line 25, directives.scss */ @page { - /* line 26, numbered/directives.scss */ + /* line 26, directives.scss */ @media else { - /* line 27, numbered/directives.scss */ + /* line 27, directives.scss */ div { height: 200px; } } } } -/* line 35, numbered/directives.scss */ +/* line 35, directives.scss */ div { color: red; - /* line 37, numbered/directives.scss */ } + /* line 37, directives.scss */ } @page yeah { - /* line 38, numbered/directives.scss */ + /* line 38, directives.scss */ div pre { height: 20px; } } -/* line 44, numbered/directives.scss */ +/* line 44, directives.scss */ @font-face { color: red; height: 20px; } -/* line 50, numbered/directives.scss */ +/* line 50, directives.scss */ @keyframes 'bounce' { - /* line 51, numbered/directives.scss */ - /* line 56, numbered/directives.scss */ - /* line 61, numbered/directives.scss */ - /* line 66, numbered/directives.scss */ - /* line 71, numbered/directives.scss */ + /* line 51, directives.scss */ + /* line 56, directives.scss */ + /* line 61, directives.scss */ + /* line 66, directives.scss */ + /* line 71, directives.scss */ from { top: 100px; animation-timing-function: ease-out; } @@ -58,11 +58,11 @@ div { to { top: 100px; } } -/* line 76, numbered/directives.scss */ +/* line 76, directives.scss */ @-webkit-keyframes flowouttoleft { - /* line 77, numbered/directives.scss */ - /* line 78, numbered/directives.scss */ - /* line 79, numbered/directives.scss */ + /* line 77, directives.scss */ + /* line 78, directives.scss */ + /* line 79, directives.scss */ 0% { -webkit-transform: translateX(0) scale(1); } @@ -71,15 +71,15 @@ div { 100% { -webkit-transform: translateX(-100%) scale(0.7); } } -/* line 82, numbered/directives.scss */ +/* line 82, directives.scss */ div { animation-name: 'diagonal-slide'; animation-duration: 5s; animation-iteration-count: 10; } -/* line 88, numbered/directives.scss */ +/* line 88, directives.scss */ @keyframes 'diagonal-slide' { - /* line 90, numbered/directives.scss */ - /* line 95, numbered/directives.scss */ + /* line 90, directives.scss */ + /* line 95, directives.scss */ from { left: 0; top: 0; } @@ -91,9 +91,9 @@ div { @document url(http://www.w3.org/), url-prefix(http://www.w3.org/Style/), domain(mozilla.org), -/* line 105, numbered/directives.scss */ +/* line 105, directives.scss */ regexp("https:.*") { - /* line 107, numbered/directives.scss */ + /* line 107, directives.scss */ body { color: purple; background: yellow; } } diff --git a/tests/outputs/extends_numbered.css b/tests/outputs/extends_numbered.css index df0cdc93..b316bba6 100644 --- a/tests/outputs/extends_numbered.css +++ b/tests/outputs/extends_numbered.css @@ -1,132 +1,132 @@ -/* line 2, numbered/extends.scss */ +/* line 2, extends.scss */ error, pre seriousError, span seriousError, other, hello { border: 1px #f00; background-color: #fdd; } -/* line 7, numbered/extends.scss */ +/* line 7, extends.scss */ pre, span { - /* line 8, numbered/extends.scss */ } + /* line 8, extends.scss */ } pre seriousError, span seriousError { font-size: 20px; } -/* line 14, numbered/extends.scss */ +/* line 14, extends.scss */ hello { color: green; - /* line 17, numbered/extends.scss */ } + /* line 17, extends.scss */ } hello div { margin: 10px; } -/* line 22, numbered/extends.scss */ +/* line 22, extends.scss */ .cool, .me { color: red; } -/* line 26, numbered/extends.scss */ +/* line 26, extends.scss */ .blue, .me { color: purple; } -/* line 30, numbered/extends.scss */ -/* line 34, numbered/extends.scss */ +/* line 30, extends.scss */ +/* line 34, extends.scss */ -/* line 35, numbered/extends.scss */ +/* line 35, extends.scss */ a:hover, .hoverlink, #demo .overview .fakelink:hover { text-decoration: underline; } -/* line 40, numbered/extends.scss */ +/* line 40, extends.scss */ div.hello.world.hmm, pre div.okay.span.world.hmm, pre #butt .umm div.sure.span.world.hmm, #butt .umm pre div.sure.span.world.hmm, code div.okay.span.world.hmm, code #butt .umm div.sure.span.world.hmm, #butt .umm code div.sure.span.world.hmm { color: blue; } -/* line 44, numbered/extends.scss */ +/* line 44, extends.scss */ pre, code { - /* line 45, numbered/extends.scss */ } - /* line 51, numbered/extends.scss */ + /* line 45, extends.scss */ } + /* line 51, extends.scss */ .xxxxx .xxxxx .xxxxx, code .xxxxx .xxxxx, code code .xxxxx, code code code, code .xxxxx code, .xxxxx code .xxxxx, .xxxxx code code, .xxxxx .xxxxx code { color: green; } -/* line 55, numbered/extends.scss */ +/* line 55, extends.scss */ code { color: red; } -/* line 63, numbered/extends.scss */ +/* line 63, extends.scss */ .alpha, .beta, .gama { color: red; } -/* line 67, numbered/extends.scss */ +/* line 67, extends.scss */ .beta, .gama { color: white; } -/* line 72, numbered/extends.scss */ +/* line 72, extends.scss */ .gama { color: blue; } -/* line 79, numbered/extends.scss */ +/* line 79, extends.scss */ #admin .tabbar a, #admin .tabbar #demo .overview .fakelink, #demo .overview #admin .tabbar .fakelink { font-weight: bold; } -/* line 80, numbered/extends.scss */ -/* line 82, numbered/extends.scss */ +/* line 80, extends.scss */ +/* line 82, extends.scss */ a1 b1 c1 d1, x1 y1 z1 w1 b1 c1 d1 { color: red; } -/* line 83, numbered/extends.scss */ -/* line 85, numbered/extends.scss */ +/* line 83, extends.scss */ +/* line 85, extends.scss */ a2 b2 c2 d2, a2 x2 y2 z2 w2 c2 d2, x2 y2 z2 a2 w2 c2 d2 { color: red; } -/* line 86, numbered/extends.scss */ -/* line 89, numbered/extends.scss */ +/* line 86, extends.scss */ +/* line 89, extends.scss */ a3 b3 c3 d3, a3 b3 x3 y3 z3 w3 d3, x3 y3 z3 a3 b3 w3 d3 { color: red; } -/* line 90, numbered/extends.scss */ -/* line 93, numbered/extends.scss */ +/* line 90, extends.scss */ +/* line 93, extends.scss */ a4 b4 c4 d4, a4 b4 c4 x4 y4 z4 w4, x4 y4 z4 a4 b4 c4 w4 { color: red; } -/* line 94, numbered/extends.scss */ -/* line 98, numbered/extends.scss */ +/* line 94, extends.scss */ +/* line 98, extends.scss */ #butt .yeah .okay, #butt .yeah .umm .sure, #butt .umm .yeah .sure { font-weight: bold; } -/* line 99, numbered/extends.scss */ -/* line 101, numbered/extends.scss */ +/* line 99, extends.scss */ +/* line 101, extends.scss */ a9 b9 s9 t9 v9, a9 b9 s9 t9 x9 y9 z9, a9 b9 x9 y9 s9 t9 z9 { color: red; } -/* line 103, numbered/extends.scss */ -/* line 109, numbered/extends.scss */ +/* line 103, extends.scss */ +/* line 109, extends.scss */ @media print { - /* line 110, numbered/extends.scss */ + /* line 110, extends.scss */ horse, man { color: blue; } } -/* line 115, numbered/extends.scss */ +/* line 115, extends.scss */ man { color: red; } -/* line 123, numbered/extends.scss */ +/* line 123, extends.scss */ wassup { color: blue; } -/* line 128, numbered/extends.scss */ +/* line 128, extends.scss */ .foo { - /* line 129, numbered/extends.scss */ } + /* line 129, extends.scss */ } .foo .wassup { color: blue; } -/* line 137, numbered/extends.scss */ +/* line 137, extends.scss */ #something, .x, .y { color: red; } -/* line 141, numbered/extends.scss */ -/* line 145, numbered/extends.scss */ +/* line 141, extends.scss */ +/* line 145, extends.scss */ -/* line 151, numbered/extends.scss */ +/* line 151, extends.scss */ .nav-tabs { - /* line 152, numbered/extends.scss */ } - /* line 156, numbered/extends.scss */ + /* line 152, extends.scss */ } + /* line 156, extends.scss */ .nav-justified, .nav-tabs.nav-justified { text-align: justify; } .btn:hover, .edit .actions button:hover, .edit .new .actions button:hover, .btn:active, .edit .actions button:active, .edit .new .actions button:active, .btn.active, .edit .actions button.active, .edit .new .actions button.active, .btn.disabled, .edit .actions button.disabled, .edit .new .actions button.disabled, .btn[disabled], .edit .actions button[disabled], .edit .new .actions button[disabled] { - /* line 166, numbered/extends.scss */ + /* line 166, extends.scss */ color: red; } -/* line 169, numbered/extends.scss */ +/* line 169, extends.scss */ .edit .actions { - /* line 170, numbered/extends.scss */ } + /* line 170, extends.scss */ } .edit .actions button { float: right; } -/* line 175, numbered/extends.scss */ +/* line 175, extends.scss */ .edit { - /* line 176, numbered/extends.scss */ } + /* line 176, extends.scss */ } .edit .new { - /* line 177, numbered/extends.scss */ - /* line 180, numbered/extends.scss */ } + /* line 177, extends.scss */ + /* line 180, extends.scss */ } .edit .new .actions { padding: 0; } diff --git a/tests/outputs/filter_effects_numbered.css b/tests/outputs/filter_effects_numbered.css index ff2cd87f..a5eef6d3 100644 --- a/tests/outputs/filter_effects_numbered.css +++ b/tests/outputs/filter_effects_numbered.css @@ -1,21 +1,21 @@ -/* line 1, numbered/filter_effects.scss */ +/* line 1, filter_effects.scss */ #number { -webkit-filter: grayscale(1) sepia(0.5) saturate(0.1) invert(1) opacity(0.5) brightness(0.5) contrast(0.5); } -/* line 11, numbered/filter_effects.scss */ +/* line 11, filter_effects.scss */ #percentage { -webkit-filter: grayscale(100%) sepia(50%) saturate(10%) invert(100%) opacity(50%) brightness(50%) contrast(50%); } -/* line 21, numbered/filter_effects.scss */ +/* line 21, filter_effects.scss */ #misc { -webkit-filter: hue-rotate(90deg) blur(10px) drop-shadow(10px -16px 30px purple); } -/* line 37, numbered/filter_effects.scss */ +/* line 37, filter_effects.scss */ #decimal { opacity: 0.5; filter: alpha(opacity=50, style=1); } -/* line 41, numbered/filter_effects.scss */ +/* line 41, filter_effects.scss */ #percent { opacity: 0.5; filter: alpha(opacity=50); } -/* line 45, numbered/filter_effects.scss */ +/* line 45, filter_effects.scss */ .row { background-color: #071c23; color: #2284a1; } diff --git a/tests/outputs/functions_numbered.css b/tests/outputs/functions_numbered.css index fd39c2ef..499d86ca 100644 --- a/tests/outputs/functions_numbered.css +++ b/tests/outputs/functions_numbered.css @@ -1,28 +1,28 @@ -/* line 10, numbered/functions.scss */ +/* line 10, functions.scss */ div { color: 14px; sum: 23; } -/* line 33, numbered/functions.scss */ +/* line 33, functions.scss */ div { hello: 10 55; hello: 1010 55; hello: "hello 10 and 55"; } -/* line 44, numbered/functions.scss */ +/* line 44, functions.scss */ del { color: 1000; } -/* line 48, numbered/functions.scss */ +/* line 48, functions.scss */ div { hello: "hello foo and bar"; hello: "hello bar and default"; hello: "hello Alice, Bob, Tom"; } -/* line 61, numbered/functions.scss */ +/* line 61, functions.scss */ .foo { test2: -moz-art; } -/* line 77, numbered/functions.scss */ +/* line 77, functions.scss */ div { - /* line 67, numbered/functions.scss */ } + /* line 67, functions.scss */ } div span { height: 3px; } -/* line 87, numbered/functions.scss */ +/* line 87, functions.scss */ div { width: 2; } diff --git a/tests/outputs/ie7_numbered.css b/tests/outputs/ie7_numbered.css index d7ee6e0c..1dfe7ab0 100644 --- a/tests/outputs/ie7_numbered.css +++ b/tests/outputs/ie7_numbered.css @@ -1,9 +1,9 @@ -/* line 2, numbered/ie7.scss */ +/* line 2, ie7.scss */ #foo:before { content: counter(item,".") ": "; } -/* line 6, numbered/ie7.scss */ +/* line 6, ie7.scss */ #bar:before { content: counter(item,"."); } -/* line 10, numbered/ie7.scss */ +/* line 10, ie7.scss */ #fu:before { content: counter(item); } diff --git a/tests/outputs/if_numbered.css b/tests/outputs/if_numbered.css index f2e04451..921baab7 100644 --- a/tests/outputs/if_numbered.css +++ b/tests/outputs/if_numbered.css @@ -1,22 +1,22 @@ -/* line 10, numbered/if.scss */ +/* line 10, if.scss */ div { color: blue; } -/* line 16, numbered/if.scss */ +/* line 16, if.scss */ pre { val-1: "red"; val-2: "blue"; val-3: "blue"; val-4: "red"; val-5: "red"; } -/* line 25, numbered/if.scss */ +/* line 25, if.scss */ span { color: blue; height: 10px; width: 20px; } -/* line 47, numbered/if.scss */ +/* line 47, if.scss */ div { color: blue; border-color: green; } -/* line 67, numbered/if.scss */ +/* line 67, if.scss */ del { thing: no; } diff --git a/tests/outputs/if_on_null_numbered.css b/tests/outputs/if_on_null_numbered.css index 4a3fcdf3..d7e5d5f7 100644 --- a/tests/outputs/if_on_null_numbered.css +++ b/tests/outputs/if_on_null_numbered.css @@ -1,3 +1,3 @@ -/* line 6, numbered/if_on_null.scss */ +/* line 6, if_on_null.scss */ body { background-color: "red"; } diff --git a/tests/outputs/import_numbered.css b/tests/outputs/import_numbered.css index c3e45741..747ab27a 100644 --- a/tests/outputs/import_numbered.css +++ b/tests/outputs/import_numbered.css @@ -5,13 +5,13 @@ div { height: 200px; color: red; } -/* line 9, numbered/import.scss */ +/* line 9, import.scss */ pre { color: red; } pre div { height: 200px; color: red; } -/* line 14, numbered/import.scss */ +/* line 14, import.scss */ code div { height: 200px; color: red; } @@ -21,7 +21,7 @@ code div { #partial { color: blue; } -/* line 20, numbered/import.scss */ +/* line 20, import.scss */ body { color: #7c2; background: gray; } diff --git a/tests/outputs/interpolation_numbered.css b/tests/outputs/interpolation_numbered.css index 19520ff7..82f2f908 100644 --- a/tests/outputs/interpolation_numbered.css +++ b/tests/outputs/interpolation_numbered.css @@ -1,45 +1,45 @@ -/* line 2, numbered/interpolation.scss */ +/* line 2, interpolation.scss */ div { - /* line 3, numbered/interpolation.scss */ + /* line 3, interpolation.scss */ color: redwhite blue; - /* line 4, numbered/interpolation.scss */ + /* line 4, interpolation.scss */ color: red white blue; - /* line 5, numbered/interpolation.scss */ + /* line 5, interpolation.scss */ color: red whiteblue; - /* line 6, numbered/interpolation.scss */ + /* line 6, interpolation.scss */ color: redwhiteblue; - /* line 7, numbered/interpolation.scss */ + /* line 7, interpolation.scss */ color: ummyeahwhat; - /* line 8, numbered/interpolation.scss */ + /* line 8, interpolation.scss */ color: stacked; - /* line 10, numbered/interpolation.scss */ + /* line 10, interpolation.scss */ font-size: 10px/something; - /* line 11, numbered/interpolation.scss */ + /* line 11, interpolation.scss */ font-size: 10px / something; - /* line 13, numbered/interpolation.scss */ + /* line 13, interpolation.scss */ test: "whatworldwrong"; - /* line 14, numbered/interpolation.scss */ + /* line 14, interpolation.scss */ test: "whatworldwrong"; - /* line 15, numbered/interpolation.scss */ + /* line 15, interpolation.scss */ test: "whatworldwrong"; - /* line 16, numbered/interpolation.scss */ + /* line 16, interpolation.scss */ test: "what"world"wrong"; - /* line 18, numbered/interpolation.scss */ + /* line 18, interpolation.scss */ hi: "what is 16 end"; } -/* line 24, numbered/interpolation.scss */ +/* line 24, interpolation.scss */ pre { - /* line 27, numbered/interpolation.scss */ - /* line 31, numbered/interpolation.scss */ - /* line 35, numbered/interpolation.scss */ } + /* line 27, interpolation.scss */ + /* line 31, interpolation.scss */ + /* line 35, interpolation.scss */ } pre var { color: red; } pre var dad { color: red; } pre bedvardad { color: red; } -/* line 40, numbered/interpolation.scss */ +/* line 40, interpolation.scss */ cool { - /* line 42, numbered/interpolation.scss */ } + /* line 42, interpolation.scss */ } cool .thing-1 { color: red; } cool .thing-2 { @@ -50,34 +50,34 @@ cool { color: red; } cool .thing-5 { color: red; } -/* line 48, numbered/interpolation.scss */ +/* line 48, interpolation.scss */ abcde { color: red; } -/* line 52, numbered/interpolation.scss */ +/* line 52, interpolation.scss */ #hello, .world { color: red; } -/* line 56, numbered/interpolation.scss */ +/* line 56, interpolation.scss */ #abchelloyeah, .coolworldyes { color: red; } -/* line 62, numbered/interpolation.scss */ +/* line 62, interpolation.scss */ div.element:nth-child(2n) { display: none; } -/* line 69, numbered/interpolation.scss */ +/* line 69, interpolation.scss */ div { - /* line 71, numbered/interpolation.scss */ + /* line 71, interpolation.scss */ hello: world; coolhello: world; - /* line 72, numbered/interpolation.scss */ + /* line 72, interpolation.scss */ helloone: world; - /* line 73, numbered/interpolation.scss */ + /* line 73, interpolation.scss */ twohelloone: world; - /* line 74, numbered/interpolation.scss */ + /* line 74, interpolation.scss */ oneabtwo: cool; - /* line 76, numbered/interpolation.scss */ - /* line 78, numbered/interpolation.scss */ - /* line 79, numbered/interpolation.scss */ + /* line 76, interpolation.scss */ + /* line 78, interpolation.scss */ + /* line 79, interpolation.scss */ hello-world: red; hello-mold: white; - /* line 80, numbered/interpolation.scss */ + /* line 80, interpolation.scss */ hello-hello: blue; - /* line 81, numbered/interpolation.scss */ } + /* line 81, interpolation.scss */ } diff --git a/tests/outputs/keyword_args_numbered.css b/tests/outputs/keyword_args_numbered.css index fc101b91..501ae411 100644 --- a/tests/outputs/keyword_args_numbered.css +++ b/tests/outputs/keyword_args_numbered.css @@ -1,7 +1,7 @@ -/* line 8, numbered/keyword_args.scss */ +/* line 8, keyword_args.scss */ pre { out: alpha fort three palace; } -/* line 19, numbered/keyword_args.scss */ +/* line 19, keyword_args.scss */ div { hello: 5; world: -5; } diff --git a/tests/outputs/list_numbered.css b/tests/outputs/list_numbered.css index 66ef481c..e8701f9f 100644 --- a/tests/outputs/list_numbered.css +++ b/tests/outputs/list_numbered.css @@ -1,8 +1,8 @@ -/* line 4, numbered/list.scss */ +/* line 4, list.scss */ div { padding: 10px 20px 30px 40px; margin: 0 10px 10px 10px; background: linear-gradient(black, white); } -/* line 13, numbered/list.scss */ +/* line 13, list.scss */ p { background: linear-gradient(red, blue); } diff --git a/tests/outputs/looping_numbered.css b/tests/outputs/looping_numbered.css index 485a640d..9e12ec7e 100644 --- a/tests/outputs/looping_numbered.css +++ b/tests/outputs/looping_numbered.css @@ -1,4 +1,4 @@ -/* line 2, numbered/looping.scss */ +/* line 2, looping.scss */ div { color: what; color: is; @@ -12,7 +12,7 @@ div { border: what; border: is; border: this; } -/* line 23, numbered/looping.scss */ +/* line 23, looping.scss */ span { color: 0; color: 1; @@ -25,7 +25,7 @@ span { color: 8; color: 9; color: 10; } -/* line 31, numbered/looping.scss */ +/* line 31, looping.scss */ pre { color: 1; color: 2; diff --git a/tests/outputs/media_numbered.css b/tests/outputs/media_numbered.css index cb2a0f4c..b4ea5d47 100644 --- a/tests/outputs/media_numbered.css +++ b/tests/outputs/media_numbered.css @@ -1,165 +1,165 @@ -/* line 3, numbered/media.scss */ +/* line 3, media.scss */ @media { - /* line 4, numbered/media.scss */ + /* line 4, media.scss */ div { color: blue; } } -/* line 6, numbered/media.scss */ +/* line 6, media.scss */ @media what { - /* line 7, numbered/media.scss */ + /* line 7, media.scss */ div { color: blue; } } -/* line 10, numbered/media.scss */ +/* line 10, media.scss */ @media (cool) { - /* line 11, numbered/media.scss */ + /* line 11, media.scss */ div { color: blue; } } -/* line 13, numbered/media.scss */ +/* line 13, media.scss */ @media (cool: blue) { - /* line 14, numbered/media.scss */ + /* line 14, media.scss */ div { color: blue; } } -/* line 17, numbered/media.scss */ +/* line 17, media.scss */ @media hello and (world) and (butt: man) { - /* line 18, numbered/media.scss */ + /* line 18, media.scss */ div { color: blue; } } -/* line 23, numbered/media.scss */ +/* line 23, media.scss */ @media (max-width: 940px) { color: red; } -/* line 28, numbered/media.scss */ +/* line 28, media.scss */ @media not hello and (world) { color: blue; - /* line 30, numbered/media.scss */ - /* line 34, numbered/media.scss */ + /* line 30, media.scss */ + /* line 34, media.scss */ pre { color: blue; } } @media butt and (world) { color: red; - /* line 36, numbered/media.scss */ + /* line 36, media.scss */ div { color: red; } } -/* line 42, numbered/media.scss */ +/* line 42, media.scss */ @media a, b { - /* line 43, numbered/media.scss */ } -/* line 48, numbered/media.scss */ + /* line 43, media.scss */ } +/* line 48, media.scss */ @media a { - /* line 49, numbered/media.scss */ } -/* line 54, numbered/media.scss */ + /* line 49, media.scss */ } +/* line 54, media.scss */ @media a, b { - /* line 55, numbered/media.scss */ } -/* line 64, numbered/media.scss */ + /* line 55, media.scss */ } +/* line 64, media.scss */ div { color: blue; - /* line 66, numbered/media.scss */ } + /* line 66, media.scss */ } @media screen and (-webkit-min-device-pixel-ratio: 1.5) { div { - /* line 67, numbered/media.scss */ } + /* line 67, media.scss */ } div .sidebar { width: 500px; } } -/* line 81, numbered/media.scss */ +/* line 81, media.scss */ div { position: absolute; - /* line 84, numbered/media.scss */ } + /* line 84, media.scss */ } @media screen { div { top: 0; - /* line 87, numbered/media.scss */ + /* line 87, media.scss */ bottom: 8em; color: red; - /* line 76, numbered/media.scss */ } + /* line 76, media.scss */ } div p { margin: 5px; } div .success { color: green; } } -/* line 95, numbered/media.scss */ +/* line 95, media.scss */ .button { width: 300px; height: 100px; background: #eee; - /* line 100, numbered/media.scss */ - /* line 104, numbered/media.scss */ } + /* line 100, media.scss */ + /* line 104, media.scss */ } .button :hover { background: #aaa; } @media only screen and (max-width: 300px) { .button { width: 100px; height: 100px; } } -/* line 110, numbered/media.scss */ +/* line 110, media.scss */ code { position: absolute; - /* line 112, numbered/media.scss */ } + /* line 112, media.scss */ } @media screen { code { - /* line 113, numbered/media.scss */ + /* line 113, media.scss */ height: 10px; } code pre { height: 20px; } } -/* line 120, numbered/media.scss */ +/* line 120, media.scss */ dt { - /* line 121, numbered/media.scss */ } + /* line 121, media.scss */ } @media screen { dt { - /* line 122, numbered/media.scss */ } } + /* line 122, media.scss */ } } @media screen and (color: blue) { dt { height: 10px; } } -/* line 129, numbered/media.scss */ +/* line 129, media.scss */ @media screen { - /* line 130, numbered/media.scss */ - /* line 133, numbered/media.scss */ + /* line 130, media.scss */ + /* line 133, media.scss */ .screen { width: 12px; } } @media only screen { - /* line 134, numbered/media.scss */ + /* line 134, media.scss */ .only-screen { height: 11px; } } -/* line 140, numbered/media.scss */ +/* line 140, media.scss */ @media only screen { - /* line 141, numbered/media.scss */ - /* line 144, numbered/media.scss */ + /* line 141, media.scss */ + /* line 144, media.scss */ .only-screen { width: 14px; } } @media only screen { - /* line 145, numbered/media.scss */ + /* line 145, media.scss */ .only-screen { height: 16px; } } -/* line 151, numbered/media.scss */ +/* line 151, media.scss */ @media not screen { - /* line 152, numbered/media.scss */ } -/* line 159, numbered/media.scss */ + /* line 152, media.scss */ } +/* line 159, media.scss */ @media not screen { - /* line 160, numbered/media.scss */ } + /* line 160, media.scss */ } @media print { - /* line 161, numbered/media.scss */ + /* line 161, media.scss */ .only-print { height: 12px; } } -/* line 167, numbered/media.scss */ +/* line 167, media.scss */ @media screen { - /* line 168, numbered/media.scss */ } + /* line 168, media.scss */ } @media screen { - /* line 169, numbered/media.scss */ + /* line 169, media.scss */ .only-print { height: 12px; } } -/* line 175, numbered/media.scss */ +/* line 175, media.scss */ @media not screen { - /* line 176, numbered/media.scss */ } -/* line 183, numbered/media.scss */ + /* line 176, media.scss */ } +/* line 183, media.scss */ @media not screen { - /* line 184, numbered/media.scss */ } + /* line 184, media.scss */ } @media not screen { - /* line 185, numbered/media.scss */ + /* line 185, media.scss */ .not-screen { height: 15px; } } -/* line 191, numbered/media.scss */ +/* line 191, media.scss */ @media only screen { - /* line 192, numbered/media.scss */ } -/* line 199, numbered/media.scss */ + /* line 192, media.scss */ } +/* line 199, media.scss */ @media only screen { - /* line 200, numbered/media.scss */ } + /* line 200, media.scss */ } @media only screen and (color: blue) { - /* line 201, numbered/media.scss */ } + /* line 201, media.scss */ } @media only screen and (color: blue) and (width: 13) { - /* line 202, numbered/media.scss */ + /* line 202, media.scss */ .only-screen { height: 15px; } } diff --git a/tests/outputs/mixins_numbered.css b/tests/outputs/mixins_numbered.css index 800b0386..bee388d8 100644 --- a/tests/outputs/mixins_numbered.css +++ b/tests/outputs/mixins_numbered.css @@ -1,31 +1,31 @@ -/* line 9, numbered/mixins.scss */ +/* line 9, mixins.scss */ div { color: blue; color: red; - /* line 4, numbered/mixins.scss */ } + /* line 4, mixins.scss */ } div pre { height: 200px; } -/* line 26, numbered/mixins.scss */ +/* line 26, mixins.scss */ span { color: blue; - /* line 17, numbered/mixins.scss */ } + /* line 17, mixins.scss */ } span div { height: 20px; } -/* line 30, numbered/mixins.scss */ +/* line 30, mixins.scss */ html { height: 43px; } -/* line 39, numbered/mixins.scss */ +/* line 39, mixins.scss */ del { height: 20px; } -/* line 52, numbered/mixins.scss */ +/* line 52, mixins.scss */ div { color: white; color: blue; color: white; } -/* line 62, numbered/mixins.scss */ +/* line 62, mixins.scss */ div { background-image: linear-gradient(left top, red, green); } -/* line 72, numbered/mixins.scss */ +/* line 72, mixins.scss */ div { -moz-box-shadow: 10px 10px 5px #888; -webkit-box-shadow: 10px 10px 5px #888; @@ -33,59 +33,59 @@ div { -moz-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; -webkit-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; } -/* line 81, numbered/mixins.scss */ +/* line 81, mixins.scss */ div { - /* line 82, numbered/mixins.scss */ } + /* line 82, mixins.scss */ } div p { - /* line 83, numbered/mixins.scss */ + /* line 83, mixins.scss */ color: red; - /* line 17, numbered/mixins.scss */ - /* line 89, numbered/mixins.scss */ + /* line 17, mixins.scss */ + /* line 89, mixins.scss */ color: blue; } div p .class { color: red; - /* line 17, numbered/mixins.scss */ } + /* line 17, mixins.scss */ } div p .class div { height: 20px; } div p div { height: 20px; } div p .top { top: 0; - /* line 92, numbered/mixins.scss */ } + /* line 92, mixins.scss */ } div p .top div { color: red; } -/* line 103, numbered/mixins.scss */ +/* line 103, mixins.scss */ div.mixin-content-simple { color: red; } -/* line 109, numbered/mixins.scss */ +/* line 109, mixins.scss */ div.mixin-content-with-arg { background: blue; color: red; } -/* line 109, numbered/mixins.scss */ +/* line 109, mixins.scss */ div.mixin-content-with-arg { background: purple; height: 20px; } -/* line 103, numbered/mixins.scss */ +/* line 103, mixins.scss */ div.mixin-content-simple { height: 43px; } -/* line 103, numbered/mixins.scss */ +/* line 103, mixins.scss */ div.mixin-content-simple { color: orange; - /* line 17, numbered/mixins.scss */ } + /* line 17, mixins.scss */ } div.mixin-content-simple div { height: 20px; } -/* line 109, numbered/mixins.scss */ +/* line 109, mixins.scss */ div.mixin-content-with-arg { background: purple; height: 43px; } -/* line 109, numbered/mixins.scss */ +/* line 109, mixins.scss */ div.mixin-content-with-arg { background: purple; color: orange; - /* line 17, numbered/mixins.scss */ } + /* line 17, mixins.scss */ } div.mixin-content-with-arg div { height: 20px; } -/* line 156, numbered/mixins.scss */ +/* line 156, mixins.scss */ #please-wait { background: url(/images/logo.png); position: absolute; @@ -93,14 +93,14 @@ div.mixin-content-with-arg { right: 0; bottom: 3em; left: 4em; } -/* line 168, numbered/mixins.scss */ +/* line 168, mixins.scss */ div.parameter-name-scope { - /* line 161, numbered/mixins.scss */ + /* line 161, mixins.scss */ -webkit-transform: translateX(50px); } -/* line 174, numbered/mixins.scss */ +/* line 174, mixins.scss */ @-webkit-keyframes change-color { - /* line 181, numbered/mixins.scss */ - /* line 182, numbered/mixins.scss */ + /* line 181, mixins.scss */ + /* line 182, mixins.scss */ 0% { color: green; } diff --git a/tests/outputs/nesting_numbered.css b/tests/outputs/nesting_numbered.css index 8d676e91..be8fb840 100644 --- a/tests/outputs/nesting_numbered.css +++ b/tests/outputs/nesting_numbered.css @@ -1,28 +1,28 @@ div: blue; -/* line 3, numbered/nesting.scss */ +/* line 3, nesting.scss */ body { color: red; } -/* line 8, numbered/nesting.scss */ +/* line 8, nesting.scss */ div { color: red; height: yes; - /* line 12, numbered/nesting.scss */ } + /* line 12, nesting.scss */ } div pre { color: blue; } -/* line 21, numbered/nesting.scss */ +/* line 21, nesting.scss */ div { - /* line 22, numbered/nesting.scss */ + /* line 22, nesting.scss */ font: 10px hello world; font-size: 10px; font-color: blue; - /* line 27, numbered/nesting.scss */ + /* line 27, nesting.scss */ border-left: 1px solid blue; border-right: 2px dashed green; } -/* line 34, numbered/nesting.scss */ +/* line 34, nesting.scss */ #nested-nesting { bar: baz; - /* line 36, numbered/nesting.scss */ + /* line 36, nesting.scss */ bang-bop: bar; bang-bip: 1px; - /* line 39, numbered/nesting.scss */ + /* line 39, nesting.scss */ bang-blat-baf: bort; } diff --git a/tests/outputs/null_numbered.css b/tests/outputs/null_numbered.css index 64449980..e5e476cf 100644 --- a/tests/outputs/null_numbered.css +++ b/tests/outputs/null_numbered.css @@ -1,29 +1,29 @@ -/* line 2, numbered/null.scss */ +/* line 2, null.scss */ .div { one: null; one: world; one: NULL world; one: a, b; two: a, b; } -/* line 12, numbered/null.scss */ +/* line 12, null.scss */ p:before { - /* line 13, numbered/null.scss */ + /* line 13, null.scss */ content: "I ate pies!"; } -/* line 31, numbered/null.scss */ +/* line 31, null.scss */ .foo { - /* line 26, numbered/null.scss */ + /* line 26, null.scss */ -webkit-border-radius: 10; border-radius: 10; - /* line 27, numbered/null.scss */ } -/* line 35, numbered/null.scss */ + /* line 27, null.scss */ } +/* line 35, null.scss */ .fu { - /* line 26, numbered/null.scss */ + /* line 26, null.scss */ -webkit-border-radius: 20; border-radius: 20; - /* line 27, numbered/null.scss */ } -/* line 39, numbered/null.scss */ + /* line 27, null.scss */ } +/* line 39, null.scss */ .bar { - /* line 26, numbered/null.scss */ + /* line 26, null.scss */ -webkit-border-top-left-radius: 30; border-top-left-radius: 30; - /* line 27, numbered/null.scss */ } + /* line 27, null.scss */ } diff --git a/tests/outputs/operators_numbered.css b/tests/outputs/operators_numbered.css index 4723c8c7..703bb365 100644 --- a/tests/outputs/operators_numbered.css +++ b/tests/outputs/operators_numbered.css @@ -1,4 +1,4 @@ -/* line 3, numbered/operators.scss */ +/* line 3, operators.scss */ body { color: 8; color: 16; @@ -9,25 +9,25 @@ body { top: 1.5em; left: -1cm; top: 6.29921; } -/* line 15, numbered/operators.scss */ +/* line 15, operators.scss */ div { color: false; color: true; color: true; color: false; color: what > 3; } -/* line 25, numbered/operators.scss */ +/* line 25, operators.scss */ #units { test: 2.5748in; test: 13mm; test: 4em; test: 11mm; test: 1.1cm; } -/* line 33, numbered/operators.scss */ +/* line 33, operators.scss */ #modulo { test: 1; test: 1cm; } -/* line 38, numbered/operators.scss */ +/* line 38, operators.scss */ #colors { color: #ff0203; color: #fe0000; @@ -42,11 +42,11 @@ div { color: true; color: true; color: false; } -/* line 59, numbered/operators.scss */ +/* line 59, operators.scss */ #preserve { hello: what -going; hello: what - going; } -/* line 64, numbered/operators.scss */ +/* line 64, operators.scss */ #strings { hello: what -going; hello: whatgoing; @@ -56,12 +56,12 @@ div { hello: "whatgoing"; hello: goingwhat; hello: "whatwhat"; } -/* line 77, numbered/operators.scss */ +/* line 77, operators.scss */ #negation { a: -60; b: -90; b: -90; } -/* line 84, numbered/operators.scss */ +/* line 84, operators.scss */ #bools-fail { and: false and two; and: one and two; @@ -69,7 +69,7 @@ div { or: false or two; or: one or two; or: one or false; } -/* line 94, numbered/operators.scss */ +/* line 94, operators.scss */ #bools { and: false; and: two; @@ -77,7 +77,7 @@ div { or: two; or: one; or: one; } -/* line 105, numbered/operators.scss */ +/* line 105, operators.scss */ #nots-fail { not: false2; not: not false; @@ -85,7 +85,7 @@ div { not: not 1; not: not ""; not: not hello; } -/* line 114, numbered/operators.scss */ +/* line 114, operators.scss */ #nots { not: false2; not: true; @@ -93,76 +93,76 @@ div { not: false; not: false; not: false; } -/* line 123, numbered/operators.scss */ +/* line 123, operators.scss */ #string-test { str: true; str: false; str: true; - /* line 131, numbered/operators.scss */ + /* line 131, operators.scss */ str: true; - /* line 133, numbered/operators.scss */ + /* line 133, operators.scss */ str: xhellohellofalse; str: true; } -/* line 139, numbered/operators.scss */ +/* line 139, operators.scss */ #special { cancel-unit: 1; } -/* line 146, numbered/operators.scss */ +/* line 146, operators.scss */ .row .a { margin: -0.5em; } -/* line 147, numbered/operators.scss */ +/* line 147, operators.scss */ .row .b { margin: -0.5em; } -/* line 148, numbered/operators.scss */ +/* line 148, operators.scss */ .row .c { margin: -0.5em; } -/* line 149, numbered/operators.scss */ +/* line 149, operators.scss */ .row .d { margin: -0.5em; } -/* line 150, numbered/operators.scss */ +/* line 150, operators.scss */ .row .e { margin: 0 -0.5em; } -/* line 152, numbered/operators.scss */ +/* line 152, operators.scss */ .alt .a { margin: -0.5em; } -/* line 153, numbered/operators.scss */ +/* line 153, operators.scss */ .alt .b { margin: -0.5em; } -/* line 154, numbered/operators.scss */ +/* line 154, operators.scss */ .alt .c { margin: -0.5em; } -/* line 155, numbered/operators.scss */ +/* line 155, operators.scss */ .alt .d { margin: 0 -1em / 2; } -/* line 156, numbered/operators.scss */ +/* line 156, operators.scss */ .alt .e { margin: 0 -0.5em; } -/* line 158, numbered/operators.scss */ +/* line 158, operators.scss */ .row .f { margin: -2em; } -/* line 159, numbered/operators.scss */ +/* line 159, operators.scss */ .row .g { margin: -2em; } -/* line 160, numbered/operators.scss */ +/* line 160, operators.scss */ .row .h { margin: -2em; } -/* line 161, numbered/operators.scss */ +/* line 161, operators.scss */ .row .i { margin: -2em; } -/* line 162, numbered/operators.scss */ +/* line 162, operators.scss */ .row .j { margin: 0 -2em; } -/* line 164, numbered/operators.scss */ +/* line 164, operators.scss */ .alt .f { margin: -2em; } -/* line 165, numbered/operators.scss */ +/* line 165, operators.scss */ .alt .g { margin: -2em; } -/* line 166, numbered/operators.scss */ +/* line 166, operators.scss */ .alt .h { margin: -2em; } -/* line 167, numbered/operators.scss */ +/* line 167, operators.scss */ .alt .i { margin: 0 -2em; } -/* line 168, numbered/operators.scss */ +/* line 168, operators.scss */ .alt .j { margin: 0 -2em; } diff --git a/tests/outputs/parsing_comments_numbered.css b/tests/outputs/parsing_comments_numbered.css index d5d9cd8d..0085190e 100644 --- a/tests/outputs/parsing_comments_numbered.css +++ b/tests/outputs/parsing_comments_numbered.css @@ -1,5 +1,5 @@ /* comment 1 */ -/* line 2, numbered/parsing_comments.scss */ +/* line 2, parsing_comments.scss */ a { /* comment 2 */ color: red; @@ -7,7 +7,7 @@ a { /* comment 4 */ } /* comment 5 */ /*! comment 1 */ -/* line 10, numbered/parsing_comments.scss */ +/* line 10, parsing_comments.scss */ b { /*! comment 2 */ color: red; @@ -17,7 +17,7 @@ b { /* * multi-line comment 1 */ -/* line 20, numbered/parsing_comments.scss */ +/* line 20, parsing_comments.scss */ c { /* * multi-line comment 2 @@ -35,7 +35,7 @@ c { /*! * multi-line comment 1 */ -/* line 38, numbered/parsing_comments.scss */ +/* line 38, parsing_comments.scss */ d { /*! * multi-line comment 2 @@ -50,6 +50,6 @@ d { /*! * multi-line comment 5 */ -/* line 54, numbered/parsing_comments.scss */ +/* line 54, parsing_comments.scss */ e { color: red; } diff --git a/tests/outputs/placeholder_selector_numbered.css b/tests/outputs/placeholder_selector_numbered.css index 87bc33f2..2c01113f 100644 --- a/tests/outputs/placeholder_selector_numbered.css +++ b/tests/outputs/placeholder_selector_numbered.css @@ -1,11 +1,11 @@ -/* line 1, numbered/placeholder_selector.scss */ +/* line 1, placeholder_selector.scss */ p a.notice span, p a.error span, #context a.notice span, #context a.error span { color: blue; font-weight: bold; font-size: 2em; } -/* line 7, numbered/placeholder_selector.scss */ -/* line 9, numbered/placeholder_selector.scss */ -/* line 13, numbered/placeholder_selector.scss */ +/* line 7, placeholder_selector.scss */ +/* line 9, placeholder_selector.scss */ +/* line 13, placeholder_selector.scss */ p { padding: 2em; } -/* line 18, numbered/placeholder_selector.scss */ +/* line 18, placeholder_selector.scss */ diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css index 1130ff2c..3d13a5aa 100644 --- a/tests/outputs/scss_css_numbered.css +++ b/tests/outputs/scss_css_numbered.css @@ -6,22 +6,22 @@ @import "foo.css" screen; @import "foo.css" screen, print; @charset "UTF-8"; -/* line 1, numbered/scss_css.scss */ +/* line 1, scss_css.scss */ [foo~=bar] { a: b; } -/* line 5, numbered/scss_css.scss */ +/* line 5, scss_css.scss */ [foo^=bar] { a: b; } -/* line 9, numbered/scss_css.scss */ +/* line 9, scss_css.scss */ [foo$=bar] { a: b; } -/* line 13, numbered/scss_css.scss */ +/* line 13, scss_css.scss */ [foo*=bar] { a: b; } -/* line 17, numbered/scss_css.scss */ +/* line 17, scss_css.scss */ [foo|=en] { a: b; } -/* line 21, numbered/scss_css.scss */ +/* line 21, scss_css.scss */ foo { a: 2; b: 2.3em; @@ -30,20 +30,20 @@ foo { e: flanny-blanny-blan; f: url(http://sass-lang.com); h: #abc; } -/* line 32, numbered/scss_css.scss */ +/* line 32, scss_css.scss */ selector { property: value; property2: value; } -/* line 37, numbered/scss_css.scss */ +/* line 37, scss_css.scss */ sel { p: v; } -/* line 39, numbered/scss_css.scss */ +/* line 39, scss_css.scss */ .foo { /* Foo Bar Baz */ a: b; } -/* line 46, numbered/scss_css.scss */ +/* line 46, scss_css.scss */ .foo { /* Foo Bar @@ -60,28 +60,28 @@ sel { Bar Baz */ a: b; } -/* line 64, numbered/scss_css.scss */ +/* line 64, scss_css.scss */ @foo { - /* line 65, numbered/scss_css.scss */ + /* line 65, scss_css.scss */ a: b; rule { a: b; } } -/* line 71, numbered/scss_css.scss */ +/* line 71, scss_css.scss */ @foo { a: b; } @bar { - /* line 72, numbered/scss_css.scss */ + /* line 72, scss_css.scss */ a: b; } @foo "bar" -/* line 77, numbered/scss_css.scss */ +/* line 77, scss_css.scss */ foo { a: 12px calc(100%/3 - 2*1em - 2*1px); b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } -/* line 84, numbered/scss_css.scss */ +/* line 84, scss_css.scss */ foo { bar: baz; } @@ -93,16 +93,16 @@ baz { /* * foo */ -/* line 94, numbered/scss_css.scss */ +/* line 94, scss_css.scss */ bar { baz: bang; } -/* line 97, numbered/scss_css.scss */ +/* line 97, scss_css.scss */ E, F { a: b; } -/* line 101, numbered/scss_css.scss */ +/* line 101, scss_css.scss */ E F, G H { a: b; } -/* line 105, numbered/scss_css.scss */ +/* line 105, scss_css.scss */ E > F, G > H { a: b; } /* This is a CSS comment. */ @@ -116,36 +116,36 @@ E > F, G > H { /* color: red; */ } /** .four {color: red;} */ -/* line 116, numbered/scss_css.scss */ +/* line 116, scss_css.scss */ .five { color: green; } /**/ -/* line 118, numbered/scss_css.scss */ +/* line 118, scss_css.scss */ .six { color: green; } /*********/ -/* line 120, numbered/scss_css.scss */ +/* line 120, scss_css.scss */ .seven { color: green; } /* a comment **/ -/* line 122, numbered/scss_css.scss */ +/* line 122, scss_css.scss */ .eight { color: green; } -/* line 125, numbered/scss_css.scss */ +/* line 125, scss_css.scss */ foo { a: \foo bar; b: foo\ bar; c: \2022 \0020; d: foo\\bar; e: foo\"\'bar; } -/* line 133, numbered/scss_css.scss */ +/* line 133, scss_css.scss */ foo { a: "\foo bar"; b: "foo\ bar"; c: "\2022 \0020"; d: "foo\\bar"; e: "foo\"'bar"; } -/* line 141, numbered/scss_css.scss */ +/* line 141, scss_css.scss */ foo { _name: val; *name: val; @@ -157,75 +157,75 @@ foo { name: val; } @foo "bar" ; -/* line 154, numbered/scss_css.scss */ +/* line 154, scss_css.scss */ foo { a: -moz-element(#foo); b: -webkit-element(#foo); b: -foobar-element(#foo); } -/* line 160, numbered/scss_css.scss */ -/* line 162, numbered/scss_css.scss */ +/* line 160, scss_css.scss */ +/* line 162, scss_css.scss */ @foo ; -/* line 168, numbered/scss_css.scss */ +/* line 168, scss_css.scss */ foo { bar: baz; } -/* line 173, numbered/scss_css.scss */ -/* line 175, numbered/scss_css.scss */ +/* line 173, scss_css.scss */ +/* line 175, scss_css.scss */ -/* line 179, numbered/scss_css.scss */ +/* line 179, scss_css.scss */ 0% { a: b; } -/* line 183, numbered/scss_css.scss */ +/* line 183, scss_css.scss */ 60% { a: b; } -/* line 187, numbered/scss_css.scss */ +/* line 187, scss_css.scss */ 100% { a: b; } -/* line 191, numbered/scss_css.scss */ +/* line 191, scss_css.scss */ 12px { a: b; } -/* line 195, numbered/scss_css.scss */ +/* line 195, scss_css.scss */ "foo" { a: b; } -/* line 199, numbered/scss_css.scss */ +/* line 199, scss_css.scss */ foo { - /* line 200, numbered/scss_css.scss */ + /* line 200, scss_css.scss */ a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 203, numbered/scss_css.scss */ +/* line 203, scss_css.scss */ :foo("bar") { a: b; } -/* line 207, numbered/scss_css.scss */ +/* line 207, scss_css.scss */ :foo(bar) { a: b; } -/* line 211, numbered/scss_css.scss */ +/* line 211, scss_css.scss */ :foo(12px) { a: b; } -/* line 215, numbered/scss_css.scss */ +/* line 215, scss_css.scss */ :foo(+) { a: b; } -/* line 219, numbered/scss_css.scss */ +/* line 219, scss_css.scss */ :foo(-) { a: b; } -/* line 223, numbered/scss_css.scss */ +/* line 223, scss_css.scss */ :foo(+"bar") { a: b; } -/* line 227, numbered/scss_css.scss */ +/* line 227, scss_css.scss */ :foo(-++--baz-"bar"12px) { a: b; } -/* line 231, numbered/scss_css.scss */ +/* line 231, scss_css.scss */ foo { a: foo-bar(12); b: -foo-bar-baz(13, 14 15); } @import "foo.css" screen, print and (foo: 0); @import "foo.css" screen, only print, screen and (foo: 0); -/* line 254, numbered/scss_css.scss */ +/* line 254, scss_css.scss */ foo { a: foo !important; b: foo bar !important; b: foo, bar !important; } -/* line 260, numbered/scss_css.scss */ +/* line 260, scss_css.scss */ foo { a: -moz-bar-baz; b: foo -o-bar-baz; } @@ -239,171 +239,171 @@ foo { /*: b; c */ } /* Foo * Bar */ -/* line 275, numbered/scss_css.scss */ +/* line 275, scss_css.scss */ .foo { /* Foo * Bar */ } -/* line 280, numbered/scss_css.scss */ +/* line 280, scss_css.scss */ [foo] { a: b; } -/* line 284, numbered/scss_css.scss */ +/* line 284, scss_css.scss */ [foo="bar"] { a: b; } -/* line 288, numbered/scss_css.scss */ +/* line 288, scss_css.scss */ [foo~="bar"] { a: b; } -/* line 292, numbered/scss_css.scss */ +/* line 292, scss_css.scss */ [foo^="bar"] { a: b; } -/* line 296, numbered/scss_css.scss */ +/* line 296, scss_css.scss */ [foo$="bar"] { a: b; } -/* line 300, numbered/scss_css.scss */ +/* line 300, scss_css.scss */ [foo*="bar"] { a: b; } -/* line 304, numbered/scss_css.scss */ +/* line 304, scss_css.scss */ [foo|="en"] { a: b; } -/* line 308, numbered/scss_css.scss */ +/* line 308, scss_css.scss */ :root { a: b; } -/* line 312, numbered/scss_css.scss */ +/* line 312, scss_css.scss */ :nth-child(n) { a: b; } -/* line 316, numbered/scss_css.scss */ +/* line 316, scss_css.scss */ :nth-last-child(n) { a: b; } -/* line 320, numbered/scss_css.scss */ +/* line 320, scss_css.scss */ :nth-of-type(n) { a: b; } -/* line 324, numbered/scss_css.scss */ +/* line 324, scss_css.scss */ :nth-last-of-type(n) { a: b; } -/* line 328, numbered/scss_css.scss */ +/* line 328, scss_css.scss */ :first-child { a: b; } -/* line 332, numbered/scss_css.scss */ +/* line 332, scss_css.scss */ :last-child { a: b; } -/* line 336, numbered/scss_css.scss */ +/* line 336, scss_css.scss */ :first-of-type { a: b; } -/* line 340, numbered/scss_css.scss */ +/* line 340, scss_css.scss */ :last-of-type { a: b; } -/* line 344, numbered/scss_css.scss */ +/* line 344, scss_css.scss */ :only-child { a: b; } -/* line 348, numbered/scss_css.scss */ +/* line 348, scss_css.scss */ :only-of-type { a: b; } -/* line 352, numbered/scss_css.scss */ +/* line 352, scss_css.scss */ :empty { a: b; } -/* line 356, numbered/scss_css.scss */ +/* line 356, scss_css.scss */ :link { a: b; } -/* line 360, numbered/scss_css.scss */ +/* line 360, scss_css.scss */ :visited { a: b; } -/* line 364, numbered/scss_css.scss */ +/* line 364, scss_css.scss */ :active { a: b; } -/* line 368, numbered/scss_css.scss */ +/* line 368, scss_css.scss */ :hover { a: b; } -/* line 372, numbered/scss_css.scss */ +/* line 372, scss_css.scss */ :focus { a: b; } -/* line 376, numbered/scss_css.scss */ +/* line 376, scss_css.scss */ :target { a: b; } -/* line 380, numbered/scss_css.scss */ +/* line 380, scss_css.scss */ :lang(fr) { a: b; } -/* line 384, numbered/scss_css.scss */ +/* line 384, scss_css.scss */ :enabled { a: b; } -/* line 388, numbered/scss_css.scss */ +/* line 388, scss_css.scss */ :disabled { a: b; } -/* line 392, numbered/scss_css.scss */ +/* line 392, scss_css.scss */ :checked { a: b; } -/* line 396, numbered/scss_css.scss */ +/* line 396, scss_css.scss */ ::first-line { a: b; } -/* line 400, numbered/scss_css.scss */ +/* line 400, scss_css.scss */ ::first-letter { a: b; } -/* line 404, numbered/scss_css.scss */ +/* line 404, scss_css.scss */ ::before { a: b; } -/* line 408, numbered/scss_css.scss */ +/* line 408, scss_css.scss */ ::after { a: b; } -/* line 412, numbered/scss_css.scss */ +/* line 412, scss_css.scss */ .warning { a: b; } -/* line 416, numbered/scss_css.scss */ +/* line 416, scss_css.scss */ #myid { a: b; } -/* line 420, numbered/scss_css.scss */ +/* line 420, scss_css.scss */ :not(s) { a: b; } -/* line 424, numbered/scss_css.scss */ +/* line 424, scss_css.scss */ @media all { - /* line 425, numbered/scss_css.scss */ - /* line 428, numbered/scss_css.scss */ + /* line 425, scss_css.scss */ + /* line 428, scss_css.scss */ rule1 { prop: val; } rule2 { prop: val; } } -/* line 432, numbered/scss_css.scss */ +/* line 432, scss_css.scss */ @media screen, print { - /* line 433, numbered/scss_css.scss */ - /* line 436, numbered/scss_css.scss */ + /* line 433, scss_css.scss */ + /* line 436, scss_css.scss */ rule1 { prop: val; } rule2 { prop: val; } } -/* line 440, numbered/scss_css.scss */ +/* line 440, scss_css.scss */ @media screen and (-webkit-min-device-pixel-ratio: 0) { a: b; } -/* line 444, numbered/scss_css.scss */ +/* line 444, scss_css.scss */ @media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { a: b; } -/* line 448, numbered/scss_css.scss */ +/* line 448, scss_css.scss */ :-moz-any(h1, h2, h3) { a: b; } -/* line 452, numbered/scss_css.scss */ +/* line 452, scss_css.scss */ :-moz-any(.foo) { a: b; } -/* line 456, numbered/scss_css.scss */ +/* line 456, scss_css.scss */ :-moz-any(foo bar, .baz > .bang) { a: b; } @-moz-document url(http://www.w3.org/), url-prefix(http://www.w3.org/Style/), domain(mozilla.org), -/* line 463, numbered/scss_css.scss */ +/* line 463, scss_css.scss */ regexp("^https:.*") { - /* line 464, numbered/scss_css.scss */ + /* line 464, scss_css.scss */ .foo { a: b; } } -/* line 468, numbered/scss_css.scss */ +/* line 468, scss_css.scss */ foo { filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } -/* line 473, numbered/scss_css.scss */ +/* line 473, scss_css.scss */ foo { filter: alpha(opacity=20); filter: alpha(opacity=20, enabled=true); filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } -/* line 479, numbered/scss_css.scss */ +/* line 479, scss_css.scss */ @foo bar { a: b; } -/* line 482, numbered/scss_css.scss */ +/* line 482, scss_css.scss */ @bar baz { c: d; } @@ -413,13 +413,13 @@ foo { * Bar */ /* Baz * Bang */ -/* line 496, numbered/scss_css.scss */ +/* line 496, scss_css.scss */ .foo { /* Foo * Bar */ /* Baz * Bang */ } -/* line 503, numbered/scss_css.scss */ +/* line 503, scss_css.scss */ .foo { /* Foo Bar */ /* Baz Bang */ } @@ -427,148 +427,148 @@ foo { @namespace "http://www.w3.org/Profiles/xhtml1-strict"; @namespace url(http://www.w3.org/Profiles/xhtml1-strict); @namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); -/* line 513, numbered/scss_css.scss */ +/* line 513, scss_css.scss */ [foo|bar=baz] { a: b; } -/* line 517, numbered/scss_css.scss */ +/* line 517, scss_css.scss */ [*|bar=baz] { a: b; } -/* line 521, numbered/scss_css.scss */ +/* line 521, scss_css.scss */ [foo|bar|=baz] { a: b; } -/* line 525, numbered/scss_css.scss */ +/* line 525, scss_css.scss */ foo|E { a: b; } -/* line 529, numbered/scss_css.scss */ +/* line 529, scss_css.scss */ *|E { a: b; } -/* line 533, numbered/scss_css.scss */ +/* line 533, scss_css.scss */ foo|* { a: b; } -/* line 537, numbered/scss_css.scss */ +/* line 537, scss_css.scss */ *|* { a: b; } -/* line 541, numbered/scss_css.scss */ +/* line 541, scss_css.scss */ :not(foo|bar) { a: b; } -/* line 545, numbered/scss_css.scss */ +/* line 545, scss_css.scss */ :not(*|bar) { a: b; } -/* line 549, numbered/scss_css.scss */ +/* line 549, scss_css.scss */ :not(foo|*) { a: b; } -/* line 553, numbered/scss_css.scss */ +/* line 553, scss_css.scss */ :not(*|*) { a: b; } -/* line 557, numbered/scss_css.scss */ +/* line 557, scss_css.scss */ :not(#blah) { a: b; } -/* line 561, numbered/scss_css.scss */ +/* line 561, scss_css.scss */ :not(.blah) { a: b; } -/* line 565, numbered/scss_css.scss */ +/* line 565, scss_css.scss */ :not([foo]) { a: b; } -/* line 569, numbered/scss_css.scss */ +/* line 569, scss_css.scss */ :not([foo^="bar"]) { a: b; } -/* line 573, numbered/scss_css.scss */ +/* line 573, scss_css.scss */ :not([baz|foo~="bar"]) { a: b; } -/* line 577, numbered/scss_css.scss */ +/* line 577, scss_css.scss */ :not(:hover) { a: b; } -/* line 581, numbered/scss_css.scss */ +/* line 581, scss_css.scss */ :not(:nth-child(2n + 3)) { a: b; } -/* line 585, numbered/scss_css.scss */ +/* line 585, scss_css.scss */ :not(:not(#foo)) { a: b; } -/* line 589, numbered/scss_css.scss */ +/* line 589, scss_css.scss */ :not(a#foo.bar) { a: b; } -/* line 593, numbered/scss_css.scss */ +/* line 593, scss_css.scss */ :not(#foo .bar > baz) { a: b; } -/* line 597, numbered/scss_css.scss */ +/* line 597, scss_css.scss */ :not(h1, h2, h3) { a: b; } -/* line 605, numbered/scss_css.scss */ +/* line 605, scss_css.scss */ foo { - /* line 606, numbered/scss_css.scss */ + /* line 606, scss_css.scss */ a: "bang 1 bar bip"; } -/* line 609, numbered/scss_css.scss */ +/* line 609, scss_css.scss */ :nth-child(-n) { a: b; } -/* line 613, numbered/scss_css.scss */ +/* line 613, scss_css.scss */ :nth-child(+n) { a: b; } -/* line 617, numbered/scss_css.scss */ +/* line 617, scss_css.scss */ :nth-child(even) { a: b; } -/* line 621, numbered/scss_css.scss */ +/* line 621, scss_css.scss */ :nth-child(odd) { a: b; } -/* line 625, numbered/scss_css.scss */ +/* line 625, scss_css.scss */ :nth-child(50) { a: b; } -/* line 629, numbered/scss_css.scss */ +/* line 629, scss_css.scss */ :nth-child(-50) { a: b; } -/* line 633, numbered/scss_css.scss */ +/* line 633, scss_css.scss */ :nth-child(+50) { a: b; } -/* line 637, numbered/scss_css.scss */ +/* line 637, scss_css.scss */ :nth-child(2n+3) { a: b; } -/* line 641, numbered/scss_css.scss */ +/* line 641, scss_css.scss */ :nth-child(2n-3) { a: b; } -/* line 645, numbered/scss_css.scss */ +/* line 645, scss_css.scss */ :nth-child(+2n-3) { a: b; } -/* line 649, numbered/scss_css.scss */ +/* line 649, scss_css.scss */ :nth-child(-2n+3) { a: b; } -/* line 653, numbered/scss_css.scss */ +/* line 653, scss_css.scss */ :nth-child(-2n+ 3) { a: b; } -/* line 657, numbered/scss_css.scss */ +/* line 657, scss_css.scss */ :nth-child( 2n + 3) { a: b; } -/* line 661, numbered/scss_css.scss */ +/* line 661, scss_css.scss */ foo { a: foo bar baz; b: foo, #abc, -12; c: 1px/2px/-3px; d: foo bar, baz/bang; } -/* line 668, numbered/scss_css.scss */ +/* line 668, scss_css.scss */ @page { prop1: val; prop2: val; } -/* line 673, numbered/scss_css.scss */ +/* line 673, scss_css.scss */ @page flap { prop1: val; prop2: val; } -/* line 678, numbered/scss_css.scss */ +/* line 678, scss_css.scss */ @page :first { prop1: val; prop2: val; } -/* line 683, numbered/scss_css.scss */ +/* line 683, scss_css.scss */ @page flap:first { prop1: val; prop2: val; } -/* line 688, numbered/scss_css.scss */ +/* line 688, scss_css.scss */ .foo { /* Foo */ a: b; } -/* line 693, numbered/scss_css.scss */ +/* line 693, scss_css.scss */ .foo { /* Foo * Bar */ a: b; } /* Foo */ -/* line 699, numbered/scss_css.scss */ +/* line 699, scss_css.scss */ .foo { a: b; } /* Foo @@ -579,214 +579,214 @@ foo { .foo #bar:baz(/* bang )*/ bip) { /* .a #foo */ a: b; } -/* line 712, numbered/scss_css.scss */ +/* line 712, scss_css.scss */ > E { a: b; } -/* line 716, numbered/scss_css.scss */ +/* line 716, scss_css.scss */ + E { a: b; } -/* line 720, numbered/scss_css.scss */ +/* line 720, scss_css.scss */ ~ E { a: b; } -/* line 724, numbered/scss_css.scss */ +/* line 724, scss_css.scss */ > > E { a: b; } -/* line 728, numbered/scss_css.scss */ +/* line 728, scss_css.scss */ >> E { a: b; } -/* line 732, numbered/scss_css.scss */ +/* line 732, scss_css.scss */ E* { a: b; } -/* line 736, numbered/scss_css.scss */ +/* line 736, scss_css.scss */ E*.foo { a: b; } -/* line 740, numbered/scss_css.scss */ +/* line 740, scss_css.scss */ E*:hover { a: b; } E, F { - /* line 745, numbered/scss_css.scss */ + /* line 745, scss_css.scss */ a: b; } E F { - /* line 750, numbered/scss_css.scss */ + /* line 750, scss_css.scss */ a: b; } E, F G, H { - /* line 755, numbered/scss_css.scss */ + /* line 755, scss_css.scss */ a: b; } -/* line 759, numbered/scss_css.scss */ +/* line 759, scss_css.scss */ body { /* //comment here */ } -/* line 766, numbered/scss_css.scss */ +/* line 766, scss_css.scss */ E > F { a: b; } -/* line 768, numbered/scss_css.scss */ +/* line 768, scss_css.scss */ E ~ F { a: b; } -/* line 770, numbered/scss_css.scss */ +/* line 770, scss_css.scss */ E + F { a: b; } -/* line 772, numbered/scss_css.scss */ +/* line 772, scss_css.scss */ * { a: b; } -/* line 776, numbered/scss_css.scss */ +/* line 776, scss_css.scss */ E { a: b; } -/* line 780, numbered/scss_css.scss */ +/* line 780, scss_css.scss */ E[foo] { a: b; } -/* line 784, numbered/scss_css.scss */ +/* line 784, scss_css.scss */ E[foo="bar"] { a: b; } -/* line 788, numbered/scss_css.scss */ +/* line 788, scss_css.scss */ E[foo~="bar"] { a: b; } -/* line 792, numbered/scss_css.scss */ +/* line 792, scss_css.scss */ E[foo^="bar"] { a: b; } -/* line 796, numbered/scss_css.scss */ +/* line 796, scss_css.scss */ E[foo$="bar"] { a: b; } -/* line 800, numbered/scss_css.scss */ +/* line 800, scss_css.scss */ E[foo*="bar"] { a: b; } -/* line 804, numbered/scss_css.scss */ +/* line 804, scss_css.scss */ E[foo|="en"] { a: b; } -/* line 808, numbered/scss_css.scss */ +/* line 808, scss_css.scss */ E:root { a: b; } -/* line 812, numbered/scss_css.scss */ +/* line 812, scss_css.scss */ E:nth-child(n) { a: b; } -/* line 816, numbered/scss_css.scss */ +/* line 816, scss_css.scss */ E:nth-last-child(n) { a: b; } -/* line 820, numbered/scss_css.scss */ +/* line 820, scss_css.scss */ E:nth-of-type(n) { a: b; } -/* line 824, numbered/scss_css.scss */ +/* line 824, scss_css.scss */ E:nth-last-of-type(n) { a: b; } -/* line 828, numbered/scss_css.scss */ +/* line 828, scss_css.scss */ E:first-child { a: b; } -/* line 832, numbered/scss_css.scss */ +/* line 832, scss_css.scss */ E:last-child { a: b; } -/* line 836, numbered/scss_css.scss */ +/* line 836, scss_css.scss */ E:first-of-type { a: b; } -/* line 840, numbered/scss_css.scss */ +/* line 840, scss_css.scss */ E:last-of-type { a: b; } -/* line 844, numbered/scss_css.scss */ +/* line 844, scss_css.scss */ E:only-child { a: b; } -/* line 848, numbered/scss_css.scss */ +/* line 848, scss_css.scss */ E:only-of-type { a: b; } -/* line 852, numbered/scss_css.scss */ +/* line 852, scss_css.scss */ E:empty { a: b; } -/* line 856, numbered/scss_css.scss */ +/* line 856, scss_css.scss */ E:link { a: b; } -/* line 860, numbered/scss_css.scss */ +/* line 860, scss_css.scss */ E:visited { a: b; } -/* line 864, numbered/scss_css.scss */ +/* line 864, scss_css.scss */ E:active { a: b; } -/* line 868, numbered/scss_css.scss */ +/* line 868, scss_css.scss */ E:hover { a: b; } -/* line 872, numbered/scss_css.scss */ +/* line 872, scss_css.scss */ E:focus { a: b; } -/* line 876, numbered/scss_css.scss */ +/* line 876, scss_css.scss */ E:target { a: b; } -/* line 880, numbered/scss_css.scss */ +/* line 880, scss_css.scss */ E:lang(fr) { a: b; } -/* line 884, numbered/scss_css.scss */ +/* line 884, scss_css.scss */ E:enabled { a: b; } -/* line 888, numbered/scss_css.scss */ +/* line 888, scss_css.scss */ E:disabled { a: b; } -/* line 892, numbered/scss_css.scss */ +/* line 892, scss_css.scss */ E:checked { a: b; } -/* line 896, numbered/scss_css.scss */ +/* line 896, scss_css.scss */ E::first-line { a: b; } -/* line 900, numbered/scss_css.scss */ +/* line 900, scss_css.scss */ E::first-letter { a: b; } -/* line 904, numbered/scss_css.scss */ +/* line 904, scss_css.scss */ E::before { a: b; } -/* line 908, numbered/scss_css.scss */ +/* line 908, scss_css.scss */ E::after { a: b; } -/* line 912, numbered/scss_css.scss */ +/* line 912, scss_css.scss */ E.warning { a: b; } -/* line 916, numbered/scss_css.scss */ +/* line 916, scss_css.scss */ E#myid { a: b; } -/* line 920, numbered/scss_css.scss */ +/* line 920, scss_css.scss */ E:not(s) { a: b; } -/* line 924, numbered/scss_css.scss */ +/* line 924, scss_css.scss */ E F { a: b; } -/* line 928, numbered/scss_css.scss */ +/* line 928, scss_css.scss */ E > F { a: b; } -/* line 932, numbered/scss_css.scss */ +/* line 932, scss_css.scss */ E + F { a: b; } -/* line 936, numbered/scss_css.scss */ +/* line 936, scss_css.scss */ E ~ F { a: b; } -/* line 940, numbered/scss_css.scss */ +/* line 940, scss_css.scss */ @supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 941, numbered/scss_css.scss */ + /* line 941, scss_css.scss */ .foo { a: b; } } -/* line 947, numbered/scss_css.scss */ +/* line 947, scss_css.scss */ @-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 948, numbered/scss_css.scss */ + /* line 948, scss_css.scss */ .foo { a: b; } } -/* line 954, numbered/scss_css.scss */ +/* line 954, scss_css.scss */ foo { foo: bar; #baz: bang; #bip: bop; } -/* line 960, numbered/scss_css.scss */ +/* line 960, scss_css.scss */ foo { a: -2; b: -2.3em; c: -50%; d: -foo(bar baz); } -/* line 967, numbered/scss_css.scss */ +/* line 967, scss_css.scss */ foo { a: -0.5em; b: 0.5em; c: -foo(12px); d: +foo(12px); } -/* line 977, numbered/scss_css.scss */ +/* line 977, scss_css.scss */ foo { -moz-foo-bar: blat; -o-flat-blang: wibble; } -/* line 982, numbered/scss_css.scss */ +/* line 982, scss_css.scss */ foo { a: foo(); b: bar baz-bang() bip; } diff --git a/tests/outputs/selectors_numbered.css b/tests/outputs/selectors_numbered.css index d1f24695..1cf1a5ed 100644 --- a/tests/outputs/selectors_numbered.css +++ b/tests/outputs/selectors_numbered.css @@ -1,363 +1,363 @@ -/* line 1, numbered/selectors.scss */ +/* line 1, selectors.scss */ * { color: blue; } -/* line 2, numbered/selectors.scss */ +/* line 2, selectors.scss */ E { color: blue; } -/* line 4, numbered/selectors.scss */ +/* line 4, selectors.scss */ E:not(:link) { color: blue; } -/* line 5, numbered/selectors.scss */ +/* line 5, selectors.scss */ E:not(:link):not(:visited) { color: blue; } -/* line 6, numbered/selectors.scss */ +/* line 6, selectors.scss */ E:not(:link, :visited) { color: blue; } -/* line 7, numbered/selectors.scss */ +/* line 7, selectors.scss */ E:matches(:hover, :focus) { color: blue; } -/* line 9, numbered/selectors.scss */ +/* line 9, selectors.scss */ E.warning { color: blue; } -/* line 10, numbered/selectors.scss */ +/* line 10, selectors.scss */ E#id { color: blue; } -/* line 11, numbered/selectors.scss */ +/* line 11, selectors.scss */ E[foo] { color: blue; } -/* line 12, numbered/selectors.scss */ +/* line 12, selectors.scss */ E[foo="barbar"] { color: blue; } -/* line 13, numbered/selectors.scss */ +/* line 13, selectors.scss */ E[foo="barbar" i] { color: blue; } -/* line 14, numbered/selectors.scss */ +/* line 14, selectors.scss */ E[foo~="hello#$@%@$#^"] { color: blue; } -/* line 15, numbered/selectors.scss */ +/* line 15, selectors.scss */ E[foo^="color: green;"] { color: blue; } -/* line 16, numbered/selectors.scss */ +/* line 16, selectors.scss */ E[foo$="239023"] { color: blue; } -/* line 17, numbered/selectors.scss */ +/* line 17, selectors.scss */ E[foo*="29302"] { color: blue; } -/* line 18, numbered/selectors.scss */ +/* line 18, selectors.scss */ E[foo|="239032"] { color: blue; } -/* line 20, numbered/selectors.scss */ +/* line 20, selectors.scss */ [foo] { color: blue; } -/* line 21, numbered/selectors.scss */ +/* line 21, selectors.scss */ [foo] .helloWorld { color: blue; } -/* line 22, numbered/selectors.scss */ +/* line 22, selectors.scss */ [foo].helloWorld { color: blue; } -/* line 23, numbered/selectors.scss */ +/* line 23, selectors.scss */ [foo="barbar"] { color: blue; } -/* line 24, numbered/selectors.scss */ +/* line 24, selectors.scss */ [foo~="hello#$@%@$#^"] { color: blue; } -/* line 25, numbered/selectors.scss */ +/* line 25, selectors.scss */ [foo^="color: green;"] { color: blue; } -/* line 26, numbered/selectors.scss */ +/* line 26, selectors.scss */ [foo$="239023"] { color: blue; } -/* line 27, numbered/selectors.scss */ +/* line 27, selectors.scss */ [foo*="29302"] { color: blue; } -/* line 28, numbered/selectors.scss */ +/* line 28, selectors.scss */ [foo|="239032"] { color: blue; } -/* line 30, numbered/selectors.scss */ +/* line 30, selectors.scss */ E:dir(ltr) { color: blue; } -/* line 31, numbered/selectors.scss */ +/* line 31, selectors.scss */ E:lang(en) { color: blue; } -/* line 32, numbered/selectors.scss */ +/* line 32, selectors.scss */ E:lang(en, fr) { color: blue; } -/* line 34, numbered/selectors.scss */ +/* line 34, selectors.scss */ E:any-link { color: blue; } -/* line 35, numbered/selectors.scss */ +/* line 35, selectors.scss */ E:link { color: blue; } -/* line 36, numbered/selectors.scss */ +/* line 36, selectors.scss */ E:visited { color: blue; } -/* line 37, numbered/selectors.scss */ +/* line 37, selectors.scss */ E:local-link { color: blue; } -/* line 38, numbered/selectors.scss */ +/* line 38, selectors.scss */ E:local-link(0) { color: red; } -/* line 39, numbered/selectors.scss */ +/* line 39, selectors.scss */ E:local-link(1) { color: white; } -/* line 40, numbered/selectors.scss */ +/* line 40, selectors.scss */ E:local-link(2) { color: red; } -/* line 41, numbered/selectors.scss */ +/* line 41, selectors.scss */ E:target { color: blue; } -/* line 42, numbered/selectors.scss */ +/* line 42, selectors.scss */ E:scope { color: blue; } -/* line 44, numbered/selectors.scss */ +/* line 44, selectors.scss */ E:current { color: blue; } -/* line 45, numbered/selectors.scss */ +/* line 45, selectors.scss */ E:current(:link) { color: blue; } -/* line 46, numbered/selectors.scss */ +/* line 46, selectors.scss */ E:past { color: blue; } -/* line 47, numbered/selectors.scss */ +/* line 47, selectors.scss */ E:future { color: blue; } -/* line 49, numbered/selectors.scss */ +/* line 49, selectors.scss */ E:active { color: blue; } -/* line 50, numbered/selectors.scss */ +/* line 50, selectors.scss */ E:hover { color: blue; } -/* line 51, numbered/selectors.scss */ +/* line 51, selectors.scss */ E:focus { color: blue; } -/* line 52, numbered/selectors.scss */ +/* line 52, selectors.scss */ E:enabled { color: blue; } -/* line 53, numbered/selectors.scss */ +/* line 53, selectors.scss */ E:disabled { color: blue; } -/* line 54, numbered/selectors.scss */ +/* line 54, selectors.scss */ E:indeterminate { color: blue; } -/* line 55, numbered/selectors.scss */ +/* line 55, selectors.scss */ E:default { color: blue; } -/* line 56, numbered/selectors.scss */ +/* line 56, selectors.scss */ E:in-range { color: blue; } -/* line 57, numbered/selectors.scss */ +/* line 57, selectors.scss */ E:out-of-range { color: blue; } -/* line 58, numbered/selectors.scss */ +/* line 58, selectors.scss */ E:required { color: blue; } -/* line 59, numbered/selectors.scss */ +/* line 59, selectors.scss */ E:optional { color: blue; } -/* line 60, numbered/selectors.scss */ +/* line 60, selectors.scss */ E:read-only { color: blue; } -/* line 61, numbered/selectors.scss */ +/* line 61, selectors.scss */ E:read-write { color: blue; } -/* line 63, numbered/selectors.scss */ +/* line 63, selectors.scss */ E:root { color: blue; } -/* line 64, numbered/selectors.scss */ +/* line 64, selectors.scss */ E:empty { color: blue; } -/* line 65, numbered/selectors.scss */ +/* line 65, selectors.scss */ E:first-child { color: blue; } -/* line 66, numbered/selectors.scss */ +/* line 66, selectors.scss */ E:nth-child(odd) { color: blue; } -/* line 67, numbered/selectors.scss */ +/* line 67, selectors.scss */ E:nth-child(2n+1) { color: blue; } -/* line 68, numbered/selectors.scss */ +/* line 68, selectors.scss */ E:nth-child(5) { color: blue; } -/* line 69, numbered/selectors.scss */ +/* line 69, selectors.scss */ E:last-child { color: blue; } -/* line 70, numbered/selectors.scss */ +/* line 70, selectors.scss */ E:nth-last-child(-n+2) { color: blue; } -/* line 71, numbered/selectors.scss */ +/* line 71, selectors.scss */ E:only-child { color: blue; } -/* line 72, numbered/selectors.scss */ +/* line 72, selectors.scss */ E:first-of-type { color: blue; } -/* line 73, numbered/selectors.scss */ +/* line 73, selectors.scss */ E:nth-of-type(2n) { color: blue; } -/* line 74, numbered/selectors.scss */ +/* line 74, selectors.scss */ E:last-of-type { color: blue; } -/* line 75, numbered/selectors.scss */ +/* line 75, selectors.scss */ E:nth-last-of-type(n) { color: blue; } -/* line 76, numbered/selectors.scss */ +/* line 76, selectors.scss */ E:only-of-type { color: blue; } -/* line 77, numbered/selectors.scss */ +/* line 77, selectors.scss */ E:nth-match(odd) { color: blue; } -/* line 78, numbered/selectors.scss */ +/* line 78, selectors.scss */ E:nth-last-match(odd) { color: blue; } -/* line 80, numbered/selectors.scss */ +/* line 80, selectors.scss */ E:column(n) { color: blue; } -/* line 81, numbered/selectors.scss */ +/* line 81, selectors.scss */ E:nth-column(n) { color: blue; } -/* line 82, numbered/selectors.scss */ +/* line 82, selectors.scss */ E:nth-last-column(n) { color: blue; } -/* line 84, numbered/selectors.scss */ +/* line 84, selectors.scss */ E F { color: blue; } -/* line 85, numbered/selectors.scss */ +/* line 85, selectors.scss */ E > F { color: blue; } -/* line 86, numbered/selectors.scss */ +/* line 86, selectors.scss */ E + F { color: blue; } -/* line 87, numbered/selectors.scss */ +/* line 87, selectors.scss */ E ~ F { color: blue; } -/* line 88, numbered/selectors.scss */ +/* line 88, selectors.scss */ E /foo/ F { color: blue; } -/* line 89, numbered/selectors.scss */ +/* line 89, selectors.scss */ E! > F { color: blue; } -/* line 92, numbered/selectors.scss */ +/* line 92, selectors.scss */ [foo|att=val] { color: blue; } -/* line 93, numbered/selectors.scss */ +/* line 93, selectors.scss */ [*|att] { color: yellow; } -/* line 94, numbered/selectors.scss */ +/* line 94, selectors.scss */ [|att] { color: green; } -/* line 95, numbered/selectors.scss */ +/* line 95, selectors.scss */ [att] { color: green; } -/* line 98, numbered/selectors.scss */ +/* line 98, selectors.scss */ E::first-line { color: blue; } -/* line 99, numbered/selectors.scss */ +/* line 99, selectors.scss */ E::first-letter { color: blue; } -/* line 100, numbered/selectors.scss */ +/* line 100, selectors.scss */ E::before { color: blue; } -/* line 101, numbered/selectors.scss */ +/* line 101, selectors.scss */ E::after { color: blue; } -/* line 104, numbered/selectors.scss */ +/* line 104, selectors.scss */ E::choices { color: blue; } -/* line 105, numbered/selectors.scss */ +/* line 105, selectors.scss */ E::value { color: blue; } -/* line 106, numbered/selectors.scss */ +/* line 106, selectors.scss */ E::repeat-index { color: blue; } -/* line 107, numbered/selectors.scss */ +/* line 107, selectors.scss */ E::repeat-item { color: blue; } -/* line 109, numbered/selectors.scss */ +/* line 109, selectors.scss */ E:first { color: blue; } -/* line 110, numbered/selectors.scss */ +/* line 110, selectors.scss */ E:first-line { color: blue; } -/* line 111, numbered/selectors.scss */ +/* line 111, selectors.scss */ E:first-letter { color: blue; } -/* line 112, numbered/selectors.scss */ +/* line 112, selectors.scss */ E:before { color: blue; } -/* line 113, numbered/selectors.scss */ +/* line 113, selectors.scss */ E:after { color: blue; } -/* line 114, numbered/selectors.scss */ +/* line 114, selectors.scss */ E:checked { color: blue; } -/* line 115, numbered/selectors.scss */ +/* line 115, selectors.scss */ E:invalid { color: blue; } -/* line 116, numbered/selectors.scss */ +/* line 116, selectors.scss */ E:valid { color: blue; } -/* line 117, numbered/selectors.scss */ +/* line 117, selectors.scss */ E:left { color: blue; } -/* line 118, numbered/selectors.scss */ +/* line 118, selectors.scss */ E:right { color: blue; } -/* line 121, numbered/selectors.scss */ +/* line 121, selectors.scss */ E:any(ol) { color: blue; } -/* line 122, numbered/selectors.scss */ +/* line 122, selectors.scss */ E::selection { color: blue; } -/* line 126, numbered/selectors.scss */ +/* line 126, selectors.scss */ div { - /* line 127, numbered/selectors.scss */ - /* line 131, numbered/selectors.scss */ + /* line 127, selectors.scss */ + /* line 131, selectors.scss */ font: something; font-size: 30em; } div font:something { size: 30em; } -/* line 139, numbered/selectors.scss */ +/* line 139, selectors.scss */ .something { - /* line 140, numbered/selectors.scss */ - /* line 144, numbered/selectors.scss */ - /* line 148, numbered/selectors.scss */ } + /* line 140, selectors.scss */ + /* line 144, selectors.scss */ + /* line 148, selectors.scss */ } .something.world { color: blue; } .something .mold { height: 200px; } .dog .something { color: blue; } -/* line 153, numbered/selectors.scss */ +/* line 153, selectors.scss */ .simple { - /* line 154, numbered/selectors.scss */ - /* line 158, numbered/selectors.scss */ } + /* line 154, selectors.scss */ + /* line 158, selectors.scss */ } .dad .simple .wolf { color: blue; } .rad.simple.bad { color: blue; } -/* line 164, numbered/selectors.scss */ +/* line 164, selectors.scss */ div { - /* line 165, numbered/selectors.scss */ } + /* line 165, selectors.scss */ } .something div .what { - /* line 166, numbered/selectors.scss */ } + /* line 166, selectors.scss */ } .something div .what.world { color: blue; } -/* line 172, numbered/selectors.scss */ +/* line 172, selectors.scss */ div { - /* line 173, numbered/selectors.scss */ } + /* line 173, selectors.scss */ } div.foo div { color: blue; } -/* line 178, numbered/selectors.scss */ +/* line 178, selectors.scss */ .main, div { - /* line 179, numbered/selectors.scss */ } + /* line 179, selectors.scss */ } .main .message div, div .message div { - /* line 180, numbered/selectors.scss */ } + /* line 180, selectors.scss */ } .main .message div .title, div .message div .title { - /* line 181, numbered/selectors.scss */ } + /* line 181, selectors.scss */ } .nice-fonts .main .message div .title, .nice-fonts div .message div .title { font-size: 24px; } -/* line 189, numbered/selectors.scss */ +/* line 189, selectors.scss */ .escape\% { color: red; } -/* line 193, numbered/selectors.scss */ +/* line 193, selectors.scss */ .escape-plan\% { color: green; } diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css index 18cdc73f..c72f5c07 100644 --- a/tests/outputs/values_numbered.css +++ b/tests/outputs/values_numbered.css @@ -1,4 +1,4 @@ -/* line 2, numbered/values.scss */ +/* line 2, values.scss */ #values { color: #eee; color: #eee; @@ -10,13 +10,13 @@ padding: 10px 10px 10px 10px, 3px 3px 3px; textblock: "This is a \ multiline block \ -/* line 13, numbered/values.scss */ +/* line 13, values.scss */ #not { color: #eee;}"; margin: 4, 3, 1; content: "This is a \ multiline string."; border-radius: -1px -1px -1px black; } -/* line 20, numbered/values.scss */ +/* line 20, values.scss */ #subtraction { lit: 10 -11; lit: -1; @@ -26,11 +26,11 @@ multiline string."; var: -90; var: -90; var: -90; } -/* line 34, numbered/values.scss */ +/* line 34, values.scss */ #special { - /* line 35, numbered/values.scss */ + /* line 35, values.scss */ a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 38, numbered/values.scss */ +/* line 38, values.scss */ #unary { b: 0.5em; c: -foo(12px); diff --git a/tests/outputs/variables_numbered.css b/tests/outputs/variables_numbered.css index 31b3b254..2c90541f 100644 --- a/tests/outputs/variables_numbered.css +++ b/tests/outputs/variables_numbered.css @@ -1,25 +1,25 @@ cool: 100px; -/* line 4, numbered/variables.scss */ +/* line 4, variables.scss */ div { height: red, two, three; } -/* line 10, numbered/variables.scss */ +/* line 10, variables.scss */ div { num: 1000; } -/* line 15, numbered/variables.scss */ +/* line 15, variables.scss */ div { num: 2000; } -/* line 23, numbered/variables.scss */ +/* line 23, variables.scss */ pre { color: blue; } -/* line 31, numbered/variables.scss */ +/* line 31, variables.scss */ del { - /* line 34, numbered/variables.scss */ + /* line 34, variables.scss */ color: red; } del div { - /* line 36, numbered/variables.scss */ } + /* line 36, variables.scss */ } del div pre { color: red; } -/* line 50, numbered/variables.scss */ +/* line 50, variables.scss */ body { font-family: Arial; font-family: Helvetica Neue; From fe5883d064fdc0b78aece871ef39bed41282631d Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 02:32:20 +0100 Subject: [PATCH 20/33] changed linefeed option in .gitattributes --- .gitattributes | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..6275e5f2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=eol=lf + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain From 544ec2eaf9347fef3c70c53ecc3746443c437f78 Mon Sep 17 00:00:00 2001 From: Gerhard Boden Date: Wed, 21 Jan 2015 02:37:28 +0100 Subject: [PATCH 21/33] Delete directives_numbered.css --- tests/outputs/directives_numbered.css | 99 --------------------------- 1 file changed, 99 deletions(-) delete mode 100644 tests/outputs/directives_numbered.css diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css deleted file mode 100644 index c04fa5d9..00000000 --- a/tests/outputs/directives_numbered.css +++ /dev/null @@ -1,99 +0,0 @@ -@charset "hello-world"; -/* line 4, directives.scss */ -@page :left { - /* line 5, directives.scss */ - div { - color: red; } } -/* line 10, directives.scss */ -@page test { - /* line 11, directives.scss */ - @media yes { - /* line 12, directives.scss */ - /* line 16, directives.scss */ - div { - color: red; } } } -/* line 24, directives.scss */ -@media something { - /* line 25, directives.scss */ - @page { - /* line 26, directives.scss */ - @media else { - /* line 27, directives.scss */ - div { - height: 200px; } } } } -/* line 35, directives.scss */ -div { - color: red; - /* line 37, directives.scss */ } - @page yeah { - /* line 38, directives.scss */ - div pre { - height: 20px; } } -/* line 44, directives.scss */ -@font-face { - color: red; - height: 20px; } -/* line 50, directives.scss */ -@keyframes 'bounce' { - /* line 51, directives.scss */ - /* line 56, directives.scss */ - /* line 61, directives.scss */ - /* line 66, directives.scss */ - /* line 71, directives.scss */ - from { - top: 100px; - animation-timing-function: ease-out; } - - 25% { - top: 50px; - animation-timing-function: ease-in; } - - 50% { - top: 100px; - animation-timing-function: ease-out; } - - 75% { - top: 75px; - animation-timing-function: ease-in; } - - to { - top: 100px; } } -/* line 76, directives.scss */ -@-webkit-keyframes flowouttoleft { - /* line 77, directives.scss */ - /* line 78, directives.scss */ - /* line 79, directives.scss */ - 0% { - -webkit-transform: translateX(0) scale(1); } - - 60%, 70% { - -webkit-transform: translateX(0) scale(0.7); } - - 100% { - -webkit-transform: translateX(-100%) scale(0.7); } } -/* line 82, directives.scss */ -div { - animation-name: 'diagonal-slide'; - animation-duration: 5s; - animation-iteration-count: 10; } -/* line 88, directives.scss */ -@keyframes 'diagonal-slide' { - /* line 90, directives.scss */ - /* line 95, directives.scss */ - from { - left: 0; - top: 0; } - - to { - left: 100px; - top: 100px; } } - -@document url(http://www.w3.org/), -url-prefix(http://www.w3.org/Style/), -domain(mozilla.org), -/* line 105, directives.scss */ -regexp("https:.*") { - /* line 107, directives.scss */ - body { - color: purple; - background: yellow; } } From 958dabc4591d1dacea0e4085daa6288f0173b659 Mon Sep 17 00:00:00 2001 From: Gerhard Boden Date: Wed, 21 Jan 2015 02:38:02 +0100 Subject: [PATCH 22/33] Delete scss_css_numbered.css --- tests/outputs/scss_css_numbered.css | 792 ---------------------------- 1 file changed, 792 deletions(-) delete mode 100644 tests/outputs/scss_css_numbered.css diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css deleted file mode 100644 index 3d13a5aa..00000000 --- a/tests/outputs/scss_css_numbered.css +++ /dev/null @@ -1,792 +0,0 @@ -@import "foo.css"; -@import 'foo.css'; -@import url("foo.css"); -@import url('foo.css'); -@import url(foo.css); -@import "foo.css" screen; -@import "foo.css" screen, print; -@charset "UTF-8"; -/* line 1, scss_css.scss */ -[foo~=bar] { - a: b; } -/* line 5, scss_css.scss */ -[foo^=bar] { - a: b; } -/* line 9, scss_css.scss */ -[foo$=bar] { - a: b; } -/* line 13, scss_css.scss */ -[foo*=bar] { - a: b; } -/* line 17, scss_css.scss */ -[foo|=en] { - a: b; } -/* line 21, scss_css.scss */ -foo { - a: 2; - b: 2.3em; - c: 50%; - d: "fraz bran"; - e: flanny-blanny-blan; - f: url(http://sass-lang.com); - h: #abc; } -/* line 32, scss_css.scss */ -selector { - property: value; - property2: value; } -/* line 37, scss_css.scss */ -sel { - p: v; } -/* line 39, scss_css.scss */ -.foo { - /* Foo - Bar - Baz */ - a: b; } -/* line 46, scss_css.scss */ -.foo { - /* Foo - Bar - Baz */ - a: b; } - -.foo { - /* Foo - Bar */ - a: b; } - -.foo { - /* Foo - Bar - Baz */ - a: b; } -/* line 64, scss_css.scss */ -@foo { - /* line 65, scss_css.scss */ - a: b; - rule { - a: b; } } -/* line 71, scss_css.scss */ -@foo { - a: b; } - -@bar { - /* line 72, scss_css.scss */ - a: b; } - -@foo "bar" -/* line 77, scss_css.scss */ -foo { - a: 12px calc(100%/3 - 2*1em - 2*1px); - b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); - b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); - b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } -/* line 84, scss_css.scss */ -foo { - bar: baz; } - -bar { - bar: baz; } - -baz { - bar: baz; } -/* - * foo - */ -/* line 94, scss_css.scss */ -bar { - baz: bang; } -/* line 97, scss_css.scss */ -E, F { - a: b; } -/* line 101, scss_css.scss */ -E F, G H { - a: b; } -/* line 105, scss_css.scss */ -E > F, G > H { - a: b; } -/* This is a CSS comment. */ -.one { - color: green; } -/* Another comment */ -/* The following should not be used: - .two {color: red;} */ -.three { - color: green; - /* color: red; */ } -/** - .four {color: red;} */ -/* line 116, scss_css.scss */ -.five { - color: green; } -/**/ -/* line 118, scss_css.scss */ -.six { - color: green; } -/*********/ -/* line 120, scss_css.scss */ -.seven { - color: green; } -/* a comment **/ -/* line 122, scss_css.scss */ -.eight { - color: green; } -/* line 125, scss_css.scss */ -foo { - a: \foo bar; - b: foo\ bar; - c: \2022 \0020; - d: foo\\bar; - e: foo\"\'bar; } -/* line 133, scss_css.scss */ -foo { - a: "\foo bar"; - b: "foo\ bar"; - c: "\2022 \0020"; - d: "foo\\bar"; - e: "foo\"'bar"; } -/* line 141, scss_css.scss */ -foo { - _name: val; - *name: val; - :name: val; - .name: val; - #name: val; - name/**/: val; - name/*\**/: val; - name: val; } - -@foo "bar" ; -/* line 154, scss_css.scss */ -foo { - a: -moz-element(#foo); - b: -webkit-element(#foo); - b: -foobar-element(#foo); } -/* line 160, scss_css.scss */ -/* line 162, scss_css.scss */ - -@foo ; -/* line 168, scss_css.scss */ -foo { - bar: baz; } -/* line 173, scss_css.scss */ -/* line 175, scss_css.scss */ - -/* line 179, scss_css.scss */ - -0% { - a: b; } -/* line 183, scss_css.scss */ -60% { - a: b; } -/* line 187, scss_css.scss */ -100% { - a: b; } -/* line 191, scss_css.scss */ -12px { - a: b; } -/* line 195, scss_css.scss */ -"foo" { - a: b; } -/* line 199, scss_css.scss */ -foo { - /* line 200, scss_css.scss */ - a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 203, scss_css.scss */ -:foo("bar") { - a: b; } -/* line 207, scss_css.scss */ -:foo(bar) { - a: b; } -/* line 211, scss_css.scss */ -:foo(12px) { - a: b; } -/* line 215, scss_css.scss */ -:foo(+) { - a: b; } -/* line 219, scss_css.scss */ -:foo(-) { - a: b; } -/* line 223, scss_css.scss */ -:foo(+"bar") { - a: b; } -/* line 227, scss_css.scss */ -:foo(-++--baz-"bar"12px) { - a: b; } -/* line 231, scss_css.scss */ -foo { - a: foo-bar(12); - b: -foo-bar-baz(13, 14 15); } - -@import "foo.css" screen, print and (foo: 0); -@import "foo.css" screen, only print, screen and (foo: 0); -/* line 254, scss_css.scss */ -foo { - a: foo !important; - b: foo bar !important; - b: foo, bar !important; } -/* line 260, scss_css.scss */ -foo { - a: -moz-bar-baz; - b: foo -o-bar-baz; } - -foo { - a: d; - /* b; c: */ } - -foo { - a : d; - /*: b; c */ } -/* Foo - * Bar */ -/* line 275, scss_css.scss */ -.foo { - /* Foo - * Bar */ } -/* line 280, scss_css.scss */ -[foo] { - a: b; } -/* line 284, scss_css.scss */ -[foo="bar"] { - a: b; } -/* line 288, scss_css.scss */ -[foo~="bar"] { - a: b; } -/* line 292, scss_css.scss */ -[foo^="bar"] { - a: b; } -/* line 296, scss_css.scss */ -[foo$="bar"] { - a: b; } -/* line 300, scss_css.scss */ -[foo*="bar"] { - a: b; } -/* line 304, scss_css.scss */ -[foo|="en"] { - a: b; } -/* line 308, scss_css.scss */ -:root { - a: b; } -/* line 312, scss_css.scss */ -:nth-child(n) { - a: b; } -/* line 316, scss_css.scss */ -:nth-last-child(n) { - a: b; } -/* line 320, scss_css.scss */ -:nth-of-type(n) { - a: b; } -/* line 324, scss_css.scss */ -:nth-last-of-type(n) { - a: b; } -/* line 328, scss_css.scss */ -:first-child { - a: b; } -/* line 332, scss_css.scss */ -:last-child { - a: b; } -/* line 336, scss_css.scss */ -:first-of-type { - a: b; } -/* line 340, scss_css.scss */ -:last-of-type { - a: b; } -/* line 344, scss_css.scss */ -:only-child { - a: b; } -/* line 348, scss_css.scss */ -:only-of-type { - a: b; } -/* line 352, scss_css.scss */ -:empty { - a: b; } -/* line 356, scss_css.scss */ -:link { - a: b; } -/* line 360, scss_css.scss */ -:visited { - a: b; } -/* line 364, scss_css.scss */ -:active { - a: b; } -/* line 368, scss_css.scss */ -:hover { - a: b; } -/* line 372, scss_css.scss */ -:focus { - a: b; } -/* line 376, scss_css.scss */ -:target { - a: b; } -/* line 380, scss_css.scss */ -:lang(fr) { - a: b; } -/* line 384, scss_css.scss */ -:enabled { - a: b; } -/* line 388, scss_css.scss */ -:disabled { - a: b; } -/* line 392, scss_css.scss */ -:checked { - a: b; } -/* line 396, scss_css.scss */ -::first-line { - a: b; } -/* line 400, scss_css.scss */ -::first-letter { - a: b; } -/* line 404, scss_css.scss */ -::before { - a: b; } -/* line 408, scss_css.scss */ -::after { - a: b; } -/* line 412, scss_css.scss */ -.warning { - a: b; } -/* line 416, scss_css.scss */ -#myid { - a: b; } -/* line 420, scss_css.scss */ -:not(s) { - a: b; } -/* line 424, scss_css.scss */ -@media all { - /* line 425, scss_css.scss */ - /* line 428, scss_css.scss */ - rule1 { - prop: val; } - rule2 { - prop: val; } } -/* line 432, scss_css.scss */ -@media screen, print { - /* line 433, scss_css.scss */ - /* line 436, scss_css.scss */ - rule1 { - prop: val; } - rule2 { - prop: val; } } -/* line 440, scss_css.scss */ -@media screen and (-webkit-min-device-pixel-ratio: 0) { - a: b; } -/* line 444, scss_css.scss */ -@media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { - a: b; } -/* line 448, scss_css.scss */ -:-moz-any(h1, h2, h3) { - a: b; } -/* line 452, scss_css.scss */ -:-moz-any(.foo) { - a: b; } -/* line 456, scss_css.scss */ -:-moz-any(foo bar, .baz > .bang) { - a: b; } - -@-moz-document url(http://www.w3.org/), -url-prefix(http://www.w3.org/Style/), -domain(mozilla.org), -/* line 463, scss_css.scss */ -regexp("^https:.*") { - /* line 464, scss_css.scss */ - .foo { - a: b; } } -/* line 468, scss_css.scss */ -foo { - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); - filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } -/* line 473, scss_css.scss */ -foo { - filter: alpha(opacity=20); - filter: alpha(opacity=20, enabled=true); - filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } -/* line 479, scss_css.scss */ -@foo bar { - a: b; } -/* line 482, scss_css.scss */ -@bar baz { - c: d; } - -@foo bar; -@bar baz; -/* Foo -* Bar */ -/* Baz -* Bang */ -/* line 496, scss_css.scss */ -.foo { - /* Foo - * Bar */ - /* Baz - * Bang */ } -/* line 503, scss_css.scss */ -.foo { - /* Foo Bar */ - /* Baz Bang */ } - -@namespace "http://www.w3.org/Profiles/xhtml1-strict"; -@namespace url(http://www.w3.org/Profiles/xhtml1-strict); -@namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); -/* line 513, scss_css.scss */ -[foo|bar=baz] { - a: b; } -/* line 517, scss_css.scss */ -[*|bar=baz] { - a: b; } -/* line 521, scss_css.scss */ -[foo|bar|=baz] { - a: b; } -/* line 525, scss_css.scss */ -foo|E { - a: b; } -/* line 529, scss_css.scss */ -*|E { - a: b; } -/* line 533, scss_css.scss */ -foo|* { - a: b; } -/* line 537, scss_css.scss */ -*|* { - a: b; } -/* line 541, scss_css.scss */ -:not(foo|bar) { - a: b; } -/* line 545, scss_css.scss */ -:not(*|bar) { - a: b; } -/* line 549, scss_css.scss */ -:not(foo|*) { - a: b; } -/* line 553, scss_css.scss */ -:not(*|*) { - a: b; } -/* line 557, scss_css.scss */ -:not(#blah) { - a: b; } -/* line 561, scss_css.scss */ -:not(.blah) { - a: b; } -/* line 565, scss_css.scss */ -:not([foo]) { - a: b; } -/* line 569, scss_css.scss */ -:not([foo^="bar"]) { - a: b; } -/* line 573, scss_css.scss */ -:not([baz|foo~="bar"]) { - a: b; } -/* line 577, scss_css.scss */ -:not(:hover) { - a: b; } -/* line 581, scss_css.scss */ -:not(:nth-child(2n + 3)) { - a: b; } -/* line 585, scss_css.scss */ -:not(:not(#foo)) { - a: b; } -/* line 589, scss_css.scss */ -:not(a#foo.bar) { - a: b; } -/* line 593, scss_css.scss */ -:not(#foo .bar > baz) { - a: b; } -/* line 597, scss_css.scss */ -:not(h1, h2, h3) { - a: b; } -/* line 605, scss_css.scss */ -foo { - /* line 606, scss_css.scss */ - a: "bang 1 bar bip"; } -/* line 609, scss_css.scss */ -:nth-child(-n) { - a: b; } -/* line 613, scss_css.scss */ -:nth-child(+n) { - a: b; } -/* line 617, scss_css.scss */ -:nth-child(even) { - a: b; } -/* line 621, scss_css.scss */ -:nth-child(odd) { - a: b; } -/* line 625, scss_css.scss */ -:nth-child(50) { - a: b; } -/* line 629, scss_css.scss */ -:nth-child(-50) { - a: b; } -/* line 633, scss_css.scss */ -:nth-child(+50) { - a: b; } -/* line 637, scss_css.scss */ -:nth-child(2n+3) { - a: b; } -/* line 641, scss_css.scss */ -:nth-child(2n-3) { - a: b; } -/* line 645, scss_css.scss */ -:nth-child(+2n-3) { - a: b; } -/* line 649, scss_css.scss */ -:nth-child(-2n+3) { - a: b; } -/* line 653, scss_css.scss */ -:nth-child(-2n+ 3) { - a: b; } -/* line 657, scss_css.scss */ -:nth-child( 2n + 3) { - a: b; } -/* line 661, scss_css.scss */ -foo { - a: foo bar baz; - b: foo, #abc, -12; - c: 1px/2px/-3px; - d: foo bar, baz/bang; } -/* line 668, scss_css.scss */ -@page { - prop1: val; - prop2: val; } -/* line 673, scss_css.scss */ -@page flap { - prop1: val; - prop2: val; } -/* line 678, scss_css.scss */ -@page :first { - prop1: val; - prop2: val; } -/* line 683, scss_css.scss */ -@page flap:first { - prop1: val; - prop2: val; } -/* line 688, scss_css.scss */ -.foo { - /* Foo */ - a: b; } -/* line 693, scss_css.scss */ -.foo { - /* Foo - * Bar */ - a: b; } -/* Foo */ -/* line 699, scss_css.scss */ -.foo { - a: b; } -/* Foo - * Bar */ -.foo { - a: b; } - -.foo #bar:baz(/* bang )*/ bip) { - /* .a #foo */ - a: b; } -/* line 712, scss_css.scss */ -> E { - a: b; } -/* line 716, scss_css.scss */ -+ E { - a: b; } -/* line 720, scss_css.scss */ -~ E { - a: b; } -/* line 724, scss_css.scss */ -> > E { - a: b; } -/* line 728, scss_css.scss */ ->> E { - a: b; } -/* line 732, scss_css.scss */ -E* { - a: b; } -/* line 736, scss_css.scss */ -E*.foo { - a: b; } -/* line 740, scss_css.scss */ -E*:hover { - a: b; } - -E, F { - /* line 745, scss_css.scss */ - a: b; } - -E F { - /* line 750, scss_css.scss */ - a: b; } - -E, F G, H { - /* line 755, scss_css.scss */ - a: b; } -/* line 759, scss_css.scss */ -body { - /* - //comment here - */ } -/* line 766, scss_css.scss */ -E > F { - a: b; } -/* line 768, scss_css.scss */ -E ~ F { - a: b; } -/* line 770, scss_css.scss */ -E + F { - a: b; } -/* line 772, scss_css.scss */ -* { - a: b; } -/* line 776, scss_css.scss */ -E { - a: b; } -/* line 780, scss_css.scss */ -E[foo] { - a: b; } -/* line 784, scss_css.scss */ -E[foo="bar"] { - a: b; } -/* line 788, scss_css.scss */ -E[foo~="bar"] { - a: b; } -/* line 792, scss_css.scss */ -E[foo^="bar"] { - a: b; } -/* line 796, scss_css.scss */ -E[foo$="bar"] { - a: b; } -/* line 800, scss_css.scss */ -E[foo*="bar"] { - a: b; } -/* line 804, scss_css.scss */ -E[foo|="en"] { - a: b; } -/* line 808, scss_css.scss */ -E:root { - a: b; } -/* line 812, scss_css.scss */ -E:nth-child(n) { - a: b; } -/* line 816, scss_css.scss */ -E:nth-last-child(n) { - a: b; } -/* line 820, scss_css.scss */ -E:nth-of-type(n) { - a: b; } -/* line 824, scss_css.scss */ -E:nth-last-of-type(n) { - a: b; } -/* line 828, scss_css.scss */ -E:first-child { - a: b; } -/* line 832, scss_css.scss */ -E:last-child { - a: b; } -/* line 836, scss_css.scss */ -E:first-of-type { - a: b; } -/* line 840, scss_css.scss */ -E:last-of-type { - a: b; } -/* line 844, scss_css.scss */ -E:only-child { - a: b; } -/* line 848, scss_css.scss */ -E:only-of-type { - a: b; } -/* line 852, scss_css.scss */ -E:empty { - a: b; } -/* line 856, scss_css.scss */ -E:link { - a: b; } -/* line 860, scss_css.scss */ -E:visited { - a: b; } -/* line 864, scss_css.scss */ -E:active { - a: b; } -/* line 868, scss_css.scss */ -E:hover { - a: b; } -/* line 872, scss_css.scss */ -E:focus { - a: b; } -/* line 876, scss_css.scss */ -E:target { - a: b; } -/* line 880, scss_css.scss */ -E:lang(fr) { - a: b; } -/* line 884, scss_css.scss */ -E:enabled { - a: b; } -/* line 888, scss_css.scss */ -E:disabled { - a: b; } -/* line 892, scss_css.scss */ -E:checked { - a: b; } -/* line 896, scss_css.scss */ -E::first-line { - a: b; } -/* line 900, scss_css.scss */ -E::first-letter { - a: b; } -/* line 904, scss_css.scss */ -E::before { - a: b; } -/* line 908, scss_css.scss */ -E::after { - a: b; } -/* line 912, scss_css.scss */ -E.warning { - a: b; } -/* line 916, scss_css.scss */ -E#myid { - a: b; } -/* line 920, scss_css.scss */ -E:not(s) { - a: b; } -/* line 924, scss_css.scss */ -E F { - a: b; } -/* line 928, scss_css.scss */ -E > F { - a: b; } -/* line 932, scss_css.scss */ -E + F { - a: b; } -/* line 936, scss_css.scss */ -E ~ F { - a: b; } -/* line 940, scss_css.scss */ -@supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 941, scss_css.scss */ - .foo { - a: b; } } -/* line 947, scss_css.scss */ -@-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 948, scss_css.scss */ - .foo { - a: b; } } -/* line 954, scss_css.scss */ -foo { - foo: bar; - #baz: bang; - #bip: bop; } -/* line 960, scss_css.scss */ -foo { - a: -2; - b: -2.3em; - c: -50%; - d: -foo(bar baz); } -/* line 967, scss_css.scss */ -foo { - a: -0.5em; - b: 0.5em; - c: -foo(12px); - d: +foo(12px); } -/* line 977, scss_css.scss */ -foo { - -moz-foo-bar: blat; - -o-flat-blang: wibble; } -/* line 982, scss_css.scss */ -foo { - a: foo(); - b: bar baz-bang() bip; } From 83f0907efb8f09c4f37a0fcf6b64b0005fc63705 Mon Sep 17 00:00:00 2001 From: Gerhard Boden Date: Wed, 21 Jan 2015 02:38:15 +0100 Subject: [PATCH 23/33] Delete values_numbered.css --- tests/outputs/values_numbered.css | 37 ------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 tests/outputs/values_numbered.css diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css deleted file mode 100644 index c72f5c07..00000000 --- a/tests/outputs/values_numbered.css +++ /dev/null @@ -1,37 +0,0 @@ -/* line 2, values.scss */ -#values { - color: #eee; - color: #eee; - height: 20px; - width: 80%; - color: "hello world"; - height: url("http://google.com"); - dads: url(http://leafo.net); - padding: 10px 10px 10px 10px, 3px 3px 3px; - textblock: "This is a \ -multiline block \ -/* line 13, values.scss */ -#not { color: #eee;}"; - margin: 4, 3, 1; - content: "This is a \ -multiline string."; - border-radius: -1px -1px -1px black; } -/* line 20, values.scss */ -#subtraction { - lit: 10 -11; - lit: -1; - lit: -1; - lit: -1; - var: -90; - var: -90; - var: -90; - var: -90; } -/* line 34, values.scss */ -#special { - /* line 35, values.scss */ - a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } -/* line 38, values.scss */ -#unary { - b: 0.5em; - c: -foo(12px); - d: +foo(12px); } From 7009d773379caadb0f8c43fc2da2597bbeafa5c5 Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 02:44:11 +0100 Subject: [PATCH 24/33] fixed some CR / LF mixture in 3 files note: maybe the reason for the Travis CI failures --- tests/outputs/directives_numbered.css | 99 ++++ tests/outputs/scss_css_numbered.css | 792 ++++++++++++++++++++++++++ tests/outputs/values_numbered.css | 37 ++ 3 files changed, 928 insertions(+) create mode 100644 tests/outputs/directives_numbered.css create mode 100644 tests/outputs/scss_css_numbered.css create mode 100644 tests/outputs/values_numbered.css diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css new file mode 100644 index 00000000..c04fa5d9 --- /dev/null +++ b/tests/outputs/directives_numbered.css @@ -0,0 +1,99 @@ +@charset "hello-world"; +/* line 4, directives.scss */ +@page :left { + /* line 5, directives.scss */ + div { + color: red; } } +/* line 10, directives.scss */ +@page test { + /* line 11, directives.scss */ + @media yes { + /* line 12, directives.scss */ + /* line 16, directives.scss */ + div { + color: red; } } } +/* line 24, directives.scss */ +@media something { + /* line 25, directives.scss */ + @page { + /* line 26, directives.scss */ + @media else { + /* line 27, directives.scss */ + div { + height: 200px; } } } } +/* line 35, directives.scss */ +div { + color: red; + /* line 37, directives.scss */ } + @page yeah { + /* line 38, directives.scss */ + div pre { + height: 20px; } } +/* line 44, directives.scss */ +@font-face { + color: red; + height: 20px; } +/* line 50, directives.scss */ +@keyframes 'bounce' { + /* line 51, directives.scss */ + /* line 56, directives.scss */ + /* line 61, directives.scss */ + /* line 66, directives.scss */ + /* line 71, directives.scss */ + from { + top: 100px; + animation-timing-function: ease-out; } + + 25% { + top: 50px; + animation-timing-function: ease-in; } + + 50% { + top: 100px; + animation-timing-function: ease-out; } + + 75% { + top: 75px; + animation-timing-function: ease-in; } + + to { + top: 100px; } } +/* line 76, directives.scss */ +@-webkit-keyframes flowouttoleft { + /* line 77, directives.scss */ + /* line 78, directives.scss */ + /* line 79, directives.scss */ + 0% { + -webkit-transform: translateX(0) scale(1); } + + 60%, 70% { + -webkit-transform: translateX(0) scale(0.7); } + + 100% { + -webkit-transform: translateX(-100%) scale(0.7); } } +/* line 82, directives.scss */ +div { + animation-name: 'diagonal-slide'; + animation-duration: 5s; + animation-iteration-count: 10; } +/* line 88, directives.scss */ +@keyframes 'diagonal-slide' { + /* line 90, directives.scss */ + /* line 95, directives.scss */ + from { + left: 0; + top: 0; } + + to { + left: 100px; + top: 100px; } } + +@document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 105, directives.scss */ +regexp("https:.*") { + /* line 107, directives.scss */ + body { + color: purple; + background: yellow; } } diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css new file mode 100644 index 00000000..3d13a5aa --- /dev/null +++ b/tests/outputs/scss_css_numbered.css @@ -0,0 +1,792 @@ +@import "foo.css"; +@import 'foo.css'; +@import url("foo.css"); +@import url('foo.css'); +@import url(foo.css); +@import "foo.css" screen; +@import "foo.css" screen, print; +@charset "UTF-8"; +/* line 1, scss_css.scss */ +[foo~=bar] { + a: b; } +/* line 5, scss_css.scss */ +[foo^=bar] { + a: b; } +/* line 9, scss_css.scss */ +[foo$=bar] { + a: b; } +/* line 13, scss_css.scss */ +[foo*=bar] { + a: b; } +/* line 17, scss_css.scss */ +[foo|=en] { + a: b; } +/* line 21, scss_css.scss */ +foo { + a: 2; + b: 2.3em; + c: 50%; + d: "fraz bran"; + e: flanny-blanny-blan; + f: url(http://sass-lang.com); + h: #abc; } +/* line 32, scss_css.scss */ +selector { + property: value; + property2: value; } +/* line 37, scss_css.scss */ +sel { + p: v; } +/* line 39, scss_css.scss */ +.foo { + /* Foo + Bar + Baz */ + a: b; } +/* line 46, scss_css.scss */ +.foo { + /* Foo + Bar + Baz */ + a: b; } + +.foo { + /* Foo + Bar */ + a: b; } + +.foo { + /* Foo + Bar + Baz */ + a: b; } +/* line 64, scss_css.scss */ +@foo { + /* line 65, scss_css.scss */ + a: b; + rule { + a: b; } } +/* line 71, scss_css.scss */ +@foo { + a: b; } + +@bar { + /* line 72, scss_css.scss */ + a: b; } + +@foo "bar" +/* line 77, scss_css.scss */ +foo { + a: 12px calc(100%/3 - 2*1em - 2*1px); + b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); + b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); + b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } +/* line 84, scss_css.scss */ +foo { + bar: baz; } + +bar { + bar: baz; } + +baz { + bar: baz; } +/* + * foo + */ +/* line 94, scss_css.scss */ +bar { + baz: bang; } +/* line 97, scss_css.scss */ +E, F { + a: b; } +/* line 101, scss_css.scss */ +E F, G H { + a: b; } +/* line 105, scss_css.scss */ +E > F, G > H { + a: b; } +/* This is a CSS comment. */ +.one { + color: green; } +/* Another comment */ +/* The following should not be used: + .two {color: red;} */ +.three { + color: green; + /* color: red; */ } +/** + .four {color: red;} */ +/* line 116, scss_css.scss */ +.five { + color: green; } +/**/ +/* line 118, scss_css.scss */ +.six { + color: green; } +/*********/ +/* line 120, scss_css.scss */ +.seven { + color: green; } +/* a comment **/ +/* line 122, scss_css.scss */ +.eight { + color: green; } +/* line 125, scss_css.scss */ +foo { + a: \foo bar; + b: foo\ bar; + c: \2022 \0020; + d: foo\\bar; + e: foo\"\'bar; } +/* line 133, scss_css.scss */ +foo { + a: "\foo bar"; + b: "foo\ bar"; + c: "\2022 \0020"; + d: "foo\\bar"; + e: "foo\"'bar"; } +/* line 141, scss_css.scss */ +foo { + _name: val; + *name: val; + :name: val; + .name: val; + #name: val; + name/**/: val; + name/*\**/: val; + name: val; } + +@foo "bar" ; +/* line 154, scss_css.scss */ +foo { + a: -moz-element(#foo); + b: -webkit-element(#foo); + b: -foobar-element(#foo); } +/* line 160, scss_css.scss */ +/* line 162, scss_css.scss */ + +@foo ; +/* line 168, scss_css.scss */ +foo { + bar: baz; } +/* line 173, scss_css.scss */ +/* line 175, scss_css.scss */ + +/* line 179, scss_css.scss */ + +0% { + a: b; } +/* line 183, scss_css.scss */ +60% { + a: b; } +/* line 187, scss_css.scss */ +100% { + a: b; } +/* line 191, scss_css.scss */ +12px { + a: b; } +/* line 195, scss_css.scss */ +"foo" { + a: b; } +/* line 199, scss_css.scss */ +foo { + /* line 200, scss_css.scss */ + a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } +/* line 203, scss_css.scss */ +:foo("bar") { + a: b; } +/* line 207, scss_css.scss */ +:foo(bar) { + a: b; } +/* line 211, scss_css.scss */ +:foo(12px) { + a: b; } +/* line 215, scss_css.scss */ +:foo(+) { + a: b; } +/* line 219, scss_css.scss */ +:foo(-) { + a: b; } +/* line 223, scss_css.scss */ +:foo(+"bar") { + a: b; } +/* line 227, scss_css.scss */ +:foo(-++--baz-"bar"12px) { + a: b; } +/* line 231, scss_css.scss */ +foo { + a: foo-bar(12); + b: -foo-bar-baz(13, 14 15); } + +@import "foo.css" screen, print and (foo: 0); +@import "foo.css" screen, only print, screen and (foo: 0); +/* line 254, scss_css.scss */ +foo { + a: foo !important; + b: foo bar !important; + b: foo, bar !important; } +/* line 260, scss_css.scss */ +foo { + a: -moz-bar-baz; + b: foo -o-bar-baz; } + +foo { + a: d; + /* b; c: */ } + +foo { + a : d; + /*: b; c */ } +/* Foo + * Bar */ +/* line 275, scss_css.scss */ +.foo { + /* Foo + * Bar */ } +/* line 280, scss_css.scss */ +[foo] { + a: b; } +/* line 284, scss_css.scss */ +[foo="bar"] { + a: b; } +/* line 288, scss_css.scss */ +[foo~="bar"] { + a: b; } +/* line 292, scss_css.scss */ +[foo^="bar"] { + a: b; } +/* line 296, scss_css.scss */ +[foo$="bar"] { + a: b; } +/* line 300, scss_css.scss */ +[foo*="bar"] { + a: b; } +/* line 304, scss_css.scss */ +[foo|="en"] { + a: b; } +/* line 308, scss_css.scss */ +:root { + a: b; } +/* line 312, scss_css.scss */ +:nth-child(n) { + a: b; } +/* line 316, scss_css.scss */ +:nth-last-child(n) { + a: b; } +/* line 320, scss_css.scss */ +:nth-of-type(n) { + a: b; } +/* line 324, scss_css.scss */ +:nth-last-of-type(n) { + a: b; } +/* line 328, scss_css.scss */ +:first-child { + a: b; } +/* line 332, scss_css.scss */ +:last-child { + a: b; } +/* line 336, scss_css.scss */ +:first-of-type { + a: b; } +/* line 340, scss_css.scss */ +:last-of-type { + a: b; } +/* line 344, scss_css.scss */ +:only-child { + a: b; } +/* line 348, scss_css.scss */ +:only-of-type { + a: b; } +/* line 352, scss_css.scss */ +:empty { + a: b; } +/* line 356, scss_css.scss */ +:link { + a: b; } +/* line 360, scss_css.scss */ +:visited { + a: b; } +/* line 364, scss_css.scss */ +:active { + a: b; } +/* line 368, scss_css.scss */ +:hover { + a: b; } +/* line 372, scss_css.scss */ +:focus { + a: b; } +/* line 376, scss_css.scss */ +:target { + a: b; } +/* line 380, scss_css.scss */ +:lang(fr) { + a: b; } +/* line 384, scss_css.scss */ +:enabled { + a: b; } +/* line 388, scss_css.scss */ +:disabled { + a: b; } +/* line 392, scss_css.scss */ +:checked { + a: b; } +/* line 396, scss_css.scss */ +::first-line { + a: b; } +/* line 400, scss_css.scss */ +::first-letter { + a: b; } +/* line 404, scss_css.scss */ +::before { + a: b; } +/* line 408, scss_css.scss */ +::after { + a: b; } +/* line 412, scss_css.scss */ +.warning { + a: b; } +/* line 416, scss_css.scss */ +#myid { + a: b; } +/* line 420, scss_css.scss */ +:not(s) { + a: b; } +/* line 424, scss_css.scss */ +@media all { + /* line 425, scss_css.scss */ + /* line 428, scss_css.scss */ + rule1 { + prop: val; } + rule2 { + prop: val; } } +/* line 432, scss_css.scss */ +@media screen, print { + /* line 433, scss_css.scss */ + /* line 436, scss_css.scss */ + rule1 { + prop: val; } + rule2 { + prop: val; } } +/* line 440, scss_css.scss */ +@media screen and (-webkit-min-device-pixel-ratio: 0) { + a: b; } +/* line 444, scss_css.scss */ +@media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { + a: b; } +/* line 448, scss_css.scss */ +:-moz-any(h1, h2, h3) { + a: b; } +/* line 452, scss_css.scss */ +:-moz-any(.foo) { + a: b; } +/* line 456, scss_css.scss */ +:-moz-any(foo bar, .baz > .bang) { + a: b; } + +@-moz-document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 463, scss_css.scss */ +regexp("^https:.*") { + /* line 464, scss_css.scss */ + .foo { + a: b; } } +/* line 468, scss_css.scss */ +foo { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } +/* line 473, scss_css.scss */ +foo { + filter: alpha(opacity=20); + filter: alpha(opacity=20, enabled=true); + filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } +/* line 479, scss_css.scss */ +@foo bar { + a: b; } +/* line 482, scss_css.scss */ +@bar baz { + c: d; } + +@foo bar; +@bar baz; +/* Foo +* Bar */ +/* Baz +* Bang */ +/* line 496, scss_css.scss */ +.foo { + /* Foo + * Bar */ + /* Baz + * Bang */ } +/* line 503, scss_css.scss */ +.foo { + /* Foo Bar */ + /* Baz Bang */ } + +@namespace "http://www.w3.org/Profiles/xhtml1-strict"; +@namespace url(http://www.w3.org/Profiles/xhtml1-strict); +@namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); +/* line 513, scss_css.scss */ +[foo|bar=baz] { + a: b; } +/* line 517, scss_css.scss */ +[*|bar=baz] { + a: b; } +/* line 521, scss_css.scss */ +[foo|bar|=baz] { + a: b; } +/* line 525, scss_css.scss */ +foo|E { + a: b; } +/* line 529, scss_css.scss */ +*|E { + a: b; } +/* line 533, scss_css.scss */ +foo|* { + a: b; } +/* line 537, scss_css.scss */ +*|* { + a: b; } +/* line 541, scss_css.scss */ +:not(foo|bar) { + a: b; } +/* line 545, scss_css.scss */ +:not(*|bar) { + a: b; } +/* line 549, scss_css.scss */ +:not(foo|*) { + a: b; } +/* line 553, scss_css.scss */ +:not(*|*) { + a: b; } +/* line 557, scss_css.scss */ +:not(#blah) { + a: b; } +/* line 561, scss_css.scss */ +:not(.blah) { + a: b; } +/* line 565, scss_css.scss */ +:not([foo]) { + a: b; } +/* line 569, scss_css.scss */ +:not([foo^="bar"]) { + a: b; } +/* line 573, scss_css.scss */ +:not([baz|foo~="bar"]) { + a: b; } +/* line 577, scss_css.scss */ +:not(:hover) { + a: b; } +/* line 581, scss_css.scss */ +:not(:nth-child(2n + 3)) { + a: b; } +/* line 585, scss_css.scss */ +:not(:not(#foo)) { + a: b; } +/* line 589, scss_css.scss */ +:not(a#foo.bar) { + a: b; } +/* line 593, scss_css.scss */ +:not(#foo .bar > baz) { + a: b; } +/* line 597, scss_css.scss */ +:not(h1, h2, h3) { + a: b; } +/* line 605, scss_css.scss */ +foo { + /* line 606, scss_css.scss */ + a: "bang 1 bar bip"; } +/* line 609, scss_css.scss */ +:nth-child(-n) { + a: b; } +/* line 613, scss_css.scss */ +:nth-child(+n) { + a: b; } +/* line 617, scss_css.scss */ +:nth-child(even) { + a: b; } +/* line 621, scss_css.scss */ +:nth-child(odd) { + a: b; } +/* line 625, scss_css.scss */ +:nth-child(50) { + a: b; } +/* line 629, scss_css.scss */ +:nth-child(-50) { + a: b; } +/* line 633, scss_css.scss */ +:nth-child(+50) { + a: b; } +/* line 637, scss_css.scss */ +:nth-child(2n+3) { + a: b; } +/* line 641, scss_css.scss */ +:nth-child(2n-3) { + a: b; } +/* line 645, scss_css.scss */ +:nth-child(+2n-3) { + a: b; } +/* line 649, scss_css.scss */ +:nth-child(-2n+3) { + a: b; } +/* line 653, scss_css.scss */ +:nth-child(-2n+ 3) { + a: b; } +/* line 657, scss_css.scss */ +:nth-child( 2n + 3) { + a: b; } +/* line 661, scss_css.scss */ +foo { + a: foo bar baz; + b: foo, #abc, -12; + c: 1px/2px/-3px; + d: foo bar, baz/bang; } +/* line 668, scss_css.scss */ +@page { + prop1: val; + prop2: val; } +/* line 673, scss_css.scss */ +@page flap { + prop1: val; + prop2: val; } +/* line 678, scss_css.scss */ +@page :first { + prop1: val; + prop2: val; } +/* line 683, scss_css.scss */ +@page flap:first { + prop1: val; + prop2: val; } +/* line 688, scss_css.scss */ +.foo { + /* Foo */ + a: b; } +/* line 693, scss_css.scss */ +.foo { + /* Foo + * Bar */ + a: b; } +/* Foo */ +/* line 699, scss_css.scss */ +.foo { + a: b; } +/* Foo + * Bar */ +.foo { + a: b; } + +.foo #bar:baz(/* bang )*/ bip) { + /* .a #foo */ + a: b; } +/* line 712, scss_css.scss */ +> E { + a: b; } +/* line 716, scss_css.scss */ ++ E { + a: b; } +/* line 720, scss_css.scss */ +~ E { + a: b; } +/* line 724, scss_css.scss */ +> > E { + a: b; } +/* line 728, scss_css.scss */ +>> E { + a: b; } +/* line 732, scss_css.scss */ +E* { + a: b; } +/* line 736, scss_css.scss */ +E*.foo { + a: b; } +/* line 740, scss_css.scss */ +E*:hover { + a: b; } + +E, F { + /* line 745, scss_css.scss */ + a: b; } + +E F { + /* line 750, scss_css.scss */ + a: b; } + +E, F G, H { + /* line 755, scss_css.scss */ + a: b; } +/* line 759, scss_css.scss */ +body { + /* + //comment here + */ } +/* line 766, scss_css.scss */ +E > F { + a: b; } +/* line 768, scss_css.scss */ +E ~ F { + a: b; } +/* line 770, scss_css.scss */ +E + F { + a: b; } +/* line 772, scss_css.scss */ +* { + a: b; } +/* line 776, scss_css.scss */ +E { + a: b; } +/* line 780, scss_css.scss */ +E[foo] { + a: b; } +/* line 784, scss_css.scss */ +E[foo="bar"] { + a: b; } +/* line 788, scss_css.scss */ +E[foo~="bar"] { + a: b; } +/* line 792, scss_css.scss */ +E[foo^="bar"] { + a: b; } +/* line 796, scss_css.scss */ +E[foo$="bar"] { + a: b; } +/* line 800, scss_css.scss */ +E[foo*="bar"] { + a: b; } +/* line 804, scss_css.scss */ +E[foo|="en"] { + a: b; } +/* line 808, scss_css.scss */ +E:root { + a: b; } +/* line 812, scss_css.scss */ +E:nth-child(n) { + a: b; } +/* line 816, scss_css.scss */ +E:nth-last-child(n) { + a: b; } +/* line 820, scss_css.scss */ +E:nth-of-type(n) { + a: b; } +/* line 824, scss_css.scss */ +E:nth-last-of-type(n) { + a: b; } +/* line 828, scss_css.scss */ +E:first-child { + a: b; } +/* line 832, scss_css.scss */ +E:last-child { + a: b; } +/* line 836, scss_css.scss */ +E:first-of-type { + a: b; } +/* line 840, scss_css.scss */ +E:last-of-type { + a: b; } +/* line 844, scss_css.scss */ +E:only-child { + a: b; } +/* line 848, scss_css.scss */ +E:only-of-type { + a: b; } +/* line 852, scss_css.scss */ +E:empty { + a: b; } +/* line 856, scss_css.scss */ +E:link { + a: b; } +/* line 860, scss_css.scss */ +E:visited { + a: b; } +/* line 864, scss_css.scss */ +E:active { + a: b; } +/* line 868, scss_css.scss */ +E:hover { + a: b; } +/* line 872, scss_css.scss */ +E:focus { + a: b; } +/* line 876, scss_css.scss */ +E:target { + a: b; } +/* line 880, scss_css.scss */ +E:lang(fr) { + a: b; } +/* line 884, scss_css.scss */ +E:enabled { + a: b; } +/* line 888, scss_css.scss */ +E:disabled { + a: b; } +/* line 892, scss_css.scss */ +E:checked { + a: b; } +/* line 896, scss_css.scss */ +E::first-line { + a: b; } +/* line 900, scss_css.scss */ +E::first-letter { + a: b; } +/* line 904, scss_css.scss */ +E::before { + a: b; } +/* line 908, scss_css.scss */ +E::after { + a: b; } +/* line 912, scss_css.scss */ +E.warning { + a: b; } +/* line 916, scss_css.scss */ +E#myid { + a: b; } +/* line 920, scss_css.scss */ +E:not(s) { + a: b; } +/* line 924, scss_css.scss */ +E F { + a: b; } +/* line 928, scss_css.scss */ +E > F { + a: b; } +/* line 932, scss_css.scss */ +E + F { + a: b; } +/* line 936, scss_css.scss */ +E ~ F { + a: b; } +/* line 940, scss_css.scss */ +@supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { + /* line 941, scss_css.scss */ + .foo { + a: b; } } +/* line 947, scss_css.scss */ +@-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { + /* line 948, scss_css.scss */ + .foo { + a: b; } } +/* line 954, scss_css.scss */ +foo { + foo: bar; + #baz: bang; + #bip: bop; } +/* line 960, scss_css.scss */ +foo { + a: -2; + b: -2.3em; + c: -50%; + d: -foo(bar baz); } +/* line 967, scss_css.scss */ +foo { + a: -0.5em; + b: 0.5em; + c: -foo(12px); + d: +foo(12px); } +/* line 977, scss_css.scss */ +foo { + -moz-foo-bar: blat; + -o-flat-blang: wibble; } +/* line 982, scss_css.scss */ +foo { + a: foo(); + b: bar baz-bang() bip; } diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css new file mode 100644 index 00000000..c72f5c07 --- /dev/null +++ b/tests/outputs/values_numbered.css @@ -0,0 +1,37 @@ +/* line 2, values.scss */ +#values { + color: #eee; + color: #eee; + height: 20px; + width: 80%; + color: "hello world"; + height: url("http://google.com"); + dads: url(http://leafo.net); + padding: 10px 10px 10px 10px, 3px 3px 3px; + textblock: "This is a \ +multiline block \ +/* line 13, values.scss */ +#not { color: #eee;}"; + margin: 4, 3, 1; + content: "This is a \ +multiline string."; + border-radius: -1px -1px -1px black; } +/* line 20, values.scss */ +#subtraction { + lit: 10 -11; + lit: -1; + lit: -1; + lit: -1; + var: -90; + var: -90; + var: -90; + var: -90; } +/* line 34, values.scss */ +#special { + /* line 35, values.scss */ + a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } +/* line 38, values.scss */ +#unary { + b: 0.5em; + c: -foo(12px); + d: +foo(12px); } From f07ddc82464dcc6be2daa4b112576858754d3b0d Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 03:04:54 +0100 Subject: [PATCH 25/33] make travis rebuild test files since he keeps failing (differences on certain lines with CR and LF) --- .gitattributes | 2 +- .travis.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitattributes b/.gitattributes index 6275e5f2..bdb0cabc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ # Auto detect text files and perform LF normalization -* text=eol=lf +* text=auto # Custom for Visual Studio *.cs diff=csharp diff --git a/.travis.yml b/.travis.yml index 4d069b5b..11734558 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,3 +8,5 @@ php: script: - phpunit tests + +env: BUILD=true \ No newline at end of file From e1ef5766a2ed59925d24ee04d36584013a2ff06f Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 03:10:37 +0100 Subject: [PATCH 26/33] uncomment BUILD ENV in travis.yml ... since travis has now compiled the files himself and formatted the LF and CR as he thinks it's correct for the assertions (finally) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 11734558..437d2291 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ php: script: - phpunit tests -env: BUILD=true \ No newline at end of file +#env: BUILD=true \ No newline at end of file From f2cae7a7b50e7c88a3da5a9cdd0752f9f5f20a6d Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 03:54:18 +0100 Subject: [PATCH 27/33] switched from \r\n to \n for EOL character since \n is also used in other parts of the project. this may solve the travis assertion issue --- src/LineCommentator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LineCommentator.php b/src/LineCommentator.php index c921509e..2c7becad 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -98,7 +98,7 @@ function ($value) { } - return implode("\r\n", $new_scss_content); + return implode("\n", $new_scss_content); } /* From 5f31fa6371150355f21cf7ae5af51c3202d75fde Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 13:06:43 +0100 Subject: [PATCH 28/33] minor adaption for line number test method --- tests/InputTest.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/tests/InputTest.php b/tests/InputTest.php index 73ef7cf9..c34464ef 100644 --- a/tests/InputTest.php +++ b/tests/InputTest.php @@ -62,7 +62,7 @@ public function testInputFile($inFname, $outFname) public function testLineNumbering($inFname, $outFname) { - $outPath = self::lineNumberPath($outFname); + $outPath = self::lineNumberOutPath($outFname); //insert line numbers $scss = LineCommentator::insertLineComments(file($inFname), self::fileName($inFname)); @@ -124,6 +124,7 @@ public static function outputNameFor($input) return __DIR__ . '/' . $out; } + public static function buildTests($pattern) { $files = self::findInputNames($pattern); @@ -132,13 +133,28 @@ public static function buildTests($pattern) } } - public static function lineNumberPath($outFname) { + /* + * return output filename inlcuding line_number_suffix + * + * @return string + */ + + + public static function lineNumberOutPath($outFname) { $outFname = preg_replace("/.css$/", self::$line_number_suffix.'.css', self::fileName($outFname)); return __DIR__ .'/'.self::$outputDir . '/' . $outFname; } + + /* + * return filename from path + * + * @return string + */ + + public static function fileName($path) { $filename = explode('/',$path); From 9e56ba81102b385dea8fc61513e4056b1109897f Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 21 Jan 2015 13:09:17 +0100 Subject: [PATCH 29/33] travis configuration --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 437d2291..84cee502 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,4 @@ php: # - hhvm script: - - phpunit tests - -#env: BUILD=true \ No newline at end of file + - phpunit tests \ No newline at end of file From b21ba90a420f630d1b366d89c97881afd408c3cc Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Thu, 22 Jan 2015 02:14:10 +0100 Subject: [PATCH 30/33] minor performance increase --- README.md | 11 +++++------ src/LineCommentator.php | 18 +++++++++++------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 29a1c187..2dc54e02 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Now you can output the original SCSS line numbers within the compiled CSS file f Works great in combination with frontend debugging tools like https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ -To activate this feature you need to call `->setLineNumbers(true)` after creating a new instance of compiler.php +To activate this feature you need to call `->setLineNumbers(true)` after creating a new instance of class 'compiler'. code sample: @@ -48,10 +48,9 @@ code sample: use Leafo\ScssPhp\Server; use \Leafo\ScssPhp\Compiler; - $directory = "css"; - require "lib/scssphp/scss.inc.php"; - + + $directory = "css"; $scss = new Compiler(); $scss->setLineNumbers(true); @@ -60,8 +59,8 @@ code sample: $server->serve(); -Performance impact is around 10% when a new CSS file is compiled with line numbers. +Performance impact is around 10% when a new CSS file is compiled with line numbers, compared to the same file without line numbers. **important note:** this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). -Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble finding the corresponding line in your scss file. +Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble to output the corresponding line from the comment. diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 2c7becad..c2efab36 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -53,12 +53,6 @@ class LineCommentator static function insertLineComments($scss, $filepath) { - //delete emtpy lines from array - $scss = array_filter($scss, - function ($value) { - $value = trim($value); - return !empty($value); - }); $lines = $scss; $new_scss_content = array(); @@ -70,6 +64,11 @@ function ($value) { $line = trim($line); $nextline = trim(next($lines)); + //check if empty + if (empty($line)) { + continue; + } + //check if line is a commment if (self::isComment($line) || self::$inside_multiline) { $new_scss_content[] = $line; @@ -162,7 +161,7 @@ static function isFunction($line) /* - * ignore includes (the included content however will have line numbers) + * ignore include * * @return: boolean */ @@ -191,6 +190,8 @@ static function isCondition($line) { return true; } + return false; + } /* @@ -198,6 +199,7 @@ static function isCondition($line) { * compiled scss */ static function isLoop($line) { + if ( strpos($line, self::loop_indicator_for) !== FALSE || @@ -207,6 +209,8 @@ static function isLoop($line) { return true; } + return false; + } From 5245e1f8829aba080cd549ca2401f917b1bdffe9 Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Wed, 28 Jan 2015 22:31:32 +0100 Subject: [PATCH 31/33] added support for direct call to 'compile' method now you can also call the 'compile' method directly when using line numbering (for more detailed information see readme) --- README.md | 20 ++++++++++++++++++++ src/Compiler.php | 36 ++++++++++++++++++++++++++++++++++-- src/LineCommentator.php | 2 +- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 2dc54e02..a3cd119c 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,26 @@ code sample: $server->serve(); +You can also call the 'compile' method directly (without using an instance of 'server' like above) + + namespace Leafo\ScssPhp; + + use Leafo\ScssPhp\Server; + use \Leafo\ScssPhp\Compiler; + + require "lib/scssphp/scss.inc.php"; + + $scss = new Compiler(); + + //the name argument is optional + $scss->setLineNumbers(true,'anyname.scss'); + + echo $scss->compile(' + $color: #abc; + div { color: lighten($color, 20%); } + '); + + Performance impact is around 10% when a new CSS file is compiled with line numbers, compared to the same file without line numbers. **important note:** this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). diff --git a/src/Compiler.php b/src/Compiler.php index f7f4c20a..3482a297 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -101,6 +101,7 @@ class Compiler protected $formatter = 'Leafo\ScssPhp\Formatter\Nested'; protected $lineNumbers = FALSE; + protected $fileName; /** * Compile scss @@ -124,7 +125,14 @@ public function compile($code, $name = null) setlocale(LC_NUMERIC, 'C'); if ($this->isLineNumbers()) { - $code = LineCommentator::insertLineComments(file($name), $name); + if (!$name) { + $code = explode("\n", $code); + $code = LineCommentator::insertLineComments($code, $this->getFileName()); + + } else { + $code = LineCommentator::insertLineComments(file($name), $name); + } + } $this->parser = new Parser($name); @@ -3036,13 +3044,37 @@ public function isLineNumbers() /** * use this function to turn line numbers on + * @param boolean $lineNumbers + * @param string $filename * @return boolean */ - public function setLineNumbers($lineNumbers) + public function setLineNumbers($lineNumbers, $filename = NULL) { $this->lineNumbers = $lineNumbers; + + if ($filename) { + $this->setFileName($filename); + } } + /** + * @return string + */ + public function getFileName() + { + return $this->fileName; + } + + /** + * @param string $fileName + */ + public function setFileName($fileName) + { + $this->fileName = $fileName; + } + + + diff --git a/src/LineCommentator.php b/src/LineCommentator.php index c2efab36..7ac752fc 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -51,7 +51,7 @@ class LineCommentator */ - static function insertLineComments($scss, $filepath) + static function insertLineComments($scss, $filepath = '') { $lines = $scss; From 2aab9e72f08e8b6d66bb81f3bbdab3ea8abe5ac4 Mon Sep 17 00:00:00 2001 From: gerhard-boden Date: Tue, 9 Jun 2015 22:37:51 +0200 Subject: [PATCH 32/33] fixed test case issue better support for "map_get" in combination with curly braces --- src/Compiler.php | 11 +-- src/LineCommentator.php | 55 ++++++++++----- tests/outputs/builtins_numbered.css | 3 +- tests/outputs/compass_extract_numbered.css | 31 ++++++--- tests/outputs/content_numbered.css | 11 +-- tests/outputs/directives_numbered.css | 47 ++++++------- tests/outputs/extends_numbered.css | 31 ++++----- tests/outputs/functions_numbered.css | 3 +- tests/outputs/interpolation_numbered.css | 80 ++++++++++++++-------- tests/outputs/media_numbered.css | 58 +++++++++------- tests/outputs/mixins_numbered.css | 45 ++++++------ tests/outputs/nesting_numbered.css | 17 +++-- tests/outputs/null_numbered.css | 27 +++++--- tests/outputs/operators_numbered.css | 6 +- tests/outputs/scss_css_numbered.css | 33 +++++---- tests/outputs/selectors_numbered.css | 39 +++++------ tests/outputs/values_numbered.css | 3 +- tests/outputs/variables_numbered.css | 6 +- 18 files changed, 287 insertions(+), 219 deletions(-) diff --git a/src/Compiler.php b/src/Compiler.php index 3482a297..a32f2542 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -126,13 +126,13 @@ public function compile($code, $name = null) if ($this->isLineNumbers()) { if (!$name) { + //string given $code = explode("\n", $code); $code = LineCommentator::insertLineComments($code, $this->getFileName()); - } else { + //filepath given $code = LineCommentator::insertLineComments(file($name), $name); } - } $this->parser = new Parser($name); @@ -821,7 +821,7 @@ protected function compileChild($child, $out) //do not nest line comments into the parrent block //for further information on the issue see https://github.com/leafo/scssphp/issues/228 - if ($this->isLineNumbers() && strpos($child[1], '/* line ') !==FALSE) { + if (strpos($child[1], '/* line ') !==FALSE) { $this->compileComment($child); break; } @@ -3073,9 +3073,4 @@ public function setFileName($fileName) $this->fileName = $fileName; } - - - - - } \ No newline at end of file diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 7ac752fc..2f894ab6 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -41,19 +41,18 @@ class LineCommentator const loop_indicator_while = "@while"; const loop_indicator_each = "@each"; + const map_indicator = 'map_get'; + //we use this to indicate that we are currently looping within a multiline comment static protected $inside_multiline; - /* insert line number as commentary within the SCSS file * * @return string; */ - static function insertLineComments($scss, $filepath = '') { - $lines = $scss; $new_scss_content = array(); @@ -82,21 +81,18 @@ static function insertLineComments($scss, $filepath = '') self::isMixin($line) == TRUE || self::isInclude($line) == TRUE || self::isCondition($line) == TRUE || - self::isLoop($line) == TRUE + self::isLoop($line) == TRUE || + self::isMap($line) == TRUE ) { $new_scss_content[] = $line; continue; } - //output line commment $new_scss_content[] = self::comment_indicator_start . ' line ' . ($linenumber + 1) . ', ' . $filepath . ' ' . self::comment_indicator_end; - $new_scss_content[] = $line; - } - return implode("\n", $new_scss_content); } @@ -108,9 +104,9 @@ static function insertLineComments($scss, $filepath = '') * * @return boolean */ + static function isSelector($line, $nextline = NULL) { - if ( (strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) && strpos($line, self::block_indicator_start) !== 0 @@ -137,7 +133,6 @@ static function isMixin($line) return false; } - /* * ignore functions * @@ -146,7 +141,6 @@ static function isMixin($line) static function isFunction($line) { - if ( strpos($line, self::function_indicator) !== FALSE || @@ -159,7 +153,6 @@ static function isFunction($line) } - /* * ignore include * @@ -168,7 +161,6 @@ static function isFunction($line) static function isInclude($line) { - if (strpos($line, self::include_indicator) !== FALSE) { return true; } @@ -180,8 +172,12 @@ static function isInclude($line) /* * dont't put a line number above if statement, since it will result in an empty line within the * compiled scss + * + * @return boolean */ - static function isCondition($line) { + + static function isCondition($line) + { if ( strpos($line, self::if_statement_indicator) !== FALSE || @@ -197,9 +193,12 @@ static function isCondition($line) { /* * dont't put a line number above loops, since it will result in an empty line within the * compiled scss - */ - static function isLoop($line) { + * + * @return boolean + */ + static function isLoop($line) + { if ( strpos($line, self::loop_indicator_for) !== FALSE || @@ -210,10 +209,8 @@ static function isLoop($line) { } return false; - } - /* * we don't want to mess around with existing comments since this can easily lead to parsing errors. * @@ -222,7 +219,6 @@ static function isLoop($line) { static function isComment($line) { - /* a comment has started, but did not end in the same line */ if (strpos($line, self::comment_indicator_start) !== FALSE && strpos($line, self::comment_indicator_end) === FALSE) { self::$inside_multiline = TRUE; @@ -249,4 +245,25 @@ static function isComment($line) return false; } + /* + * we don't want to confuse map_get statements with selectors + * this could happen fairly easy when the scss contains map_get statements + * that select the value by index (e.g. color: map_get($map, 'color#{2}')), because + * of the curly brackets. + * + * in case the selector and the map_get statement are all in one line, you will not + * receive a line commentary for that particularly line. + * + * @return boolean + */ + + static function isMap($line) + { + if (strpos($line, self::map_indicator) !== FALSE) { + return true; + } + + return false; + } + } \ No newline at end of file diff --git a/tests/outputs/builtins_numbered.css b/tests/outputs/builtins_numbered.css index 7e26341c..dc40ebfd 100644 --- a/tests/outputs/builtins_numbered.css +++ b/tests/outputs/builtins_numbered.css @@ -80,7 +80,6 @@ index: false; index: 2; index: 2; - /* line 115, builtins.scss */ index: 1; world: one, two, three, great, job; world: one, two, three, great job; @@ -88,6 +87,8 @@ cool: great job one two three; zip: 1px solid, 2px dashed; zip: 1px solid red, 2px dashed green; } + +/* line 115, builtins.scss */ /* line 129, builtins.scss */ #introspection { t: number; diff --git a/tests/outputs/compass_extract_numbered.css b/tests/outputs/compass_extract_numbered.css index 923c1cac..8a1bd422 100644 --- a/tests/outputs/compass_extract_numbered.css +++ b/tests/outputs/compass_extract_numbered.css @@ -8,29 +8,44 @@ size: 1; size: 2; size: 2; } + /* line 117, compass_extract.scss */ /* line 236, compass_extract.scss */ #test-1 { - /* line 142, compass_extract.scss */ margin-top: 7.5em; padding-top: 9em; padding-bottom: 10.5em; - /* line 157, compass_extract.scss */ margin-bottom: 0em; } + +/* line 142, compass_extract.scss */ + /* line 117, compass_extract.scss */ + /* line 117, compass_extract.scss */ + /* line 117, compass_extract.scss */ + +/* line 157, compass_extract.scss */ + /* line 117, compass_extract.scss */ /* line 240, compass_extract.scss */ #test-2 { - /* line 196, compass_extract.scss */ border-style: solid; border-width: 0.0625em; padding: 1.4375em; } + +/* line 196, compass_extract.scss */ + /* line 117, compass_extract.scss */ /* line 244, compass_extract.scss */ #test-3 { - /* line 184, compass_extract.scss */ border-top-style: solid; border-top-width: 0.0625em; padding-top: 1.4375em; - /* line 188, compass_extract.scss */ - /* line 184, compass_extract.scss */ border-bottom-style: solid; border-bottom-width: 0.0625em; - padding-bottom: 1.4375em; - /* line 188, compass_extract.scss */ } + padding-bottom: 1.4375em; } + +/* line 184, compass_extract.scss */ + /* line 117, compass_extract.scss */ + +/* line 188, compass_extract.scss */ + +/* line 184, compass_extract.scss */ + /* line 117, compass_extract.scss */ + +/* line 188, compass_extract.scss */ diff --git a/tests/outputs/content_numbered.css b/tests/outputs/content_numbered.css index e64b573f..10a0beae 100644 --- a/tests/outputs/content_numbered.css +++ b/tests/outputs/content_numbered.css @@ -1,6 +1,5 @@ /* line 3, content.scss */ -* html { - /* line 8, content.scss */ } +/* line 8, content.scss */ * html #logo { background-image: url(/logo.gif); } /* line 20, content.scss */ @@ -15,8 +14,9 @@ color: red; } } /* line 36, content.scss */ #sidebar { - width: 300px; - /* line 26, content.scss */ } + width: 300px; } + +/* line 26, content.scss */ @media only screen and (max-width: 480px) { #sidebar { width: 100px; } } @@ -29,9 +29,10 @@ width: 100%; } } /* line 46, content.scss */ @media only screen and (min-width: 40em) { - /* line 58, content.scss */ /* line 58, content.scss */ .grid-1 { width: 100%; } + + /* line 58, content.scss */ .grid-2 { width: 100%; } } diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css index c04fa5d9..2cb1a404 100644 --- a/tests/outputs/directives_numbered.css +++ b/tests/outputs/directives_numbered.css @@ -1,32 +1,34 @@ @charset "hello-world"; /* line 4, directives.scss */ @page :left { - /* line 5, directives.scss */ +/* line 5, directives.scss */ div { color: red; } } /* line 10, directives.scss */ @page test { - /* line 11, directives.scss */ +/* line 11, directives.scss */ @media yes { /* line 12, directives.scss */ - /* line 16, directives.scss */ div { - color: red; } } } + color: red; } + + /* line 16, directives.scss */ } } /* line 24, directives.scss */ @media something { /* line 25, directives.scss */ @page { - /* line 26, directives.scss */ + /* line 26, directives.scss */ @media else { /* line 27, directives.scss */ div { height: 200px; } } } } /* line 35, directives.scss */ div { - color: red; - /* line 37, directives.scss */ } + color: red; } + +/* line 37, directives.scss */ @page yeah { - /* line 38, directives.scss */ +/* line 38, directives.scss */ div pre { height: 20px; } } /* line 44, directives.scss */ @@ -35,40 +37,34 @@ div { height: 20px; } /* line 50, directives.scss */ @keyframes 'bounce' { - /* line 51, directives.scss */ - /* line 56, directives.scss */ - /* line 61, directives.scss */ - /* line 66, directives.scss */ - /* line 71, directives.scss */ +/* line 51, directives.scss */ from { top: 100px; animation-timing-function: ease-out; } - +/* line 56, directives.scss */ 25% { top: 50px; animation-timing-function: ease-in; } - +/* line 61, directives.scss */ 50% { top: 100px; animation-timing-function: ease-out; } - +/* line 66, directives.scss */ 75% { top: 75px; animation-timing-function: ease-in; } - +/* line 71, directives.scss */ to { top: 100px; } } /* line 76, directives.scss */ @-webkit-keyframes flowouttoleft { - /* line 77, directives.scss */ - /* line 78, directives.scss */ - /* line 79, directives.scss */ +/* line 77, directives.scss */ 0% { -webkit-transform: translateX(0) scale(1); } - +/* line 78, directives.scss */ 60%, 70% { -webkit-transform: translateX(0) scale(0.7); } - +/* line 79, directives.scss */ 100% { -webkit-transform: translateX(-100%) scale(0.7); } } /* line 82, directives.scss */ @@ -78,12 +74,11 @@ div { animation-iteration-count: 10; } /* line 88, directives.scss */ @keyframes 'diagonal-slide' { - /* line 90, directives.scss */ - /* line 95, directives.scss */ +/* line 90, directives.scss */ from { left: 0; top: 0; } - +/* line 95, directives.scss */ to { left: 100px; top: 100px; } } @@ -93,7 +88,7 @@ url-prefix(http://www.w3.org/Style/), domain(mozilla.org), /* line 105, directives.scss */ regexp("https:.*") { - /* line 107, directives.scss */ +/* line 107, directives.scss */ body { color: purple; background: yellow; } } diff --git a/tests/outputs/extends_numbered.css b/tests/outputs/extends_numbered.css index b316bba6..b7c5eb8a 100644 --- a/tests/outputs/extends_numbered.css +++ b/tests/outputs/extends_numbered.css @@ -3,14 +3,14 @@ error, pre seriousError, span seriousError, other, hello { border: 1px #f00; background-color: #fdd; } /* line 7, extends.scss */ -pre, span { - /* line 8, extends.scss */ } +/* line 8, extends.scss */ pre seriousError, span seriousError { font-size: 20px; } /* line 14, extends.scss */ hello { - color: green; - /* line 17, extends.scss */ } + color: green; } + +/* line 17, extends.scss */ hello div { margin: 10px; } /* line 22, extends.scss */ @@ -30,8 +30,7 @@ a:hover, .hoverlink, #demo .overview .fakelink:hover { div.hello.world.hmm, pre div.okay.span.world.hmm, pre #butt .umm div.sure.span.world.hmm, #butt .umm pre div.sure.span.world.hmm, code div.okay.span.world.hmm, code #butt .umm div.sure.span.world.hmm, #butt .umm code div.sure.span.world.hmm { color: blue; } /* line 44, extends.scss */ -pre, code { - /* line 45, extends.scss */ } +/* line 45, extends.scss */ /* line 51, extends.scss */ .xxxxx .xxxxx .xxxxx, code .xxxxx .xxxxx, code code .xxxxx, code code code, code .xxxxx code, .xxxxx code .xxxxx, .xxxxx code code, .xxxxx .xxxxx code { @@ -95,8 +94,7 @@ man { wassup { color: blue; } /* line 128, extends.scss */ -.foo { - /* line 129, extends.scss */ } +/* line 129, extends.scss */ .foo .wassup { color: blue; } /* line 137, extends.scss */ @@ -107,26 +105,23 @@ wassup { /* line 151, extends.scss */ -.nav-tabs { - /* line 152, extends.scss */ } +/* line 152, extends.scss */ /* line 156, extends.scss */ .nav-justified, .nav-tabs.nav-justified { text-align: justify; } .btn:hover, .edit .actions button:hover, .edit .new .actions button:hover, .btn:active, .edit .actions button:active, .edit .new .actions button:active, .btn.active, .edit .actions button.active, .edit .new .actions button.active, .btn.disabled, .edit .actions button.disabled, .edit .new .actions button.disabled, .btn[disabled], .edit .actions button[disabled], .edit .new .actions button[disabled] { - /* line 166, extends.scss */ color: red; } + +/* line 166, extends.scss */ /* line 169, extends.scss */ -.edit .actions { - /* line 170, extends.scss */ } +/* line 170, extends.scss */ .edit .actions button { float: right; } /* line 175, extends.scss */ -.edit { - /* line 176, extends.scss */ } - .edit .new { - /* line 177, extends.scss */ - /* line 180, extends.scss */ } +/* line 176, extends.scss */ + /* line 177, extends.scss */ .edit .new .actions { padding: 0; } + /* line 180, extends.scss */ diff --git a/tests/outputs/functions_numbered.css b/tests/outputs/functions_numbered.css index 499d86ca..abe573ca 100644 --- a/tests/outputs/functions_numbered.css +++ b/tests/outputs/functions_numbered.css @@ -19,8 +19,7 @@ div { .foo { test2: -moz-art; } /* line 77, functions.scss */ -div { - /* line 67, functions.scss */ } +/* line 67, functions.scss */ div span { height: 3px; } /* line 87, functions.scss */ diff --git a/tests/outputs/interpolation_numbered.css b/tests/outputs/interpolation_numbered.css index 82f2f908..f2b650e8 100644 --- a/tests/outputs/interpolation_numbered.css +++ b/tests/outputs/interpolation_numbered.css @@ -1,45 +1,58 @@ /* line 2, interpolation.scss */ div { - /* line 3, interpolation.scss */ color: redwhite blue; - /* line 4, interpolation.scss */ color: red white blue; - /* line 5, interpolation.scss */ color: red whiteblue; - /* line 6, interpolation.scss */ color: redwhiteblue; - /* line 7, interpolation.scss */ color: ummyeahwhat; - /* line 8, interpolation.scss */ color: stacked; - /* line 10, interpolation.scss */ font-size: 10px/something; - /* line 11, interpolation.scss */ font-size: 10px / something; - /* line 13, interpolation.scss */ test: "whatworldwrong"; - /* line 14, interpolation.scss */ test: "whatworldwrong"; - /* line 15, interpolation.scss */ test: "whatworldwrong"; - /* line 16, interpolation.scss */ test: "what"world"wrong"; - /* line 18, interpolation.scss */ hi: "what is 16 end"; } + +/* line 3, interpolation.scss */ + +/* line 4, interpolation.scss */ + +/* line 5, interpolation.scss */ + +/* line 6, interpolation.scss */ + +/* line 7, interpolation.scss */ + +/* line 8, interpolation.scss */ + +/* line 10, interpolation.scss */ + +/* line 11, interpolation.scss */ + +/* line 13, interpolation.scss */ + +/* line 14, interpolation.scss */ + +/* line 15, interpolation.scss */ + +/* line 16, interpolation.scss */ + +/* line 18, interpolation.scss */ /* line 24, interpolation.scss */ -pre { - /* line 27, interpolation.scss */ - /* line 31, interpolation.scss */ - /* line 35, interpolation.scss */ } +/* line 27, interpolation.scss */ pre var { color: red; } + +/* line 31, interpolation.scss */ pre var dad { color: red; } + +/* line 35, interpolation.scss */ pre bedvardad { color: red; } /* line 40, interpolation.scss */ -cool { - /* line 42, interpolation.scss */ } +/* line 42, interpolation.scss */ cool .thing-1 { color: red; } cool .thing-2 { @@ -64,20 +77,29 @@ div.element:nth-child(2n) { display: none; } /* line 69, interpolation.scss */ div { - /* line 71, interpolation.scss */ hello: world; coolhello: world; - /* line 72, interpolation.scss */ helloone: world; - /* line 73, interpolation.scss */ twohelloone: world; - /* line 74, interpolation.scss */ oneabtwo: cool; - /* line 76, interpolation.scss */ - /* line 78, interpolation.scss */ - /* line 79, interpolation.scss */ hello-world: red; hello-mold: white; - /* line 80, interpolation.scss */ - hello-hello: blue; - /* line 81, interpolation.scss */ } + hello-hello: blue; } + +/* line 71, interpolation.scss */ + +/* line 72, interpolation.scss */ + +/* line 73, interpolation.scss */ + +/* line 74, interpolation.scss */ + +/* line 76, interpolation.scss */ + +/* line 78, interpolation.scss */ + +/* line 79, interpolation.scss */ + +/* line 80, interpolation.scss */ + +/* line 81, interpolation.scss */ diff --git a/tests/outputs/media_numbered.css b/tests/outputs/media_numbered.css index b4ea5d47..af3d1028 100644 --- a/tests/outputs/media_numbered.css +++ b/tests/outputs/media_numbered.css @@ -29,12 +29,15 @@ /* line 28, media.scss */ @media not hello and (world) { color: blue; + /* line 30, media.scss */ - /* line 34, media.scss */ pre { - color: blue; } } + color: blue; } + + /* line 34, media.scss */ } @media butt and (world) { color: red; + /* line 36, media.scss */ div { color: red; } } @@ -49,67 +52,69 @@ /* line 55, media.scss */ } /* line 64, media.scss */ div { - color: blue; - /* line 66, media.scss */ } + color: blue; } + +/* line 66, media.scss */ @media screen and (-webkit-min-device-pixel-ratio: 1.5) { - div { - /* line 67, media.scss */ } + /* line 67, media.scss */ div .sidebar { width: 500px; } } /* line 81, media.scss */ div { - position: absolute; - /* line 84, media.scss */ } + position: absolute; } + +/* line 84, media.scss */ @media screen { div { top: 0; - /* line 87, media.scss */ bottom: 8em; - color: red; - /* line 76, media.scss */ } + color: red; } + /* line 87, media.scss */ div p { margin: 5px; } - + /* line 76, media.scss */ div .success { color: green; } } /* line 95, media.scss */ .button { width: 300px; height: 100px; - background: #eee; - /* line 100, media.scss */ - /* line 104, media.scss */ } + background: #eee; } + +/* line 100, media.scss */ .button :hover { background: #aaa; } + +/* line 104, media.scss */ @media only screen and (max-width: 300px) { .button { width: 100px; height: 100px; } } /* line 110, media.scss */ code { - position: absolute; - /* line 112, media.scss */ } + position: absolute; } + +/* line 112, media.scss */ @media screen { code { - /* line 113, media.scss */ height: 10px; } + /* line 113, media.scss */ code pre { height: 20px; } } /* line 120, media.scss */ -dt { - /* line 121, media.scss */ } +/* line 121, media.scss */ @media screen { - dt { - /* line 122, media.scss */ } } + /* line 122, media.scss */ } @media screen and (color: blue) { dt { height: 10px; } } /* line 129, media.scss */ @media screen { /* line 130, media.scss */ - /* line 133, media.scss */ .screen { - width: 12px; } } + width: 12px; } + + /* line 133, media.scss */ } @media only screen { /* line 134, media.scss */ .only-screen { @@ -117,9 +122,10 @@ dt { /* line 140, media.scss */ @media only screen { /* line 141, media.scss */ - /* line 144, media.scss */ .only-screen { - width: 14px; } } + width: 14px; } + + /* line 144, media.scss */ } @media only screen { /* line 145, media.scss */ .only-screen { diff --git a/tests/outputs/mixins_numbered.css b/tests/outputs/mixins_numbered.css index bee388d8..63988fce 100644 --- a/tests/outputs/mixins_numbered.css +++ b/tests/outputs/mixins_numbered.css @@ -1,14 +1,16 @@ /* line 9, mixins.scss */ div { color: blue; - color: red; - /* line 4, mixins.scss */ } + color: red; } + +/* line 4, mixins.scss */ div pre { height: 200px; } /* line 26, mixins.scss */ span { - color: blue; - /* line 17, mixins.scss */ } + color: blue; } + +/* line 17, mixins.scss */ span div { height: 20px; } /* line 30, mixins.scss */ @@ -34,24 +36,23 @@ div { -webkit-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; } /* line 81, mixins.scss */ -div { - /* line 82, mixins.scss */ } +/* line 82, mixins.scss */ div p { - /* line 83, mixins.scss */ color: red; - /* line 17, mixins.scss */ - /* line 89, mixins.scss */ color: blue; } + /* line 83, mixins.scss */ div p .class { - color: red; - /* line 17, mixins.scss */ } + color: red; } + /* line 17, mixins.scss */ div p .class div { height: 20px; } + /* line 17, mixins.scss */ div p div { height: 20px; } + /* line 89, mixins.scss */ div p .top { - top: 0; - /* line 92, mixins.scss */ } + top: 0; } + /* line 92, mixins.scss */ div p .top div { color: red; } /* line 103, mixins.scss */ @@ -70,8 +71,9 @@ div.mixin-content-simple { height: 43px; } /* line 103, mixins.scss */ div.mixin-content-simple { - color: orange; - /* line 17, mixins.scss */ } + color: orange; } + +/* line 17, mixins.scss */ div.mixin-content-simple div { height: 20px; } /* line 109, mixins.scss */ @@ -81,8 +83,9 @@ div.mixin-content-with-arg { /* line 109, mixins.scss */ div.mixin-content-with-arg { background: purple; - color: orange; - /* line 17, mixins.scss */ } + color: orange; } + +/* line 17, mixins.scss */ div.mixin-content-with-arg div { height: 20px; } /* line 156, mixins.scss */ @@ -95,14 +98,14 @@ div.mixin-content-with-arg { left: 4em; } /* line 168, mixins.scss */ div.parameter-name-scope { - /* line 161, mixins.scss */ -webkit-transform: translateX(50px); } + +/* line 161, mixins.scss */ /* line 174, mixins.scss */ @-webkit-keyframes change-color { - /* line 181, mixins.scss */ - /* line 182, mixins.scss */ +/* line 181, mixins.scss */ 0% { color: green; } - +/* line 182, mixins.scss */ 100% { color: red; } } diff --git a/tests/outputs/nesting_numbered.css b/tests/outputs/nesting_numbered.css index be8fb840..39cdf5a7 100644 --- a/tests/outputs/nesting_numbered.css +++ b/tests/outputs/nesting_numbered.css @@ -5,24 +5,29 @@ body { /* line 8, nesting.scss */ div { color: red; - height: yes; - /* line 12, nesting.scss */ } + height: yes; } + +/* line 12, nesting.scss */ div pre { color: blue; } /* line 21, nesting.scss */ div { - /* line 22, nesting.scss */ font: 10px hello world; font-size: 10px; font-color: blue; - /* line 27, nesting.scss */ border-left: 1px solid blue; border-right: 2px dashed green; } + +/* line 22, nesting.scss */ + +/* line 27, nesting.scss */ /* line 34, nesting.scss */ #nested-nesting { bar: baz; - /* line 36, nesting.scss */ bang-bop: bar; bang-bip: 1px; - /* line 39, nesting.scss */ bang-blat-baf: bort; } + +/* line 36, nesting.scss */ + +/* line 39, nesting.scss */ diff --git a/tests/outputs/null_numbered.css b/tests/outputs/null_numbered.css index e5e476cf..30df309b 100644 --- a/tests/outputs/null_numbered.css +++ b/tests/outputs/null_numbered.css @@ -7,23 +7,30 @@ two: a, b; } /* line 12, null.scss */ p:before { - /* line 13, null.scss */ content: "I ate pies!"; } + +/* line 13, null.scss */ /* line 31, null.scss */ .foo { - /* line 26, null.scss */ -webkit-border-radius: 10; - border-radius: 10; - /* line 27, null.scss */ } + border-radius: 10; } + +/* line 26, null.scss */ + +/* line 27, null.scss */ /* line 35, null.scss */ .fu { - /* line 26, null.scss */ -webkit-border-radius: 20; - border-radius: 20; - /* line 27, null.scss */ } + border-radius: 20; } + +/* line 26, null.scss */ + +/* line 27, null.scss */ /* line 39, null.scss */ .bar { - /* line 26, null.scss */ -webkit-border-top-left-radius: 30; - border-top-left-radius: 30; - /* line 27, null.scss */ } + border-top-left-radius: 30; } + +/* line 26, null.scss */ + +/* line 27, null.scss */ diff --git a/tests/outputs/operators_numbered.css b/tests/outputs/operators_numbered.css index 703bb365..c4110d8c 100644 --- a/tests/outputs/operators_numbered.css +++ b/tests/outputs/operators_numbered.css @@ -98,11 +98,13 @@ div { str: true; str: false; str: true; - /* line 131, operators.scss */ str: true; - /* line 133, operators.scss */ str: xhellohellofalse; str: true; } + +/* line 131, operators.scss */ + +/* line 133, operators.scss */ /* line 139, operators.scss */ #special { cancel-unit: 1; } diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css index 3d13a5aa..46fa83ea 100644 --- a/tests/outputs/scss_css_numbered.css +++ b/tests/outputs/scss_css_numbered.css @@ -62,8 +62,8 @@ sel { a: b; } /* line 64, scss_css.scss */ @foo { - /* line 65, scss_css.scss */ a: b; +/* line 65, scss_css.scss */ rule { a: b; } } /* line 71, scss_css.scss */ @@ -71,8 +71,8 @@ sel { a: b; } @bar { - /* line 72, scss_css.scss */ - a: b; } + a: b; +/* line 72, scss_css.scss */ } @foo "bar" /* line 77, scss_css.scss */ @@ -190,8 +190,9 @@ foo { a: b; } /* line 199, scss_css.scss */ foo { - /* line 200, scss_css.scss */ a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } + +/* line 200, scss_css.scss */ /* line 203, scss_css.scss */ :foo("bar") { a: b; } @@ -354,17 +355,19 @@ foo { /* line 424, scss_css.scss */ @media all { /* line 425, scss_css.scss */ - /* line 428, scss_css.scss */ rule1 { prop: val; } + + /* line 428, scss_css.scss */ rule2 { prop: val; } } /* line 432, scss_css.scss */ @media screen, print { /* line 433, scss_css.scss */ - /* line 436, scss_css.scss */ rule1 { prop: val; } + + /* line 436, scss_css.scss */ rule2 { prop: val; } } /* line 440, scss_css.scss */ @@ -388,7 +391,7 @@ url-prefix(http://www.w3.org/Style/), domain(mozilla.org), /* line 463, scss_css.scss */ regexp("^https:.*") { - /* line 464, scss_css.scss */ +/* line 464, scss_css.scss */ .foo { a: b; } } /* line 468, scss_css.scss */ @@ -495,8 +498,9 @@ foo|* { a: b; } /* line 605, scss_css.scss */ foo { - /* line 606, scss_css.scss */ a: "bang 1 bar bip"; } + +/* line 606, scss_css.scss */ /* line 609, scss_css.scss */ :nth-child(-n) { a: b; } @@ -605,16 +609,19 @@ E*:hover { a: b; } E, F { - /* line 745, scss_css.scss */ a: b; } +/* line 745, scss_css.scss */ + E F { - /* line 750, scss_css.scss */ a: b; } +/* line 750, scss_css.scss */ + E, F G, H { - /* line 755, scss_css.scss */ a: b; } + +/* line 755, scss_css.scss */ /* line 759, scss_css.scss */ body { /* @@ -757,12 +764,12 @@ E ~ F { a: b; } /* line 940, scss_css.scss */ @supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 941, scss_css.scss */ +/* line 941, scss_css.scss */ .foo { a: b; } } /* line 947, scss_css.scss */ @-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { - /* line 948, scss_css.scss */ +/* line 948, scss_css.scss */ .foo { a: b; } } /* line 954, scss_css.scss */ diff --git a/tests/outputs/selectors_numbered.css b/tests/outputs/selectors_numbered.css index 1cf1a5ed..e945befb 100644 --- a/tests/outputs/selectors_numbered.css +++ b/tests/outputs/selectors_numbered.css @@ -309,50 +309,47 @@ E::selection { color: blue; } /* line 126, selectors.scss */ div { - /* line 127, selectors.scss */ - /* line 131, selectors.scss */ font: something; font-size: 30em; } + +/* line 127, selectors.scss */ div font:something { size: 30em; } + +/* line 131, selectors.scss */ /* line 139, selectors.scss */ -.something { - /* line 140, selectors.scss */ - /* line 144, selectors.scss */ - /* line 148, selectors.scss */ } +/* line 140, selectors.scss */ .something.world { color: blue; } + +/* line 144, selectors.scss */ .something .mold { height: 200px; } + +/* line 148, selectors.scss */ .dog .something { color: blue; } /* line 153, selectors.scss */ -.simple { - /* line 154, selectors.scss */ - /* line 158, selectors.scss */ } +/* line 154, selectors.scss */ .dad .simple .wolf { color: blue; } + +/* line 158, selectors.scss */ .rad.simple.bad { color: blue; } /* line 164, selectors.scss */ -div { - /* line 165, selectors.scss */ } - .something div .what { - /* line 166, selectors.scss */ } +/* line 165, selectors.scss */ + /* line 166, selectors.scss */ .something div .what.world { color: blue; } /* line 172, selectors.scss */ -div { - /* line 173, selectors.scss */ } +/* line 173, selectors.scss */ div.foo div { color: blue; } /* line 178, selectors.scss */ -.main, div { - /* line 179, selectors.scss */ } - .main .message div, div .message div { - /* line 180, selectors.scss */ } - .main .message div .title, div .message div .title { - /* line 181, selectors.scss */ } +/* line 179, selectors.scss */ + /* line 180, selectors.scss */ + /* line 181, selectors.scss */ .nice-fonts .main .message div .title, .nice-fonts div .message div .title { font-size: 24px; } /* line 189, selectors.scss */ diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css index c72f5c07..a10e3b50 100644 --- a/tests/outputs/values_numbered.css +++ b/tests/outputs/values_numbered.css @@ -28,8 +28,9 @@ multiline string."; var: -90; } /* line 34, values.scss */ #special { - /* line 35, values.scss */ a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } + +/* line 35, values.scss */ /* line 38, values.scss */ #unary { b: 0.5em; diff --git a/tests/outputs/variables_numbered.css b/tests/outputs/variables_numbered.css index 2c90541f..9a000844 100644 --- a/tests/outputs/variables_numbered.css +++ b/tests/outputs/variables_numbered.css @@ -13,10 +13,10 @@ pre { color: blue; } /* line 31, variables.scss */ del { - /* line 34, variables.scss */ color: red; } - del div { - /* line 36, variables.scss */ } + +/* line 34, variables.scss */ + /* line 36, variables.scss */ del div pre { color: red; } /* line 50, variables.scss */ From f6d86ff4fb5e434f29e91fd1366059958b3af53b Mon Sep 17 00:00:00 2001 From: Screenchecker Date: Sat, 17 Jan 2015 23:03:52 +0100 Subject: [PATCH 33/33] output the original SCSS line numbers within the compiled CSS file for better frontend debugging. works great in combination with frontend debugging tools like https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ to activate this feature you need to call ->setLineNumbers(true) after creating a new instance of compiler.php For full description see: https://github.com/Screenchecker/scssphp/tree/develop#optional-output-scss-line-numbers latest update (10.6.2015) * fixed test case issue * better support for "map_get" in combination with curly braces --- .gitattributes | 17 + .travis.yml | 2 +- README.md | 52 ++ src/Compiler.php | 72 +- src/LineCommentator.php | 224 ++++- src/Server.php | 6 +- tests/InputTest.php | 65 ++ tests/inputs/nesting_commentary.scss | 49 -- tests/outputs/builtins_numbered.css | 130 +++ tests/outputs/comments_numbered.css | 32 + tests/outputs/compass_extract_numbered.css | 51 ++ tests/outputs/content_numbered.css | 38 + .../content_with_function_numbered.css | 3 + tests/outputs/default_args_numbered.css | 4 + tests/outputs/directives_numbered.css | 94 +++ tests/outputs/extends_numbered.css | 127 +++ tests/outputs/filter_effects_numbered.css | 21 + tests/outputs/functions_numbered.css | 27 + tests/outputs/ie7_numbered.css | 9 + tests/outputs/if_numbered.css | 22 + tests/outputs/if_on_null_numbered.css | 3 + tests/outputs/import_numbered.css | 27 + tests/outputs/interpolation_numbered.css | 105 +++ tests/outputs/keyword_args_numbered.css | 7 + tests/outputs/list_numbered.css | 8 + tests/outputs/looping_numbered.css | 46 + tests/outputs/media_numbered.css | 171 ++++ tests/outputs/mixins_numbered.css | 111 +++ ...ng_commentary.css => nesting_numbered.css} | 22 +- tests/outputs/null_numbered.css | 36 + tests/outputs/operators_numbered.css | 170 ++++ tests/outputs/parsing_comments_numbered.css | 55 ++ .../outputs/placeholder_selector_numbered.css | 11 + tests/outputs/scss_css_numbered.css | 799 ++++++++++++++++++ tests/outputs/selectors_numbered.css | 360 ++++++++ tests/outputs/values_numbered.css | 38 + tests/outputs/variables_numbered.css | 28 + 37 files changed, 2948 insertions(+), 94 deletions(-) create mode 100644 .gitattributes delete mode 100644 tests/inputs/nesting_commentary.scss create mode 100644 tests/outputs/builtins_numbered.css create mode 100644 tests/outputs/comments_numbered.css create mode 100644 tests/outputs/compass_extract_numbered.css create mode 100644 tests/outputs/content_numbered.css create mode 100644 tests/outputs/content_with_function_numbered.css create mode 100644 tests/outputs/default_args_numbered.css create mode 100644 tests/outputs/directives_numbered.css create mode 100644 tests/outputs/extends_numbered.css create mode 100644 tests/outputs/filter_effects_numbered.css create mode 100644 tests/outputs/functions_numbered.css create mode 100644 tests/outputs/ie7_numbered.css create mode 100644 tests/outputs/if_numbered.css create mode 100644 tests/outputs/if_on_null_numbered.css create mode 100644 tests/outputs/import_numbered.css create mode 100644 tests/outputs/interpolation_numbered.css create mode 100644 tests/outputs/keyword_args_numbered.css create mode 100644 tests/outputs/list_numbered.css create mode 100644 tests/outputs/looping_numbered.css create mode 100644 tests/outputs/media_numbered.css create mode 100644 tests/outputs/mixins_numbered.css rename tests/outputs/{nesting_commentary.css => nesting_numbered.css} (52%) create mode 100644 tests/outputs/null_numbered.css create mode 100644 tests/outputs/operators_numbered.css create mode 100644 tests/outputs/parsing_comments_numbered.css create mode 100644 tests/outputs/placeholder_selector_numbered.css create mode 100644 tests/outputs/scss_css_numbered.css create mode 100644 tests/outputs/selectors_numbered.css create mode 100644 tests/outputs/values_numbered.css create mode 100644 tests/outputs/variables_numbered.css diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..bdb0cabc --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.travis.yml b/.travis.yml index 4d069b5b..84cee502 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,4 +7,4 @@ php: # - hhvm script: - - phpunit tests + - phpunit tests \ No newline at end of file diff --git a/README.md b/README.md index 0d09fde2..a3cd119c 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,55 @@ you can run the following command to rebuild all the tests: BUILD=true phpunit tests This will compile all the tests, and save results into `tests/outputs`. + +## (optional) Output SCSS line numbers + +Now you can output the original SCSS line numbers within the compiled CSS file for better frontend debugging. + +Works great in combination with frontend debugging tools like https://addons.mozilla.org/de/firefox/addon/firecompass-for-firebug/ + +To activate this feature you need to call `->setLineNumbers(true)` after creating a new instance of class 'compiler'. + +code sample: + + namespace Leafo\ScssPhp; + + use Leafo\ScssPhp\Server; + use \Leafo\ScssPhp\Compiler; + + require "lib/scssphp/scss.inc.php"; + + $directory = "css"; + + $scss = new Compiler(); + $scss->setLineNumbers(true); + + $server = new Server($directory, null, $scss); + $server->serve(); + + +You can also call the 'compile' method directly (without using an instance of 'server' like above) + + namespace Leafo\ScssPhp; + + use Leafo\ScssPhp\Server; + use \Leafo\ScssPhp\Compiler; + + require "lib/scssphp/scss.inc.php"; + + $scss = new Compiler(); + + //the name argument is optional + $scss->setLineNumbers(true,'anyname.scss'); + + echo $scss->compile(' + $color: #abc; + div { color: lighten($color, 20%); } + '); + + +Performance impact is around 10% when a new CSS file is compiled with line numbers, compared to the same file without line numbers. + +**important note:** this feature has only been tested with the standard formatter ('Leafo\ScssPhp\Formatter\Nested'). +Using formatters like "compact" will remove line breaks and frontend debugging tools might have trouble to output the corresponding line from the comment. + diff --git a/src/Compiler.php b/src/Compiler.php index 04de6a2f..a32f2542 100644 --- a/src/Compiler.php +++ b/src/Compiler.php @@ -14,6 +14,7 @@ use Leafo\ScssPhp\Colors; use Leafo\ScssPhp\Parser; +use Leafo\ScssPhp\LineCommentator; /** * The scss compiler and parser. @@ -99,6 +100,9 @@ class Compiler protected $formatter = 'Leafo\ScssPhp\Formatter\Nested'; + protected $lineNumbers = FALSE; + protected $fileName; + /** * Compile scss * @@ -120,6 +124,17 @@ public function compile($code, $name = null) $locale = setlocale(LC_NUMERIC, 0); setlocale(LC_NUMERIC, 'C'); + if ($this->isLineNumbers()) { + if (!$name) { + //string given + $code = explode("\n", $code); + $code = LineCommentator::insertLineComments($code, $this->getFileName()); + } else { + //filepath given + $code = LineCommentator::insertLineComments(file($name), $name); + } + } + $this->parser = new Parser($name); $tree = $this->parser->parse($code); @@ -798,12 +813,15 @@ protected function compileChild($child, $out) break; case 'comment': - if ($out->type == 'root') { + if (isset($out->type) && $out->type == 'root') { $this->compileComment($child); break; } - if (strpos($child[1], '/* line ') !==FALSE ) { - $out->lines[] = "Block-Kommentar: ".$child[1]; + + //do not nest line comments into the parrent block + //for further information on the issue see https://github.com/leafo/scssphp/issues/228 + + if (strpos($child[1], '/* line ') !==FALSE) { $this->compileComment($child); break; } @@ -1965,6 +1983,11 @@ protected function importFile($path, $out) $tree = $this->importCache[$realPath]; } else { $code = file_get_contents($path); + + if ($this->isLineNumbers()) { + $code = LineCommentator::insertLineComments(file($path), $path); + } + $parser = new Parser($path, false); $tree = $parser->parse($code); $this->parsedFiles[] = $path; @@ -3009,4 +3032,45 @@ public function throwError($msg = null) throw new \Exception($msg); } -} + + /* + * check if line number feature is active + * @return boolean + */ + public function isLineNumbers() + { + return $this->lineNumbers; + } + + /** + * use this function to turn line numbers on + * @param boolean $lineNumbers + * @param string $filename + * @return boolean + */ + public function setLineNumbers($lineNumbers, $filename = NULL) + { + $this->lineNumbers = $lineNumbers; + + if ($filename) { + $this->setFileName($filename); + } + } + + /** + * @return string + */ + public function getFileName() + { + return $this->fileName; + } + + /** + * @param string $fileName + */ + public function setFileName($fileName) + { + $this->fileName = $fileName; + } + +} \ No newline at end of file diff --git a/src/LineCommentator.php b/src/LineCommentator.php index 6b201984..2f894ab6 100644 --- a/src/LineCommentator.php +++ b/src/LineCommentator.php @@ -1,85 +1,231 @@ '; + + const function_indicator = '@function'; + const return_indicator = '@return'; + + const mixin_indicator = '@mixin'; - static protected $html_comment_indicator_start = ''; + const include_indicator = '@include'; + + const if_statement_indicator = '@if'; + const else_statement_indicator = '@else'; + + const loop_indicator_for = "@for"; + const loop_indicator_while = "@while"; + const loop_indicator_each = "@each"; + + const map_indicator = 'map_get'; //we use this to indicate that we are currently looping within a multiline comment static protected $inside_multiline; - /* insert line number as commentary within the SCSS + /* insert line number as commentary within the SCSS file * * @return string; */ - static function insertLineComments($scss, $filepath) + static function insertLineComments($scss, $filepath = '') { - $lines = $scss; - $linenumber = 0; $new_scss_content = array(); - foreach ($lines as $line) { - $linenumber++; - $line = trim($line); + $filepath = str_replace('\\', '/', $filepath); - //check if empty + foreach ($lines as $linenumber => $line) { - /* note: there will most likely still be line comments for empty lines in the compiled css. - the reason for the other empty lines is that scssphp will shift our line commentary while compiling. - but this is nothing to worry about, since our debugging information (the line numbers) will still be correct */ + $line = trim($line); + $nextline = trim(next($lines)); + //check if empty if (empty($line)) { continue; } - //check for commment + //check if line is a commment if (self::isComment($line) || self::$inside_multiline) { $new_scss_content[] = $line; continue; } - $new_scss_content[] = self::$comment_indicator_start . ' line ' . $linenumber . ', ' . $filepath . ' ' . self::$comment_indicator_end; - $new_scss_content[] = $line; + //write line numbers for selectors only to reduce overhead + if ( + self::isSelector($line, $nextline) == FALSE || + self::isFunction($line) == TRUE || + self::isMixin($line) == TRUE || + self::isInclude($line) == TRUE || + self::isCondition($line) == TRUE || + self::isLoop($line) == TRUE || + self::isMap($line) == TRUE + ) { + $new_scss_content[] = $line; + continue; + } + //output line commment + $new_scss_content[] = self::comment_indicator_start . ' line ' . ($linenumber + 1) . ', ' . $filepath . ' ' . self::comment_indicator_end; + $new_scss_content[] = $line; } return implode("\n", $new_scss_content); } + /* + * looking for selector block: + * the opening bracket could be in the same line or in the next one (since we've cleaned empty lines) + * also we don't want to confuse a selector block with a property block or write the comment above the bracket + * itself (in case it's in a new line) + * + * @return boolean + */ + + static function isSelector($line, $nextline = NULL) + { + if ( + (strpos($line, self::block_indicator_start) !== FALSE || strpos($nextline, self::block_indicator_start) === 0) + && strpos($line, self::block_indicator_start) !== 0 + ) { + return true; + } + + return false; + + } + + /* + * ignore mixins. mixins will spread inside selectors after compilation + * + * @return: boolean + */ + + static function isMixin($line) + { + if (strpos($line, self::mixin_indicator) !== FALSE) { + return true; + } + + return false; + } + + /* + * ignore functions + * + * @return: boolean + */ + + static function isFunction($line) + { + if + ( + strpos($line, self::function_indicator) !== FALSE || + strpos($line, self::return_indicator) !== FALSE + ) { + return true; + } + + return false; + + } + + /* + * ignore include + * + * @return: boolean + */ + + static function isInclude($line) + { + if (strpos($line, self::include_indicator) !== FALSE) { + return true; + } + + return false; + + } /* - * we don't want to mess arozbd with existing comments since this can easily lead to parsing errors. + * dont't put a line number above if statement, since it will result in an empty line within the + * compiled scss * * @return boolean */ - static function isComment($line) + static function isCondition($line) { + if + ( + strpos($line, self::if_statement_indicator) !== FALSE || + strpos($line, self::else_statement_indicator) !== FALSE + ) { + return true; + } + return false; + + } + + /* + * dont't put a line number above loops, since it will result in an empty line within the + * compiled scss + * + * @return boolean + */ + + static function isLoop($line) + { + if + ( + strpos($line, self::loop_indicator_for) !== FALSE || + strpos($line, self::loop_indicator_each) !== FALSE || + strpos($line, self::loop_indicator_while) !== FALSE + ) { + return true; + } + + return false; + } + + /* + * we don't want to mess around with existing comments since this can easily lead to parsing errors. + * + * @return boolean + */ + + static function isComment($line) + { /* a comment has started, but did not end in the same line */ - if (strpos($line, self::$comment_indicator_start) !== FALSE && strpos($line, self::$comment_indicator_end) === FALSE) { + if (strpos($line, self::comment_indicator_start) !== FALSE && strpos($line, self::comment_indicator_end) === FALSE) { self::$inside_multiline = TRUE; return true; - /* check for comment to end */ - } else if (strpos($line, self::$comment_indicator_end) !== FALSE) { + /* check for comment to end */ + } else if (strpos($line, self::comment_indicator_end) !== FALSE) { self::$inside_multiline = FALSE; return true; } @@ -87,11 +233,11 @@ static function isComment($line) /*same check for html comments within scss.. just in case someone is having a bad day scssphp will remove this tags later on, but still has a problem with it if we wrap an CSS commentary around it*/ - if (strpos($line, self::$html_comment_indicator_start) !== FALSE && strpos($line, self::$html_comment_indicator_end) === FALSE) { + if (strpos($line, self::html_comment_indicator_start) !== FALSE && strpos($line, self::html_comment_indicator_end) === FALSE) { self::$inside_multiline = TRUE; return true; - } else if (strpos($line, self::$comment_indicator_end) !== FALSE) { + } else if (strpos($line, self::comment_indicator_end) !== FALSE) { self::$inside_multiline = FALSE; return true; } @@ -99,5 +245,25 @@ static function isComment($line) return false; } + /* + * we don't want to confuse map_get statements with selectors + * this could happen fairly easy when the scss contains map_get statements + * that select the value by index (e.g. color: map_get($map, 'color#{2}')), because + * of the curly brackets. + * + * in case the selector and the map_get statement are all in one line, you will not + * receive a line commentary for that particularly line. + * + * @return boolean + */ + + static function isMap($line) + { + if (strpos($line, self::map_indicator) !== FALSE) { + return true; + } + + return false; + } } \ No newline at end of file diff --git a/src/Server.php b/src/Server.php index cbcd7a06..e972bcc1 100644 --- a/src/Server.php +++ b/src/Server.php @@ -14,14 +14,12 @@ use Leafo\ScssPhp\Compiler; use Leafo\ScssPhp\Version; -use Leafo\ScssPhp\LineCommentator; /** * SCSS server * * @author Leaf Corcoran */ - class Server { /** @@ -53,6 +51,7 @@ protected function inputName() return substr($_SERVER['DOCUMENT_URI'], strlen($_SERVER['SCRIPT_NAME'])); } } + /** * Get path to requested .scss file * @@ -185,8 +184,7 @@ protected function getIfNoneMatchHeader() protected function compile($in, $out) { $start = microtime(true); - $scss = LineCommentator::insertLineComments(file($in),$in); - $css = $this->scss->compile($scss, $in); + $css = $this->scss->compile(file_get_contents($in), $in); $elapsed = round((microtime(true) - $start), 4); $v = Version::VERSION; diff --git a/tests/InputTest.php b/tests/InputTest.php index 09c4d127..c34464ef 100644 --- a/tests/InputTest.php +++ b/tests/InputTest.php @@ -3,6 +3,7 @@ namespace Leafo\ScssPhp\Tests; use Leafo\ScssPhp\Compiler; +use Leafo\ScssPhp\LineCommentator; // Runs all the tests in inputs/ and compares their output to ouputs/ @@ -21,6 +22,9 @@ class InputTest extends \PHPUnit_Framework_TestCase protected static $inputDir = 'inputs'; protected static $outputDir = 'outputs'; + protected static $line_number_suffix = '_numbered'; + + public function setUp() { $this->scss = new Compiler(); @@ -32,6 +36,7 @@ public function setUp() */ public function testInputFile($inFname, $outFname) { + if (getenv('BUILD')) { return $this->buildInput($inFname, $outFname); } @@ -40,12 +45,43 @@ public function testInputFile($inFname, $outFname) $this->fail("$outFname is missing, consider building tests with BUILD=true"); } + $input = file_get_contents($inFname); $output = file_get_contents($outFname); $this->assertEquals($output, $this->scss->compile($input)); } + /* + * run all tests with line numbering + */ + + /** + * @dataProvider fileNameProvider + */ + + public function testLineNumbering($inFname, $outFname) { + + $outPath = self::lineNumberOutPath($outFname); + + //insert line numbers + $scss = LineCommentator::insertLineComments(file($inFname), self::fileName($inFname)); + + if (getenv('BUILD')) { + //write css + $css = $this->scss->compile($scss); + file_put_contents($outPath, $css); + } + + if (!is_readable($outPath)) { + $this->fail("$outPath is missing, consider building tests with BUILD=true"); + } + + $output = file_get_contents($outPath); + + $this->assertEquals($output, $this->scss->compile($scss)); + } + public function fileNameProvider() { return array_map( @@ -88,6 +124,7 @@ public static function outputNameFor($input) return __DIR__ . '/' . $out; } + public static function buildTests($pattern) { $files = self::findInputNames($pattern); @@ -95,4 +132,32 @@ public static function buildTests($pattern) foreach ($files as $file) { } } + + /* + * return output filename inlcuding line_number_suffix + * + * @return string + */ + + + public static function lineNumberOutPath($outFname) { + + $outFname = preg_replace("/.css$/", self::$line_number_suffix.'.css', self::fileName($outFname)); + + return __DIR__ .'/'.self::$outputDir . '/' . $outFname; + } + + + /* + * return filename from path + * + * @return string + */ + + + public static function fileName($path) { + + $filename = explode('/',$path); + return end($filename); + } } diff --git a/tests/inputs/nesting_commentary.scss b/tests/inputs/nesting_commentary.scss deleted file mode 100644 index 475455b4..00000000 --- a/tests/inputs/nesting_commentary.scss +++ /dev/null @@ -1,49 +0,0 @@ - - -body { - color: red; -} - - -div { - color: red; - height: yes; - - /*commentary for pre */ - pre { - color: blue; - } -} - - -$color: blue; - - -div { - /*commentary for font: 10px hello world*/ - font: 10px hello world { - size: 10px; - color: $color; - } - - /*commentary for border */ - border: { - left: 1px solid blue; - right: 2px dashed green; - } -} - - -#nested-nesting { - bar: baz; - bang: { - bop: bar; - /*commentary for bip*/ - bip: 1px; - blat: { - baf: bort - } - } -} - - diff --git a/tests/outputs/builtins_numbered.css b/tests/outputs/builtins_numbered.css new file mode 100644 index 00000000..dc40ebfd --- /dev/null +++ b/tests/outputs/builtins_numbered.css @@ -0,0 +1,130 @@ +/* line 2, builtins.scss */ +#color { + color: #22ea18; + red: 34; + green: 234; + blue: 24; + color: rgba(1, 2, 4, 0.5); + a1: 1; + a2: 0.5; + mix: #020304; + rgba: rgba(170, 119, 204, 0.4); + rgba: rgba(170, 119, 204, 0.4); + green: 139; } +/* line 21, builtins.scss */ +#hsl { + color: #79c653; + color: rgba(121, 198, 83, 0.5); + hue: 100deg; + sat: 50%; + lig: 55%; } +/* line 30, builtins.scss */ +#more-color { + light: #7e3d9e; + dark: #432154; + sat: #632782; + desat: #5e3871; + gray: #545454; + comp: #48792f; + inv: #9fd086; } +/* line 44, builtins.scss */ +#more-more-color { + op: 0.5; + opacify: rgba(1, 2, 3, 0.6); + opacify: rgba(1, 2, 3, 0.6); + transparentize: rgba(1, 2, 3, 0.4); + transparentize: rgba(1, 2, 3, 0.4); + transparentize: rgba(52, 130, 3, 0.9); } +/* line 56, builtins.scss */ +#more-more-more-color { + color: rgba(65, 110, 79, 0.4); + color: rgba(20, 255, 216, 0); + color: rgba(55, 100, 69, 0.4); + color: rgba(0, 255, 213, 0); + color: rgba(145, 10, 10, 0); + color: rgba(5, 10, 10, 0); + color: rgba(145, 145, 145, 0); + color: rgba(5, 5, 5, 0); + color: #000A0A0A; + color: #FFAABBCC; } +/* line 74, builtins.scss */ +#string { + color: hello what is going on; + color: "yeah"; + color: "I do?"; } +/* line 81, builtins.scss */ +#number { + color: 250%; + color: 3; + color: 3; + color: 4; + top: 10px; + top: 1ex; + width: 200%; + bottom: 10px; + padding: 3em 1in 96px 72pt; } +/* line 94, builtins.scss */ +#list { + len: 3; + len: 1; + n: hello; + hello: one, two, three, hello; + hello: one, two, three, hello, world, what, is, going; + hello: one, two, three, hello; + index: 2; + index: false; + index: 3; + index: 1; + index: false; + index: 1; + index: false; + index: 2; + index: 2; + index: 1; + world: one, two, three, great, job; + world: one, two, three, great job; + cool: one two three great job; + cool: great job one two three; + zip: 1px solid, 2px dashed; + zip: 1px solid red, 2px dashed green; } + +/* line 115, builtins.scss */ +/* line 129, builtins.scss */ +#introspection { + t: number; + t: string; + t: string; + t: bool; + t: color; + t: color; + t: list; + u: ""; + u: "px"; + u: "em"; + l: true; + l: false; + c: true; + c: false; + c: true; + c: true; + c: false; + c: true; } +/* line 153, builtins.scss */ +#if { + color: yes; + color: no; + color: yes; + color: yes; } +/* line 160, builtins.scss */ +.transparent { + r: 0; + g: 0; + b: 0; + a: 0; } +/* line 167, builtins.scss */ +.alpha { + a: 1; + a: 1; + a: 1; + a: 0.5; + a: alpha(currentColor); } diff --git a/tests/outputs/comments_numbered.css b/tests/outputs/comments_numbered.css new file mode 100644 index 00000000..9ffe49c7 --- /dev/null +++ b/tests/outputs/comments_numbered.css @@ -0,0 +1,32 @@ +/** what the heck **/ +/** + Here is a block comment + **/ +/*hello*/ +div { + /*yeah*/ + border: 1px solid red; + /* another property */ + color: url('http://mage-page.com'); + string: "hello /* this is not a comment */"; + world: "// neither is this"; + string: 'hello /* this is not a comment */'; + /*what if this is a comment */ + world: '// neither is this'; + what-ever: 100px; + background: url(); + /*this is not a comment?*/ } +/* line 31, comments.scss */ +.dummy { + color: blue; } +/* comment 1 */ +/* line 36, comments.scss */ +a { + /* comment 2 */ + /* comment 3 */ + color: red; + /* comment 4 */ + background-color: red; + /* comment 5 */ + /* comment 6 */ } +/* comment 7 */ diff --git a/tests/outputs/compass_extract_numbered.css b/tests/outputs/compass_extract_numbered.css new file mode 100644 index 00000000..8a1bd422 --- /dev/null +++ b/tests/outputs/compass_extract_numbered.css @@ -0,0 +1,51 @@ +/* line 224, compass_extract.scss */ +#test-0 { + unit: false; + unit: true; + rhythm: 1.5em; + size: 1; + size: 1; + size: 1; + size: 2; + size: 2; } + /* line 117, compass_extract.scss */ +/* line 236, compass_extract.scss */ +#test-1 { + margin-top: 7.5em; + padding-top: 9em; + padding-bottom: 10.5em; + margin-bottom: 0em; } + +/* line 142, compass_extract.scss */ + /* line 117, compass_extract.scss */ + /* line 117, compass_extract.scss */ + /* line 117, compass_extract.scss */ + +/* line 157, compass_extract.scss */ + /* line 117, compass_extract.scss */ +/* line 240, compass_extract.scss */ +#test-2 { + border-style: solid; + border-width: 0.0625em; + padding: 1.4375em; } + +/* line 196, compass_extract.scss */ + /* line 117, compass_extract.scss */ +/* line 244, compass_extract.scss */ +#test-3 { + border-top-style: solid; + border-top-width: 0.0625em; + padding-top: 1.4375em; + border-bottom-style: solid; + border-bottom-width: 0.0625em; + padding-bottom: 1.4375em; } + +/* line 184, compass_extract.scss */ + /* line 117, compass_extract.scss */ + +/* line 188, compass_extract.scss */ + +/* line 184, compass_extract.scss */ + /* line 117, compass_extract.scss */ + +/* line 188, compass_extract.scss */ diff --git a/tests/outputs/content_numbered.css b/tests/outputs/content_numbered.css new file mode 100644 index 00000000..10a0beae --- /dev/null +++ b/tests/outputs/content_numbered.css @@ -0,0 +1,38 @@ +/* line 3, content.scss */ +/* line 8, content.scss */ + * html #logo { + background-image: url(/logo.gif); } +/* line 20, content.scss */ +.colors { + background-color: blue; + color: white; + border-color: blue; } +/* line 26, content.scss */ +@media only screen and (max-width: 480px) { + /* line 32, content.scss */ + body { + color: red; } } +/* line 36, content.scss */ +#sidebar { + width: 300px; } + +/* line 26, content.scss */ + @media only screen and (max-width: 480px) { + #sidebar { + width: 100px; } } +/* line 46, content.scss */ +@media only screen and (min-width: 40em) { + /* line 51, content.scss */ + .grid-1 { + width: 100%; } + .grid-2 { + width: 100%; } } +/* line 46, content.scss */ +@media only screen and (min-width: 40em) { + /* line 58, content.scss */ + .grid-1 { + width: 100%; } + + /* line 58, content.scss */ + .grid-2 { + width: 100%; } } diff --git a/tests/outputs/content_with_function_numbered.css b/tests/outputs/content_with_function_numbered.css new file mode 100644 index 00000000..a107e172 --- /dev/null +++ b/tests/outputs/content_with_function_numbered.css @@ -0,0 +1,3 @@ +/* line 13, content_with_function.scss */ +body { + padding: 1 px; } diff --git a/tests/outputs/default_args_numbered.css b/tests/outputs/default_args_numbered.css new file mode 100644 index 00000000..32d65ad7 --- /dev/null +++ b/tests/outputs/default_args_numbered.css @@ -0,0 +1,4 @@ +/* line 11, default_args.scss */ +div { + height: red; + margin: 100px; } diff --git a/tests/outputs/directives_numbered.css b/tests/outputs/directives_numbered.css new file mode 100644 index 00000000..2cb1a404 --- /dev/null +++ b/tests/outputs/directives_numbered.css @@ -0,0 +1,94 @@ +@charset "hello-world"; +/* line 4, directives.scss */ +@page :left { +/* line 5, directives.scss */ + div { + color: red; } } +/* line 10, directives.scss */ +@page test { +/* line 11, directives.scss */ + @media yes { + /* line 12, directives.scss */ + div { + color: red; } + + /* line 16, directives.scss */ } } +/* line 24, directives.scss */ +@media something { + /* line 25, directives.scss */ + @page { + /* line 26, directives.scss */ + @media else { + /* line 27, directives.scss */ + div { + height: 200px; } } } } +/* line 35, directives.scss */ +div { + color: red; } + +/* line 37, directives.scss */ + @page yeah { +/* line 38, directives.scss */ + div pre { + height: 20px; } } +/* line 44, directives.scss */ +@font-face { + color: red; + height: 20px; } +/* line 50, directives.scss */ +@keyframes 'bounce' { +/* line 51, directives.scss */ + from { + top: 100px; + animation-timing-function: ease-out; } +/* line 56, directives.scss */ + 25% { + top: 50px; + animation-timing-function: ease-in; } +/* line 61, directives.scss */ + 50% { + top: 100px; + animation-timing-function: ease-out; } +/* line 66, directives.scss */ + 75% { + top: 75px; + animation-timing-function: ease-in; } +/* line 71, directives.scss */ + to { + top: 100px; } } +/* line 76, directives.scss */ +@-webkit-keyframes flowouttoleft { +/* line 77, directives.scss */ + 0% { + -webkit-transform: translateX(0) scale(1); } +/* line 78, directives.scss */ + 60%, 70% { + -webkit-transform: translateX(0) scale(0.7); } +/* line 79, directives.scss */ + 100% { + -webkit-transform: translateX(-100%) scale(0.7); } } +/* line 82, directives.scss */ +div { + animation-name: 'diagonal-slide'; + animation-duration: 5s; + animation-iteration-count: 10; } +/* line 88, directives.scss */ +@keyframes 'diagonal-slide' { +/* line 90, directives.scss */ + from { + left: 0; + top: 0; } +/* line 95, directives.scss */ + to { + left: 100px; + top: 100px; } } + +@document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 105, directives.scss */ +regexp("https:.*") { +/* line 107, directives.scss */ + body { + color: purple; + background: yellow; } } diff --git a/tests/outputs/extends_numbered.css b/tests/outputs/extends_numbered.css new file mode 100644 index 00000000..b7c5eb8a --- /dev/null +++ b/tests/outputs/extends_numbered.css @@ -0,0 +1,127 @@ +/* line 2, extends.scss */ +error, pre seriousError, span seriousError, other, hello { + border: 1px #f00; + background-color: #fdd; } +/* line 7, extends.scss */ +/* line 8, extends.scss */ + pre seriousError, span seriousError { + font-size: 20px; } +/* line 14, extends.scss */ +hello { + color: green; } + +/* line 17, extends.scss */ + hello div { + margin: 10px; } +/* line 22, extends.scss */ +.cool, .me { + color: red; } +/* line 26, extends.scss */ +.blue, .me { + color: purple; } +/* line 30, extends.scss */ +/* line 34, extends.scss */ + +/* line 35, extends.scss */ + +a:hover, .hoverlink, #demo .overview .fakelink:hover { + text-decoration: underline; } +/* line 40, extends.scss */ +div.hello.world.hmm, pre div.okay.span.world.hmm, pre #butt .umm div.sure.span.world.hmm, #butt .umm pre div.sure.span.world.hmm, code div.okay.span.world.hmm, code #butt .umm div.sure.span.world.hmm, #butt .umm code div.sure.span.world.hmm { + color: blue; } +/* line 44, extends.scss */ +/* line 45, extends.scss */ + /* line 51, extends.scss */ + +.xxxxx .xxxxx .xxxxx, code .xxxxx .xxxxx, code code .xxxxx, code code code, code .xxxxx code, .xxxxx code .xxxxx, .xxxxx code code, .xxxxx .xxxxx code { + color: green; } +/* line 55, extends.scss */ +code { + color: red; } +/* line 63, extends.scss */ +.alpha, .beta, .gama { + color: red; } +/* line 67, extends.scss */ +.beta, .gama { + color: white; } +/* line 72, extends.scss */ +.gama { + color: blue; } +/* line 79, extends.scss */ +#admin .tabbar a, #admin .tabbar #demo .overview .fakelink, #demo .overview #admin .tabbar .fakelink { + font-weight: bold; } +/* line 80, extends.scss */ +/* line 82, extends.scss */ + +a1 b1 c1 d1, x1 y1 z1 w1 b1 c1 d1 { + color: red; } +/* line 83, extends.scss */ +/* line 85, extends.scss */ + +a2 b2 c2 d2, a2 x2 y2 z2 w2 c2 d2, x2 y2 z2 a2 w2 c2 d2 { + color: red; } +/* line 86, extends.scss */ +/* line 89, extends.scss */ + +a3 b3 c3 d3, a3 b3 x3 y3 z3 w3 d3, x3 y3 z3 a3 b3 w3 d3 { + color: red; } +/* line 90, extends.scss */ +/* line 93, extends.scss */ + +a4 b4 c4 d4, a4 b4 c4 x4 y4 z4 w4, x4 y4 z4 a4 b4 c4 w4 { + color: red; } +/* line 94, extends.scss */ +/* line 98, extends.scss */ + +#butt .yeah .okay, #butt .yeah .umm .sure, #butt .umm .yeah .sure { + font-weight: bold; } +/* line 99, extends.scss */ +/* line 101, extends.scss */ + +a9 b9 s9 t9 v9, a9 b9 s9 t9 x9 y9 z9, a9 b9 x9 y9 s9 t9 z9 { + color: red; } +/* line 103, extends.scss */ +/* line 109, extends.scss */ + +@media print { + /* line 110, extends.scss */ + horse, man { + color: blue; } } +/* line 115, extends.scss */ +man { + color: red; } +/* line 123, extends.scss */ +wassup { + color: blue; } +/* line 128, extends.scss */ +/* line 129, extends.scss */ + .foo .wassup { + color: blue; } +/* line 137, extends.scss */ +#something, .x, .y { + color: red; } +/* line 141, extends.scss */ +/* line 145, extends.scss */ + +/* line 151, extends.scss */ + +/* line 152, extends.scss */ + /* line 156, extends.scss */ + +.nav-justified, .nav-tabs.nav-justified { + text-align: justify; } + +.btn:hover, .edit .actions button:hover, .edit .new .actions button:hover, .btn:active, .edit .actions button:active, .edit .new .actions button:active, .btn.active, .edit .actions button.active, .edit .new .actions button.active, .btn.disabled, .edit .actions button.disabled, .edit .new .actions button.disabled, .btn[disabled], .edit .actions button[disabled], .edit .new .actions button[disabled] { + color: red; } + +/* line 166, extends.scss */ +/* line 169, extends.scss */ +/* line 170, extends.scss */ + .edit .actions button { + float: right; } +/* line 175, extends.scss */ +/* line 176, extends.scss */ + /* line 177, extends.scss */ + .edit .new .actions { + padding: 0; } + /* line 180, extends.scss */ diff --git a/tests/outputs/filter_effects_numbered.css b/tests/outputs/filter_effects_numbered.css new file mode 100644 index 00000000..a5eef6d3 --- /dev/null +++ b/tests/outputs/filter_effects_numbered.css @@ -0,0 +1,21 @@ +/* line 1, filter_effects.scss */ +#number { + -webkit-filter: grayscale(1) sepia(0.5) saturate(0.1) invert(1) opacity(0.5) brightness(0.5) contrast(0.5); } +/* line 11, filter_effects.scss */ +#percentage { + -webkit-filter: grayscale(100%) sepia(50%) saturate(10%) invert(100%) opacity(50%) brightness(50%) contrast(50%); } +/* line 21, filter_effects.scss */ +#misc { + -webkit-filter: hue-rotate(90deg) blur(10px) drop-shadow(10px -16px 30px purple); } +/* line 37, filter_effects.scss */ +#decimal { + opacity: 0.5; + filter: alpha(opacity=50, style=1); } +/* line 41, filter_effects.scss */ +#percent { + opacity: 0.5; + filter: alpha(opacity=50); } +/* line 45, filter_effects.scss */ +.row { + background-color: #071c23; + color: #2284a1; } diff --git a/tests/outputs/functions_numbered.css b/tests/outputs/functions_numbered.css new file mode 100644 index 00000000..abe573ca --- /dev/null +++ b/tests/outputs/functions_numbered.css @@ -0,0 +1,27 @@ +/* line 10, functions.scss */ +div { + color: 14px; + sum: 23; } +/* line 33, functions.scss */ +div { + hello: 10 55; + hello: 1010 55; + hello: "hello 10 and 55"; } +/* line 44, functions.scss */ +del { + color: 1000; } +/* line 48, functions.scss */ +div { + hello: "hello foo and bar"; + hello: "hello bar and default"; + hello: "hello Alice, Bob, Tom"; } +/* line 61, functions.scss */ +.foo { + test2: -moz-art; } +/* line 77, functions.scss */ +/* line 67, functions.scss */ + div span { + height: 3px; } +/* line 87, functions.scss */ +div { + width: 2; } diff --git a/tests/outputs/ie7_numbered.css b/tests/outputs/ie7_numbered.css new file mode 100644 index 00000000..1dfe7ab0 --- /dev/null +++ b/tests/outputs/ie7_numbered.css @@ -0,0 +1,9 @@ +/* line 2, ie7.scss */ +#foo:before { + content: counter(item,".") ": "; } +/* line 6, ie7.scss */ +#bar:before { + content: counter(item,"."); } +/* line 10, ie7.scss */ +#fu:before { + content: counter(item); } diff --git a/tests/outputs/if_numbered.css b/tests/outputs/if_numbered.css new file mode 100644 index 00000000..921baab7 --- /dev/null +++ b/tests/outputs/if_numbered.css @@ -0,0 +1,22 @@ +/* line 10, if.scss */ +div { + color: blue; } +/* line 16, if.scss */ +pre { + val-1: "red"; + val-2: "blue"; + val-3: "blue"; + val-4: "red"; + val-5: "red"; } +/* line 25, if.scss */ +span { + color: blue; + height: 10px; + width: 20px; } +/* line 47, if.scss */ +div { + color: blue; + border-color: green; } +/* line 67, if.scss */ +del { + thing: no; } diff --git a/tests/outputs/if_on_null_numbered.css b/tests/outputs/if_on_null_numbered.css new file mode 100644 index 00000000..d7e5d5f7 --- /dev/null +++ b/tests/outputs/if_on_null_numbered.css @@ -0,0 +1,3 @@ +/* line 6, if_on_null.scss */ +body { + background-color: "red"; } diff --git a/tests/outputs/import_numbered.css b/tests/outputs/import_numbered.css new file mode 100644 index 00000000..747ab27a --- /dev/null +++ b/tests/outputs/import_numbered.css @@ -0,0 +1,27 @@ +@import "foo.css"; +@import "foo" screen; +@import "http://foo.com/bar"; +@import url(foo); +div { + height: 200px; + color: red; } +/* line 9, import.scss */ +pre { + color: red; } + pre div { + height: 200px; + color: red; } +/* line 14, import.scss */ +code div { + height: 200px; + color: red; } + code div { + height: 200px; + color: red; } + +#partial { + color: blue; } +/* line 20, import.scss */ +body { + color: #7c2; + background: gray; } diff --git a/tests/outputs/interpolation_numbered.css b/tests/outputs/interpolation_numbered.css new file mode 100644 index 00000000..f2b650e8 --- /dev/null +++ b/tests/outputs/interpolation_numbered.css @@ -0,0 +1,105 @@ +/* line 2, interpolation.scss */ +div { + color: redwhite blue; + color: red white blue; + color: red whiteblue; + color: redwhiteblue; + color: ummyeahwhat; + color: stacked; + font-size: 10px/something; + font-size: 10px / something; + test: "whatworldwrong"; + test: "whatworldwrong"; + test: "whatworldwrong"; + test: "what"world"wrong"; + hi: "what is 16 end"; } + +/* line 3, interpolation.scss */ + +/* line 4, interpolation.scss */ + +/* line 5, interpolation.scss */ + +/* line 6, interpolation.scss */ + +/* line 7, interpolation.scss */ + +/* line 8, interpolation.scss */ + +/* line 10, interpolation.scss */ + +/* line 11, interpolation.scss */ + +/* line 13, interpolation.scss */ + +/* line 14, interpolation.scss */ + +/* line 15, interpolation.scss */ + +/* line 16, interpolation.scss */ + +/* line 18, interpolation.scss */ +/* line 24, interpolation.scss */ +/* line 27, interpolation.scss */ + pre var { + color: red; } + +/* line 31, interpolation.scss */ + pre var dad { + color: red; } + +/* line 35, interpolation.scss */ + pre bedvardad { + color: red; } +/* line 40, interpolation.scss */ +/* line 42, interpolation.scss */ + cool .thing-1 { + color: red; } + cool .thing-2 { + color: red; } + cool .thing-3 { + color: red; } + cool .thing-4 { + color: red; } + cool .thing-5 { + color: red; } +/* line 48, interpolation.scss */ +abcde { + color: red; } +/* line 52, interpolation.scss */ +#hello, .world { + color: red; } +/* line 56, interpolation.scss */ +#abchelloyeah, .coolworldyes { + color: red; } +/* line 62, interpolation.scss */ +div.element:nth-child(2n) { + display: none; } +/* line 69, interpolation.scss */ +div { + hello: world; + coolhello: world; + helloone: world; + twohelloone: world; + oneabtwo: cool; + hello-world: red; + hello-mold: white; + hello-hello: blue; } + +/* line 71, interpolation.scss */ + +/* line 72, interpolation.scss */ + +/* line 73, interpolation.scss */ + +/* line 74, interpolation.scss */ + +/* line 76, interpolation.scss */ + +/* line 78, interpolation.scss */ + +/* line 79, interpolation.scss */ + +/* line 80, interpolation.scss */ + +/* line 81, interpolation.scss */ diff --git a/tests/outputs/keyword_args_numbered.css b/tests/outputs/keyword_args_numbered.css new file mode 100644 index 00000000..501ae411 --- /dev/null +++ b/tests/outputs/keyword_args_numbered.css @@ -0,0 +1,7 @@ +/* line 8, keyword_args.scss */ +pre { + out: alpha fort three palace; } +/* line 19, keyword_args.scss */ +div { + hello: 5; + world: -5; } diff --git a/tests/outputs/list_numbered.css b/tests/outputs/list_numbered.css new file mode 100644 index 00000000..e8701f9f --- /dev/null +++ b/tests/outputs/list_numbered.css @@ -0,0 +1,8 @@ +/* line 4, list.scss */ +div { + padding: 10px 20px 30px 40px; + margin: 0 10px 10px 10px; + background: linear-gradient(black, white); } +/* line 13, list.scss */ +p { + background: linear-gradient(red, blue); } diff --git a/tests/outputs/looping_numbered.css b/tests/outputs/looping_numbered.css new file mode 100644 index 00000000..9e12ec7e --- /dev/null +++ b/tests/outputs/looping_numbered.css @@ -0,0 +1,46 @@ +/* line 2, looping.scss */ +div { + color: what; + color: is; + color: this; + font: what; + font: is; + font: this; + background: what; + background: is; + background: this; + border: what; + border: is; + border: this; } +/* line 23, looping.scss */ +span { + color: 0; + color: 1; + color: 2; + color: 3; + color: 4; + color: 5; + color: 6; + color: 7; + color: 8; + color: 9; + color: 10; } +/* line 31, looping.scss */ +pre { + color: 1; + color: 2; + color: 3; + color: 4; + height: 1; + height: 2; + height: 3; + height: 4; + height: 5; + cool: 10; + cool: 9; + cool: 8; + cool: 7; + cool: 6; + cool: 5; + cool: 4; + cool: 3; } diff --git a/tests/outputs/media_numbered.css b/tests/outputs/media_numbered.css new file mode 100644 index 00000000..af3d1028 --- /dev/null +++ b/tests/outputs/media_numbered.css @@ -0,0 +1,171 @@ +/* line 3, media.scss */ +@media { + /* line 4, media.scss */ + div { + color: blue; } } +/* line 6, media.scss */ +@media what { + /* line 7, media.scss */ + div { + color: blue; } } +/* line 10, media.scss */ +@media (cool) { + /* line 11, media.scss */ + div { + color: blue; } } +/* line 13, media.scss */ +@media (cool: blue) { + /* line 14, media.scss */ + div { + color: blue; } } +/* line 17, media.scss */ +@media hello and (world) and (butt: man) { + /* line 18, media.scss */ + div { + color: blue; } } +/* line 23, media.scss */ +@media (max-width: 940px) { + color: red; } +/* line 28, media.scss */ +@media not hello and (world) { + color: blue; + + /* line 30, media.scss */ + pre { + color: blue; } + + /* line 34, media.scss */ } + @media butt and (world) { + color: red; + + /* line 36, media.scss */ + div { + color: red; } } +/* line 42, media.scss */ +@media a, b { + /* line 43, media.scss */ } +/* line 48, media.scss */ +@media a { + /* line 49, media.scss */ } +/* line 54, media.scss */ +@media a, b { + /* line 55, media.scss */ } +/* line 64, media.scss */ +div { + color: blue; } + +/* line 66, media.scss */ + @media screen and (-webkit-min-device-pixel-ratio: 1.5) { + /* line 67, media.scss */ + div .sidebar { + width: 500px; } } +/* line 81, media.scss */ +div { + position: absolute; } + +/* line 84, media.scss */ + @media screen { + div { + top: 0; + bottom: 8em; + color: red; } + /* line 87, media.scss */ + div p { + margin: 5px; } + /* line 76, media.scss */ + div .success { + color: green; } } +/* line 95, media.scss */ +.button { + width: 300px; + height: 100px; + background: #eee; } + +/* line 100, media.scss */ + .button :hover { + background: #aaa; } + +/* line 104, media.scss */ + @media only screen and (max-width: 300px) { + .button { + width: 100px; + height: 100px; } } +/* line 110, media.scss */ +code { + position: absolute; } + +/* line 112, media.scss */ + @media screen { + code { + height: 10px; } + /* line 113, media.scss */ + code pre { + height: 20px; } } +/* line 120, media.scss */ +/* line 121, media.scss */ + @media screen { + /* line 122, media.scss */ } + @media screen and (color: blue) { + dt { + height: 10px; } } +/* line 129, media.scss */ +@media screen { + /* line 130, media.scss */ + .screen { + width: 12px; } + + /* line 133, media.scss */ } + @media only screen { + /* line 134, media.scss */ + .only-screen { + height: 11px; } } +/* line 140, media.scss */ +@media only screen { + /* line 141, media.scss */ + .only-screen { + width: 14px; } + + /* line 144, media.scss */ } + @media only screen { + /* line 145, media.scss */ + .only-screen { + height: 16px; } } +/* line 151, media.scss */ +@media not screen { + /* line 152, media.scss */ } +/* line 159, media.scss */ +@media not screen { + /* line 160, media.scss */ } + @media print { + /* line 161, media.scss */ + .only-print { + height: 12px; } } +/* line 167, media.scss */ +@media screen { + /* line 168, media.scss */ } + @media screen { + /* line 169, media.scss */ + .only-print { + height: 12px; } } +/* line 175, media.scss */ +@media not screen { + /* line 176, media.scss */ } +/* line 183, media.scss */ +@media not screen { + /* line 184, media.scss */ } + @media not screen { + /* line 185, media.scss */ + .not-screen { + height: 15px; } } +/* line 191, media.scss */ +@media only screen { + /* line 192, media.scss */ } +/* line 199, media.scss */ +@media only screen { + /* line 200, media.scss */ } + @media only screen and (color: blue) { + /* line 201, media.scss */ } + @media only screen and (color: blue) and (width: 13) { + /* line 202, media.scss */ + .only-screen { + height: 15px; } } diff --git a/tests/outputs/mixins_numbered.css b/tests/outputs/mixins_numbered.css new file mode 100644 index 00000000..63988fce --- /dev/null +++ b/tests/outputs/mixins_numbered.css @@ -0,0 +1,111 @@ +/* line 9, mixins.scss */ +div { + color: blue; + color: red; } + +/* line 4, mixins.scss */ + div pre { + height: 200px; } +/* line 26, mixins.scss */ +span { + color: blue; } + +/* line 17, mixins.scss */ + span div { + height: 20px; } +/* line 30, mixins.scss */ +html { + height: 43px; } +/* line 39, mixins.scss */ +del { + height: 20px; } +/* line 52, mixins.scss */ +div { + color: white; + color: blue; + color: white; } +/* line 62, mixins.scss */ +div { + background-image: linear-gradient(left top, red, green); } +/* line 72, mixins.scss */ +div { + -moz-box-shadow: 10px 10px 5px #888; + -webkit-box-shadow: 10px 10px 5px #888; + box-shadow: 10px 10px 5px #888; + -moz-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; + -webkit-box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; + box-shadow: inset 10px 10px #888, -10px -10px #f4f4f4; } +/* line 81, mixins.scss */ +/* line 82, mixins.scss */ + div p { + color: red; + color: blue; } + /* line 83, mixins.scss */ + div p .class { + color: red; } + /* line 17, mixins.scss */ + div p .class div { + height: 20px; } + /* line 17, mixins.scss */ + div p div { + height: 20px; } + /* line 89, mixins.scss */ + div p .top { + top: 0; } + /* line 92, mixins.scss */ + div p .top div { + color: red; } +/* line 103, mixins.scss */ +div.mixin-content-simple { + color: red; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: blue; + color: red; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: purple; + height: 20px; } +/* line 103, mixins.scss */ +div.mixin-content-simple { + height: 43px; } +/* line 103, mixins.scss */ +div.mixin-content-simple { + color: orange; } + +/* line 17, mixins.scss */ + div.mixin-content-simple div { + height: 20px; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: purple; + height: 43px; } +/* line 109, mixins.scss */ +div.mixin-content-with-arg { + background: purple; + color: orange; } + +/* line 17, mixins.scss */ + div.mixin-content-with-arg div { + height: 20px; } +/* line 156, mixins.scss */ +#please-wait { + background: url(/images/logo.png); + position: absolute; + top: 1em; + right: 0; + bottom: 3em; + left: 4em; } +/* line 168, mixins.scss */ +div.parameter-name-scope { + -webkit-transform: translateX(50px); } + +/* line 161, mixins.scss */ +/* line 174, mixins.scss */ +@-webkit-keyframes change-color { +/* line 181, mixins.scss */ + 0% { + color: green; } +/* line 182, mixins.scss */ + 100% { + color: red; } } diff --git a/tests/outputs/nesting_commentary.css b/tests/outputs/nesting_numbered.css similarity index 52% rename from tests/outputs/nesting_commentary.css rename to tests/outputs/nesting_numbered.css index d7ca92db..39cdf5a7 100644 --- a/tests/outputs/nesting_commentary.css +++ b/tests/outputs/nesting_numbered.css @@ -1,25 +1,33 @@ +div: blue; +/* line 3, nesting.scss */ body { color: red; } - +/* line 8, nesting.scss */ div { color: red; - height: yes; - /*commentary for pre */ } + height: yes; } + +/* line 12, nesting.scss */ div pre { color: blue; } - +/* line 21, nesting.scss */ div { - /*commentary for font: 10px hello world*/ font: 10px hello world; font-size: 10px; font-color: blue; - /*commentary for border */ border-left: 1px solid blue; border-right: 2px dashed green; } +/* line 22, nesting.scss */ + +/* line 27, nesting.scss */ +/* line 34, nesting.scss */ #nested-nesting { bar: baz; bang-bop: bar; - /*commentary for bip*/ bang-bip: 1px; bang-blat-baf: bort; } + +/* line 36, nesting.scss */ + +/* line 39, nesting.scss */ diff --git a/tests/outputs/null_numbered.css b/tests/outputs/null_numbered.css new file mode 100644 index 00000000..30df309b --- /dev/null +++ b/tests/outputs/null_numbered.css @@ -0,0 +1,36 @@ +/* line 2, null.scss */ +.div { + one: null; + one: world; + one: NULL world; + one: a, b; + two: a, b; } +/* line 12, null.scss */ +p:before { + content: "I ate pies!"; } + +/* line 13, null.scss */ +/* line 31, null.scss */ +.foo { + -webkit-border-radius: 10; + border-radius: 10; } + +/* line 26, null.scss */ + +/* line 27, null.scss */ +/* line 35, null.scss */ +.fu { + -webkit-border-radius: 20; + border-radius: 20; } + +/* line 26, null.scss */ + +/* line 27, null.scss */ +/* line 39, null.scss */ +.bar { + -webkit-border-top-left-radius: 30; + border-top-left-radius: 30; } + +/* line 26, null.scss */ + +/* line 27, null.scss */ diff --git a/tests/outputs/operators_numbered.css b/tests/outputs/operators_numbered.css new file mode 100644 index 00000000..c4110d8c --- /dev/null +++ b/tests/outputs/operators_numbered.css @@ -0,0 +1,170 @@ +/* line 3, operators.scss */ +body { + color: 8; + color: 16; + height: 10px/10px; + color: 6px; + color: 5px; + bottom: 2px; + top: 1.5em; + left: -1cm; + top: 6.29921; } +/* line 15, operators.scss */ +div { + color: false; + color: true; + color: true; + color: false; + color: what > 3; } +/* line 25, operators.scss */ +#units { + test: 2.5748in; + test: 13mm; + test: 4em; + test: 11mm; + test: 1.1cm; } +/* line 33, operators.scss */ +#modulo { + test: 1; + test: 1cm; } +/* line 38, operators.scss */ +#colors { + color: #ff0203; + color: #fe0000; + color: rgba(3, 8, 15, 0.5); + color: rgba(5, 7, 10, 0.5); + color: rgba(2, 4, 6, 0.5); + color: rgba(0, 1, 1, 0.5); + color: rgba(3, 4, 5, 0.5); + color: rgba(0, 0, 1, 0.5); + color: #22f; + color: false; + color: true; + color: true; + color: false; } +/* line 59, operators.scss */ +#preserve { + hello: what -going; + hello: what - going; } +/* line 64, operators.scss */ +#strings { + hello: what -going; + hello: whatgoing; + hello: whatgoing; + hello: whatgoing; + hello: whatgoing; + hello: "whatgoing"; + hello: goingwhat; + hello: "whatwhat"; } +/* line 77, operators.scss */ +#negation { + a: -60; + b: -90; + b: -90; } +/* line 84, operators.scss */ +#bools-fail { + and: false and two; + and: one and two; + and: one and false; + or: false or two; + or: one or two; + or: one or false; } +/* line 94, operators.scss */ +#bools { + and: false; + and: two; + and: false; + or: two; + or: one; + or: one; } +/* line 105, operators.scss */ +#nots-fail { + not: false2; + not: not false; + not: not 0; + not: not 1; + not: not ""; + not: not hello; } +/* line 114, operators.scss */ +#nots { + not: false2; + not: true; + not: false; + not: false; + not: false; + not: false; } +/* line 123, operators.scss */ +#string-test { + str: true; + str: false; + str: true; + str: true; + str: xhellohellofalse; + str: true; } + +/* line 131, operators.scss */ + +/* line 133, operators.scss */ +/* line 139, operators.scss */ +#special { + cancel-unit: 1; } +/* line 146, operators.scss */ +.row .a { + margin: -0.5em; } +/* line 147, operators.scss */ +.row .b { + margin: -0.5em; } +/* line 148, operators.scss */ +.row .c { + margin: -0.5em; } +/* line 149, operators.scss */ +.row .d { + margin: -0.5em; } +/* line 150, operators.scss */ +.row .e { + margin: 0 -0.5em; } +/* line 152, operators.scss */ +.alt .a { + margin: -0.5em; } +/* line 153, operators.scss */ +.alt .b { + margin: -0.5em; } +/* line 154, operators.scss */ +.alt .c { + margin: -0.5em; } +/* line 155, operators.scss */ +.alt .d { + margin: 0 -1em / 2; } +/* line 156, operators.scss */ +.alt .e { + margin: 0 -0.5em; } +/* line 158, operators.scss */ +.row .f { + margin: -2em; } +/* line 159, operators.scss */ +.row .g { + margin: -2em; } +/* line 160, operators.scss */ +.row .h { + margin: -2em; } +/* line 161, operators.scss */ +.row .i { + margin: -2em; } +/* line 162, operators.scss */ +.row .j { + margin: 0 -2em; } +/* line 164, operators.scss */ +.alt .f { + margin: -2em; } +/* line 165, operators.scss */ +.alt .g { + margin: -2em; } +/* line 166, operators.scss */ +.alt .h { + margin: -2em; } +/* line 167, operators.scss */ +.alt .i { + margin: 0 -2em; } +/* line 168, operators.scss */ +.alt .j { + margin: 0 -2em; } diff --git a/tests/outputs/parsing_comments_numbered.css b/tests/outputs/parsing_comments_numbered.css new file mode 100644 index 00000000..0085190e --- /dev/null +++ b/tests/outputs/parsing_comments_numbered.css @@ -0,0 +1,55 @@ +/* comment 1 */ +/* line 2, parsing_comments.scss */ +a { + /* comment 2 */ + color: red; + /* comment 3 */ + /* comment 4 */ } +/* comment 5 */ +/*! comment 1 */ +/* line 10, parsing_comments.scss */ +b { + /*! comment 2 */ + color: red; + /*! comment 3 */ + /*! comment 4 */ } +/*! comment 5 */ +/* + * multi-line comment 1 + */ +/* line 20, parsing_comments.scss */ +c { + /* + * multi-line comment 2 + */ + color: red; + /* + * multi-line comment 3 + */ + /* + * multi-line comment 4 + */ } +/* + * multi-line comment 5 + */ +/*! + * multi-line comment 1 + */ +/* line 38, parsing_comments.scss */ +d { + /*! + * multi-line comment 2 + */ + color: red; + /*! + * multi-line comment 3 + */ + /*! + * multi-line comment 4 + */ } +/*! + * multi-line comment 5 + */ +/* line 54, parsing_comments.scss */ +e { + color: red; } diff --git a/tests/outputs/placeholder_selector_numbered.css b/tests/outputs/placeholder_selector_numbered.css new file mode 100644 index 00000000..2c01113f --- /dev/null +++ b/tests/outputs/placeholder_selector_numbered.css @@ -0,0 +1,11 @@ +/* line 1, placeholder_selector.scss */ +p a.notice span, p a.error span, #context a.notice span, #context a.error span { + color: blue; + font-weight: bold; + font-size: 2em; } +/* line 7, placeholder_selector.scss */ +/* line 9, placeholder_selector.scss */ +/* line 13, placeholder_selector.scss */ +p { + padding: 2em; } +/* line 18, placeholder_selector.scss */ diff --git a/tests/outputs/scss_css_numbered.css b/tests/outputs/scss_css_numbered.css new file mode 100644 index 00000000..46fa83ea --- /dev/null +++ b/tests/outputs/scss_css_numbered.css @@ -0,0 +1,799 @@ +@import "foo.css"; +@import 'foo.css'; +@import url("foo.css"); +@import url('foo.css'); +@import url(foo.css); +@import "foo.css" screen; +@import "foo.css" screen, print; +@charset "UTF-8"; +/* line 1, scss_css.scss */ +[foo~=bar] { + a: b; } +/* line 5, scss_css.scss */ +[foo^=bar] { + a: b; } +/* line 9, scss_css.scss */ +[foo$=bar] { + a: b; } +/* line 13, scss_css.scss */ +[foo*=bar] { + a: b; } +/* line 17, scss_css.scss */ +[foo|=en] { + a: b; } +/* line 21, scss_css.scss */ +foo { + a: 2; + b: 2.3em; + c: 50%; + d: "fraz bran"; + e: flanny-blanny-blan; + f: url(http://sass-lang.com); + h: #abc; } +/* line 32, scss_css.scss */ +selector { + property: value; + property2: value; } +/* line 37, scss_css.scss */ +sel { + p: v; } +/* line 39, scss_css.scss */ +.foo { + /* Foo + Bar + Baz */ + a: b; } +/* line 46, scss_css.scss */ +.foo { + /* Foo + Bar + Baz */ + a: b; } + +.foo { + /* Foo + Bar */ + a: b; } + +.foo { + /* Foo + Bar + Baz */ + a: b; } +/* line 64, scss_css.scss */ +@foo { + a: b; +/* line 65, scss_css.scss */ + rule { + a: b; } } +/* line 71, scss_css.scss */ +@foo { + a: b; } + +@bar { + a: b; +/* line 72, scss_css.scss */ } + +@foo "bar" +/* line 77, scss_css.scss */ +foo { + a: 12px calc(100%/3 - 2*1em - 2*1px); + b: 12px -moz-calc(100%/3 - 2*1em - 2*1px); + b: 12px -webkit-calc(100%/3 - 2*1em - 2*1px); + b: 12px -foobar-calc(100%/3 - 2*1em - 2*1px); } +/* line 84, scss_css.scss */ +foo { + bar: baz; } + +bar { + bar: baz; } + +baz { + bar: baz; } +/* + * foo + */ +/* line 94, scss_css.scss */ +bar { + baz: bang; } +/* line 97, scss_css.scss */ +E, F { + a: b; } +/* line 101, scss_css.scss */ +E F, G H { + a: b; } +/* line 105, scss_css.scss */ +E > F, G > H { + a: b; } +/* This is a CSS comment. */ +.one { + color: green; } +/* Another comment */ +/* The following should not be used: + .two {color: red;} */ +.three { + color: green; + /* color: red; */ } +/** + .four {color: red;} */ +/* line 116, scss_css.scss */ +.five { + color: green; } +/**/ +/* line 118, scss_css.scss */ +.six { + color: green; } +/*********/ +/* line 120, scss_css.scss */ +.seven { + color: green; } +/* a comment **/ +/* line 122, scss_css.scss */ +.eight { + color: green; } +/* line 125, scss_css.scss */ +foo { + a: \foo bar; + b: foo\ bar; + c: \2022 \0020; + d: foo\\bar; + e: foo\"\'bar; } +/* line 133, scss_css.scss */ +foo { + a: "\foo bar"; + b: "foo\ bar"; + c: "\2022 \0020"; + d: "foo\\bar"; + e: "foo\"'bar"; } +/* line 141, scss_css.scss */ +foo { + _name: val; + *name: val; + :name: val; + .name: val; + #name: val; + name/**/: val; + name/*\**/: val; + name: val; } + +@foo "bar" ; +/* line 154, scss_css.scss */ +foo { + a: -moz-element(#foo); + b: -webkit-element(#foo); + b: -foobar-element(#foo); } +/* line 160, scss_css.scss */ +/* line 162, scss_css.scss */ + +@foo ; +/* line 168, scss_css.scss */ +foo { + bar: baz; } +/* line 173, scss_css.scss */ +/* line 175, scss_css.scss */ + +/* line 179, scss_css.scss */ + +0% { + a: b; } +/* line 183, scss_css.scss */ +60% { + a: b; } +/* line 187, scss_css.scss */ +100% { + a: b; } +/* line 191, scss_css.scss */ +12px { + a: b; } +/* line 195, scss_css.scss */ +"foo" { + a: b; } +/* line 199, scss_css.scss */ +foo { + a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } + +/* line 200, scss_css.scss */ +/* line 203, scss_css.scss */ +:foo("bar") { + a: b; } +/* line 207, scss_css.scss */ +:foo(bar) { + a: b; } +/* line 211, scss_css.scss */ +:foo(12px) { + a: b; } +/* line 215, scss_css.scss */ +:foo(+) { + a: b; } +/* line 219, scss_css.scss */ +:foo(-) { + a: b; } +/* line 223, scss_css.scss */ +:foo(+"bar") { + a: b; } +/* line 227, scss_css.scss */ +:foo(-++--baz-"bar"12px) { + a: b; } +/* line 231, scss_css.scss */ +foo { + a: foo-bar(12); + b: -foo-bar-baz(13, 14 15); } + +@import "foo.css" screen, print and (foo: 0); +@import "foo.css" screen, only print, screen and (foo: 0); +/* line 254, scss_css.scss */ +foo { + a: foo !important; + b: foo bar !important; + b: foo, bar !important; } +/* line 260, scss_css.scss */ +foo { + a: -moz-bar-baz; + b: foo -o-bar-baz; } + +foo { + a: d; + /* b; c: */ } + +foo { + a : d; + /*: b; c */ } +/* Foo + * Bar */ +/* line 275, scss_css.scss */ +.foo { + /* Foo + * Bar */ } +/* line 280, scss_css.scss */ +[foo] { + a: b; } +/* line 284, scss_css.scss */ +[foo="bar"] { + a: b; } +/* line 288, scss_css.scss */ +[foo~="bar"] { + a: b; } +/* line 292, scss_css.scss */ +[foo^="bar"] { + a: b; } +/* line 296, scss_css.scss */ +[foo$="bar"] { + a: b; } +/* line 300, scss_css.scss */ +[foo*="bar"] { + a: b; } +/* line 304, scss_css.scss */ +[foo|="en"] { + a: b; } +/* line 308, scss_css.scss */ +:root { + a: b; } +/* line 312, scss_css.scss */ +:nth-child(n) { + a: b; } +/* line 316, scss_css.scss */ +:nth-last-child(n) { + a: b; } +/* line 320, scss_css.scss */ +:nth-of-type(n) { + a: b; } +/* line 324, scss_css.scss */ +:nth-last-of-type(n) { + a: b; } +/* line 328, scss_css.scss */ +:first-child { + a: b; } +/* line 332, scss_css.scss */ +:last-child { + a: b; } +/* line 336, scss_css.scss */ +:first-of-type { + a: b; } +/* line 340, scss_css.scss */ +:last-of-type { + a: b; } +/* line 344, scss_css.scss */ +:only-child { + a: b; } +/* line 348, scss_css.scss */ +:only-of-type { + a: b; } +/* line 352, scss_css.scss */ +:empty { + a: b; } +/* line 356, scss_css.scss */ +:link { + a: b; } +/* line 360, scss_css.scss */ +:visited { + a: b; } +/* line 364, scss_css.scss */ +:active { + a: b; } +/* line 368, scss_css.scss */ +:hover { + a: b; } +/* line 372, scss_css.scss */ +:focus { + a: b; } +/* line 376, scss_css.scss */ +:target { + a: b; } +/* line 380, scss_css.scss */ +:lang(fr) { + a: b; } +/* line 384, scss_css.scss */ +:enabled { + a: b; } +/* line 388, scss_css.scss */ +:disabled { + a: b; } +/* line 392, scss_css.scss */ +:checked { + a: b; } +/* line 396, scss_css.scss */ +::first-line { + a: b; } +/* line 400, scss_css.scss */ +::first-letter { + a: b; } +/* line 404, scss_css.scss */ +::before { + a: b; } +/* line 408, scss_css.scss */ +::after { + a: b; } +/* line 412, scss_css.scss */ +.warning { + a: b; } +/* line 416, scss_css.scss */ +#myid { + a: b; } +/* line 420, scss_css.scss */ +:not(s) { + a: b; } +/* line 424, scss_css.scss */ +@media all { + /* line 425, scss_css.scss */ + rule1 { + prop: val; } + + /* line 428, scss_css.scss */ + rule2 { + prop: val; } } +/* line 432, scss_css.scss */ +@media screen, print { + /* line 433, scss_css.scss */ + rule1 { + prop: val; } + + /* line 436, scss_css.scss */ + rule2 { + prop: val; } } +/* line 440, scss_css.scss */ +@media screen and (-webkit-min-device-pixel-ratio: 0) { + a: b; } +/* line 444, scss_css.scss */ +@media only screen, print and (foo: 0px) and (bar: flam(12px solid)) { + a: b; } +/* line 448, scss_css.scss */ +:-moz-any(h1, h2, h3) { + a: b; } +/* line 452, scss_css.scss */ +:-moz-any(.foo) { + a: b; } +/* line 456, scss_css.scss */ +:-moz-any(foo bar, .baz > .bang) { + a: b; } + +@-moz-document url(http://www.w3.org/), +url-prefix(http://www.w3.org/Style/), +domain(mozilla.org), +/* line 463, scss_css.scss */ +regexp("^https:.*") { +/* line 464, scss_css.scss */ + .foo { + a: b; } } +/* line 468, scss_css.scss */ +foo { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr=#c0ff3300, endColorstr=#ff000000); } +/* line 473, scss_css.scss */ +foo { + filter: alpha(opacity=20); + filter: alpha(opacity=20, enabled=true); + filter: blaznicate(foo=bar, baz=bang bip, bart=#fa4600); } +/* line 479, scss_css.scss */ +@foo bar { + a: b; } +/* line 482, scss_css.scss */ +@bar baz { + c: d; } + +@foo bar; +@bar baz; +/* Foo +* Bar */ +/* Baz +* Bang */ +/* line 496, scss_css.scss */ +.foo { + /* Foo + * Bar */ + /* Baz + * Bang */ } +/* line 503, scss_css.scss */ +.foo { + /* Foo Bar */ + /* Baz Bang */ } + +@namespace "http://www.w3.org/Profiles/xhtml1-strict"; +@namespace url(http://www.w3.org/Profiles/xhtml1-strict); +@namespace html url("http://www.w3.org/Profiles/xhtml1-strict"); +/* line 513, scss_css.scss */ +[foo|bar=baz] { + a: b; } +/* line 517, scss_css.scss */ +[*|bar=baz] { + a: b; } +/* line 521, scss_css.scss */ +[foo|bar|=baz] { + a: b; } +/* line 525, scss_css.scss */ +foo|E { + a: b; } +/* line 529, scss_css.scss */ +*|E { + a: b; } +/* line 533, scss_css.scss */ +foo|* { + a: b; } +/* line 537, scss_css.scss */ +*|* { + a: b; } +/* line 541, scss_css.scss */ +:not(foo|bar) { + a: b; } +/* line 545, scss_css.scss */ +:not(*|bar) { + a: b; } +/* line 549, scss_css.scss */ +:not(foo|*) { + a: b; } +/* line 553, scss_css.scss */ +:not(*|*) { + a: b; } +/* line 557, scss_css.scss */ +:not(#blah) { + a: b; } +/* line 561, scss_css.scss */ +:not(.blah) { + a: b; } +/* line 565, scss_css.scss */ +:not([foo]) { + a: b; } +/* line 569, scss_css.scss */ +:not([foo^="bar"]) { + a: b; } +/* line 573, scss_css.scss */ +:not([baz|foo~="bar"]) { + a: b; } +/* line 577, scss_css.scss */ +:not(:hover) { + a: b; } +/* line 581, scss_css.scss */ +:not(:nth-child(2n + 3)) { + a: b; } +/* line 585, scss_css.scss */ +:not(:not(#foo)) { + a: b; } +/* line 589, scss_css.scss */ +:not(a#foo.bar) { + a: b; } +/* line 593, scss_css.scss */ +:not(#foo .bar > baz) { + a: b; } +/* line 597, scss_css.scss */ +:not(h1, h2, h3) { + a: b; } +/* line 605, scss_css.scss */ +foo { + a: "bang 1 bar bip"; } + +/* line 606, scss_css.scss */ +/* line 609, scss_css.scss */ +:nth-child(-n) { + a: b; } +/* line 613, scss_css.scss */ +:nth-child(+n) { + a: b; } +/* line 617, scss_css.scss */ +:nth-child(even) { + a: b; } +/* line 621, scss_css.scss */ +:nth-child(odd) { + a: b; } +/* line 625, scss_css.scss */ +:nth-child(50) { + a: b; } +/* line 629, scss_css.scss */ +:nth-child(-50) { + a: b; } +/* line 633, scss_css.scss */ +:nth-child(+50) { + a: b; } +/* line 637, scss_css.scss */ +:nth-child(2n+3) { + a: b; } +/* line 641, scss_css.scss */ +:nth-child(2n-3) { + a: b; } +/* line 645, scss_css.scss */ +:nth-child(+2n-3) { + a: b; } +/* line 649, scss_css.scss */ +:nth-child(-2n+3) { + a: b; } +/* line 653, scss_css.scss */ +:nth-child(-2n+ 3) { + a: b; } +/* line 657, scss_css.scss */ +:nth-child( 2n + 3) { + a: b; } +/* line 661, scss_css.scss */ +foo { + a: foo bar baz; + b: foo, #abc, -12; + c: 1px/2px/-3px; + d: foo bar, baz/bang; } +/* line 668, scss_css.scss */ +@page { + prop1: val; + prop2: val; } +/* line 673, scss_css.scss */ +@page flap { + prop1: val; + prop2: val; } +/* line 678, scss_css.scss */ +@page :first { + prop1: val; + prop2: val; } +/* line 683, scss_css.scss */ +@page flap:first { + prop1: val; + prop2: val; } +/* line 688, scss_css.scss */ +.foo { + /* Foo */ + a: b; } +/* line 693, scss_css.scss */ +.foo { + /* Foo + * Bar */ + a: b; } +/* Foo */ +/* line 699, scss_css.scss */ +.foo { + a: b; } +/* Foo + * Bar */ +.foo { + a: b; } + +.foo #bar:baz(/* bang )*/ bip) { + /* .a #foo */ + a: b; } +/* line 712, scss_css.scss */ +> E { + a: b; } +/* line 716, scss_css.scss */ ++ E { + a: b; } +/* line 720, scss_css.scss */ +~ E { + a: b; } +/* line 724, scss_css.scss */ +> > E { + a: b; } +/* line 728, scss_css.scss */ +>> E { + a: b; } +/* line 732, scss_css.scss */ +E* { + a: b; } +/* line 736, scss_css.scss */ +E*.foo { + a: b; } +/* line 740, scss_css.scss */ +E*:hover { + a: b; } + +E, F { + a: b; } + +/* line 745, scss_css.scss */ + +E F { + a: b; } + +/* line 750, scss_css.scss */ + +E, F G, H { + a: b; } + +/* line 755, scss_css.scss */ +/* line 759, scss_css.scss */ +body { + /* + //comment here + */ } +/* line 766, scss_css.scss */ +E > F { + a: b; } +/* line 768, scss_css.scss */ +E ~ F { + a: b; } +/* line 770, scss_css.scss */ +E + F { + a: b; } +/* line 772, scss_css.scss */ +* { + a: b; } +/* line 776, scss_css.scss */ +E { + a: b; } +/* line 780, scss_css.scss */ +E[foo] { + a: b; } +/* line 784, scss_css.scss */ +E[foo="bar"] { + a: b; } +/* line 788, scss_css.scss */ +E[foo~="bar"] { + a: b; } +/* line 792, scss_css.scss */ +E[foo^="bar"] { + a: b; } +/* line 796, scss_css.scss */ +E[foo$="bar"] { + a: b; } +/* line 800, scss_css.scss */ +E[foo*="bar"] { + a: b; } +/* line 804, scss_css.scss */ +E[foo|="en"] { + a: b; } +/* line 808, scss_css.scss */ +E:root { + a: b; } +/* line 812, scss_css.scss */ +E:nth-child(n) { + a: b; } +/* line 816, scss_css.scss */ +E:nth-last-child(n) { + a: b; } +/* line 820, scss_css.scss */ +E:nth-of-type(n) { + a: b; } +/* line 824, scss_css.scss */ +E:nth-last-of-type(n) { + a: b; } +/* line 828, scss_css.scss */ +E:first-child { + a: b; } +/* line 832, scss_css.scss */ +E:last-child { + a: b; } +/* line 836, scss_css.scss */ +E:first-of-type { + a: b; } +/* line 840, scss_css.scss */ +E:last-of-type { + a: b; } +/* line 844, scss_css.scss */ +E:only-child { + a: b; } +/* line 848, scss_css.scss */ +E:only-of-type { + a: b; } +/* line 852, scss_css.scss */ +E:empty { + a: b; } +/* line 856, scss_css.scss */ +E:link { + a: b; } +/* line 860, scss_css.scss */ +E:visited { + a: b; } +/* line 864, scss_css.scss */ +E:active { + a: b; } +/* line 868, scss_css.scss */ +E:hover { + a: b; } +/* line 872, scss_css.scss */ +E:focus { + a: b; } +/* line 876, scss_css.scss */ +E:target { + a: b; } +/* line 880, scss_css.scss */ +E:lang(fr) { + a: b; } +/* line 884, scss_css.scss */ +E:enabled { + a: b; } +/* line 888, scss_css.scss */ +E:disabled { + a: b; } +/* line 892, scss_css.scss */ +E:checked { + a: b; } +/* line 896, scss_css.scss */ +E::first-line { + a: b; } +/* line 900, scss_css.scss */ +E::first-letter { + a: b; } +/* line 904, scss_css.scss */ +E::before { + a: b; } +/* line 908, scss_css.scss */ +E::after { + a: b; } +/* line 912, scss_css.scss */ +E.warning { + a: b; } +/* line 916, scss_css.scss */ +E#myid { + a: b; } +/* line 920, scss_css.scss */ +E:not(s) { + a: b; } +/* line 924, scss_css.scss */ +E F { + a: b; } +/* line 928, scss_css.scss */ +E > F { + a: b; } +/* line 932, scss_css.scss */ +E + F { + a: b; } +/* line 936, scss_css.scss */ +E ~ F { + a: b; } +/* line 940, scss_css.scss */ +@supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { +/* line 941, scss_css.scss */ + .foo { + a: b; } } +/* line 947, scss_css.scss */ +@-prefix-supports (a: b) and (c: d) or (not (d: e)) and ((not (f: g)) or (not ((h: i) and (j: k)))) { +/* line 948, scss_css.scss */ + .foo { + a: b; } } +/* line 954, scss_css.scss */ +foo { + foo: bar; + #baz: bang; + #bip: bop; } +/* line 960, scss_css.scss */ +foo { + a: -2; + b: -2.3em; + c: -50%; + d: -foo(bar baz); } +/* line 967, scss_css.scss */ +foo { + a: -0.5em; + b: 0.5em; + c: -foo(12px); + d: +foo(12px); } +/* line 977, scss_css.scss */ +foo { + -moz-foo-bar: blat; + -o-flat-blang: wibble; } +/* line 982, scss_css.scss */ +foo { + a: foo(); + b: bar baz-bang() bip; } diff --git a/tests/outputs/selectors_numbered.css b/tests/outputs/selectors_numbered.css new file mode 100644 index 00000000..e945befb --- /dev/null +++ b/tests/outputs/selectors_numbered.css @@ -0,0 +1,360 @@ +/* line 1, selectors.scss */ +* { + color: blue; } +/* line 2, selectors.scss */ +E { + color: blue; } +/* line 4, selectors.scss */ +E:not(:link) { + color: blue; } +/* line 5, selectors.scss */ +E:not(:link):not(:visited) { + color: blue; } +/* line 6, selectors.scss */ +E:not(:link, :visited) { + color: blue; } +/* line 7, selectors.scss */ +E:matches(:hover, :focus) { + color: blue; } +/* line 9, selectors.scss */ +E.warning { + color: blue; } +/* line 10, selectors.scss */ +E#id { + color: blue; } +/* line 11, selectors.scss */ +E[foo] { + color: blue; } +/* line 12, selectors.scss */ +E[foo="barbar"] { + color: blue; } +/* line 13, selectors.scss */ +E[foo="barbar" i] { + color: blue; } +/* line 14, selectors.scss */ +E[foo~="hello#$@%@$#^"] { + color: blue; } +/* line 15, selectors.scss */ +E[foo^="color: green;"] { + color: blue; } +/* line 16, selectors.scss */ +E[foo$="239023"] { + color: blue; } +/* line 17, selectors.scss */ +E[foo*="29302"] { + color: blue; } +/* line 18, selectors.scss */ +E[foo|="239032"] { + color: blue; } +/* line 20, selectors.scss */ +[foo] { + color: blue; } +/* line 21, selectors.scss */ +[foo] .helloWorld { + color: blue; } +/* line 22, selectors.scss */ +[foo].helloWorld { + color: blue; } +/* line 23, selectors.scss */ +[foo="barbar"] { + color: blue; } +/* line 24, selectors.scss */ +[foo~="hello#$@%@$#^"] { + color: blue; } +/* line 25, selectors.scss */ +[foo^="color: green;"] { + color: blue; } +/* line 26, selectors.scss */ +[foo$="239023"] { + color: blue; } +/* line 27, selectors.scss */ +[foo*="29302"] { + color: blue; } +/* line 28, selectors.scss */ +[foo|="239032"] { + color: blue; } +/* line 30, selectors.scss */ +E:dir(ltr) { + color: blue; } +/* line 31, selectors.scss */ +E:lang(en) { + color: blue; } +/* line 32, selectors.scss */ +E:lang(en, fr) { + color: blue; } +/* line 34, selectors.scss */ +E:any-link { + color: blue; } +/* line 35, selectors.scss */ +E:link { + color: blue; } +/* line 36, selectors.scss */ +E:visited { + color: blue; } +/* line 37, selectors.scss */ +E:local-link { + color: blue; } +/* line 38, selectors.scss */ +E:local-link(0) { + color: red; } +/* line 39, selectors.scss */ +E:local-link(1) { + color: white; } +/* line 40, selectors.scss */ +E:local-link(2) { + color: red; } +/* line 41, selectors.scss */ +E:target { + color: blue; } +/* line 42, selectors.scss */ +E:scope { + color: blue; } +/* line 44, selectors.scss */ +E:current { + color: blue; } +/* line 45, selectors.scss */ +E:current(:link) { + color: blue; } +/* line 46, selectors.scss */ +E:past { + color: blue; } +/* line 47, selectors.scss */ +E:future { + color: blue; } +/* line 49, selectors.scss */ +E:active { + color: blue; } +/* line 50, selectors.scss */ +E:hover { + color: blue; } +/* line 51, selectors.scss */ +E:focus { + color: blue; } +/* line 52, selectors.scss */ +E:enabled { + color: blue; } +/* line 53, selectors.scss */ +E:disabled { + color: blue; } +/* line 54, selectors.scss */ +E:indeterminate { + color: blue; } +/* line 55, selectors.scss */ +E:default { + color: blue; } +/* line 56, selectors.scss */ +E:in-range { + color: blue; } +/* line 57, selectors.scss */ +E:out-of-range { + color: blue; } +/* line 58, selectors.scss */ +E:required { + color: blue; } +/* line 59, selectors.scss */ +E:optional { + color: blue; } +/* line 60, selectors.scss */ +E:read-only { + color: blue; } +/* line 61, selectors.scss */ +E:read-write { + color: blue; } +/* line 63, selectors.scss */ +E:root { + color: blue; } +/* line 64, selectors.scss */ +E:empty { + color: blue; } +/* line 65, selectors.scss */ +E:first-child { + color: blue; } +/* line 66, selectors.scss */ +E:nth-child(odd) { + color: blue; } +/* line 67, selectors.scss */ +E:nth-child(2n+1) { + color: blue; } +/* line 68, selectors.scss */ +E:nth-child(5) { + color: blue; } +/* line 69, selectors.scss */ +E:last-child { + color: blue; } +/* line 70, selectors.scss */ +E:nth-last-child(-n+2) { + color: blue; } +/* line 71, selectors.scss */ +E:only-child { + color: blue; } +/* line 72, selectors.scss */ +E:first-of-type { + color: blue; } +/* line 73, selectors.scss */ +E:nth-of-type(2n) { + color: blue; } +/* line 74, selectors.scss */ +E:last-of-type { + color: blue; } +/* line 75, selectors.scss */ +E:nth-last-of-type(n) { + color: blue; } +/* line 76, selectors.scss */ +E:only-of-type { + color: blue; } +/* line 77, selectors.scss */ +E:nth-match(odd) { + color: blue; } +/* line 78, selectors.scss */ +E:nth-last-match(odd) { + color: blue; } +/* line 80, selectors.scss */ +E:column(n) { + color: blue; } +/* line 81, selectors.scss */ +E:nth-column(n) { + color: blue; } +/* line 82, selectors.scss */ +E:nth-last-column(n) { + color: blue; } +/* line 84, selectors.scss */ +E F { + color: blue; } +/* line 85, selectors.scss */ +E > F { + color: blue; } +/* line 86, selectors.scss */ +E + F { + color: blue; } +/* line 87, selectors.scss */ +E ~ F { + color: blue; } +/* line 88, selectors.scss */ +E /foo/ F { + color: blue; } +/* line 89, selectors.scss */ +E! > F { + color: blue; } +/* line 92, selectors.scss */ +[foo|att=val] { + color: blue; } +/* line 93, selectors.scss */ +[*|att] { + color: yellow; } +/* line 94, selectors.scss */ +[|att] { + color: green; } +/* line 95, selectors.scss */ +[att] { + color: green; } +/* line 98, selectors.scss */ +E::first-line { + color: blue; } +/* line 99, selectors.scss */ +E::first-letter { + color: blue; } +/* line 100, selectors.scss */ +E::before { + color: blue; } +/* line 101, selectors.scss */ +E::after { + color: blue; } +/* line 104, selectors.scss */ +E::choices { + color: blue; } +/* line 105, selectors.scss */ +E::value { + color: blue; } +/* line 106, selectors.scss */ +E::repeat-index { + color: blue; } +/* line 107, selectors.scss */ +E::repeat-item { + color: blue; } +/* line 109, selectors.scss */ +E:first { + color: blue; } +/* line 110, selectors.scss */ +E:first-line { + color: blue; } +/* line 111, selectors.scss */ +E:first-letter { + color: blue; } +/* line 112, selectors.scss */ +E:before { + color: blue; } +/* line 113, selectors.scss */ +E:after { + color: blue; } +/* line 114, selectors.scss */ +E:checked { + color: blue; } +/* line 115, selectors.scss */ +E:invalid { + color: blue; } +/* line 116, selectors.scss */ +E:valid { + color: blue; } +/* line 117, selectors.scss */ +E:left { + color: blue; } +/* line 118, selectors.scss */ +E:right { + color: blue; } +/* line 121, selectors.scss */ +E:any(ol) { + color: blue; } +/* line 122, selectors.scss */ +E::selection { + color: blue; } +/* line 126, selectors.scss */ +div { + font: something; + font-size: 30em; } + +/* line 127, selectors.scss */ + div font:something { + size: 30em; } + +/* line 131, selectors.scss */ +/* line 139, selectors.scss */ +/* line 140, selectors.scss */ + .something.world { + color: blue; } + +/* line 144, selectors.scss */ + .something .mold { + height: 200px; } + +/* line 148, selectors.scss */ + .dog .something { + color: blue; } +/* line 153, selectors.scss */ +/* line 154, selectors.scss */ + .dad .simple .wolf { + color: blue; } + +/* line 158, selectors.scss */ + .rad.simple.bad { + color: blue; } +/* line 164, selectors.scss */ +/* line 165, selectors.scss */ + /* line 166, selectors.scss */ + .something div .what.world { + color: blue; } +/* line 172, selectors.scss */ +/* line 173, selectors.scss */ + div.foo div { + color: blue; } +/* line 178, selectors.scss */ +/* line 179, selectors.scss */ + /* line 180, selectors.scss */ + /* line 181, selectors.scss */ + .nice-fonts .main .message div .title, .nice-fonts div .message div .title { + font-size: 24px; } +/* line 189, selectors.scss */ +.escape\% { + color: red; } +/* line 193, selectors.scss */ +.escape-plan\% { + color: green; } diff --git a/tests/outputs/values_numbered.css b/tests/outputs/values_numbered.css new file mode 100644 index 00000000..a10e3b50 --- /dev/null +++ b/tests/outputs/values_numbered.css @@ -0,0 +1,38 @@ +/* line 2, values.scss */ +#values { + color: #eee; + color: #eee; + height: 20px; + width: 80%; + color: "hello world"; + height: url("http://google.com"); + dads: url(http://leafo.net); + padding: 10px 10px 10px 10px, 3px 3px 3px; + textblock: "This is a \ +multiline block \ +/* line 13, values.scss */ +#not { color: #eee;}"; + margin: 4, 3, 1; + content: "This is a \ +multiline string."; + border-radius: -1px -1px -1px black; } +/* line 20, values.scss */ +#subtraction { + lit: 10 -11; + lit: -1; + lit: -1; + lit: -1; + var: -90; + var: -90; + var: -90; + var: -90; } +/* line 34, values.scss */ +#special { + a: 12px expression(1 + (3 / Foo.bar("baz" + "bang") + function() {return 12;}) % 12); } + +/* line 35, values.scss */ +/* line 38, values.scss */ +#unary { + b: 0.5em; + c: -foo(12px); + d: +foo(12px); } diff --git a/tests/outputs/variables_numbered.css b/tests/outputs/variables_numbered.css new file mode 100644 index 00000000..9a000844 --- /dev/null +++ b/tests/outputs/variables_numbered.css @@ -0,0 +1,28 @@ +cool: 100px; +/* line 4, variables.scss */ +div { + height: red, two, three; } +/* line 10, variables.scss */ +div { + num: 1000; } +/* line 15, variables.scss */ +div { + num: 2000; } +/* line 23, variables.scss */ +pre { + color: blue; } +/* line 31, variables.scss */ +del { + color: red; } + +/* line 34, variables.scss */ + /* line 36, variables.scss */ + del div pre { + color: red; } +/* line 50, variables.scss */ +body { + font-family: Arial; + font-family: Helvetica Neue; + font-family: "Helvetica Neue"; + font-family: Helvetica, Arial, sans-serif; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }