Updated SCSS compiler to v1.10, composer update

This commit is contained in:
Matias Griese
2022-02-07 10:22:51 +02:00
parent 9317a497fb
commit 9f9198b329
43 changed files with 1402 additions and 452 deletions

View File

@@ -3,6 +3,7 @@
1. [](#new)
* Require **Grav 1.7.30**
* Updated SCSS compiler to v1.10
* PageMedia can now be collapsed and thumbnails previewed smaller, in order to save room on the page. Selection will be remembered.
* DEPRECATED: Admin field `pages_list_display_field` is no longer available as an option [#2191](https://github.com/getgrav/grav-plugin-admin/issues/2191)
* When listing installable themes/plugins, it is now possible to sort them by [Premium](https://getgrav.org/premium)

221
composer.lock generated
View File

@@ -190,16 +190,16 @@
},
{
"name": "scssphp/scssphp",
"version": "v1.9.0",
"version": "v1.10.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd"
"reference": "9699a52a862da4efb43985943afa17150155dd3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
"reference": "9699a52a862da4efb43985943afa17150155dd3d",
"shasum": ""
},
"require": {
@@ -215,7 +215,7 @@
"symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5"
},
"suggest": {
@@ -258,9 +258,9 @@
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.9.0"
"source": "https://github.com/scssphp/scssphp/tree/v1.10.0"
},
"time": "2021-12-13T11:55:16+00:00"
"time": "2022-01-06T18:16:18+00:00"
}
],
"packages-dev": [
@@ -885,12 +885,12 @@
}
},
"autoload": {
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
},
"files": [
"src/functions_include.php"
]
],
"psr-4": {
"GuzzleHttp\\Psr7\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -976,9 +976,6 @@
"require": {
"php": "^7.1 || ^8.0"
},
"replace": {
"myclabs/deep-copy": "self.version"
},
"require-dev": {
"doctrine/collections": "^1.0",
"doctrine/common": "^2.6",
@@ -986,12 +983,12 @@
},
"type": "library",
"autoload": {
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
},
"files": [
"src/DeepCopy/deep_copy.php"
]
],
"psr-4": {
"DeepCopy\\": "src/DeepCopy/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -1239,16 +1236,16 @@
},
{
"name": "phpdocumentor/type-resolver",
"version": "1.5.1",
"version": "1.6.0",
"source": {
"type": "git",
"url": "https://github.com/phpDocumentor/TypeResolver.git",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae"
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae",
"url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"reference": "93ebd0014cab80c4ea9f5e297ea48672f1b87706",
"shasum": ""
},
"require": {
@@ -1283,9 +1280,9 @@
"description": "A PSR-5 based resolver of Class names, Types and Structural Element Names",
"support": {
"issues": "https://github.com/phpDocumentor/TypeResolver/issues",
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1"
"source": "https://github.com/phpDocumentor/TypeResolver/tree/1.6.0"
},
"time": "2021-10-02T14:08:47+00:00"
"time": "2022-01-04T19:58:01+00:00"
},
{
"name": "phpspec/prophecy",
@@ -2544,16 +2541,16 @@
},
{
"name": "symfony/browser-kit",
"version": "v4.4.27",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/browser-kit.git",
"reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b"
"reference": "6e81008cac62369871cb6b8de64576ed138e3998"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/9629d1524d8ced5a4ec3e94abdbd638b4ec8319b",
"reference": "9629d1524d8ced5a4ec3e94abdbd638b4ec8319b",
"url": "https://api.github.com/repos/symfony/browser-kit/zipball/6e81008cac62369871cb6b8de64576ed138e3998",
"reference": "6e81008cac62369871cb6b8de64576ed138e3998",
"shasum": ""
},
"require": {
@@ -2596,7 +2593,7 @@
"description": "Simulates the behavior of a web browser, allowing you to make requests, click on links and submit forms programmatically",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/browser-kit/tree/v4.4.27"
"source": "https://github.com/symfony/browser-kit/tree/v4.4.37"
},
"funding": [
{
@@ -2612,20 +2609,20 @@
"type": "tidelift"
}
],
"time": "2021-07-21T12:19:41+00:00"
"time": "2022-01-02T09:41:36+00:00"
},
{
"name": "symfony/console",
"version": "v4.4.36",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "621379b62bb19af213b569b60013200b11dd576f"
"reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/621379b62bb19af213b569b60013200b11dd576f",
"reference": "621379b62bb19af213b569b60013200b11dd576f",
"url": "https://api.github.com/repos/symfony/console/zipball/0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
"reference": "0259f01dbf9d77badddbbf4c2abb681f24c9cac6",
"shasum": ""
},
"require": {
@@ -2686,7 +2683,7 @@
"description": "Eases the creation of beautiful and testable command line interfaces",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/console/tree/v4.4.36"
"source": "https://github.com/symfony/console/tree/v4.4.37"
},
"funding": [
{
@@ -2702,20 +2699,20 @@
"type": "tidelift"
}
],
"time": "2021-12-15T10:33:10+00:00"
"time": "2022-01-26T16:15:26+00:00"
},
{
"name": "symfony/css-selector",
"version": "v4.4.27",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/css-selector.git",
"reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6"
"reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6",
"reference": "5194f18bd80d106f11efa8f7cd0fbdcc3af96ce6",
"url": "https://api.github.com/repos/symfony/css-selector/zipball/0628e6c6d7c92f1a7bae543959bdc17347be2436",
"reference": "0628e6c6d7c92f1a7bae543959bdc17347be2436",
"shasum": ""
},
"require": {
@@ -2752,7 +2749,7 @@
"description": "Converts CSS selectors to XPath expressions",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/css-selector/tree/v4.4.27"
"source": "https://github.com/symfony/css-selector/tree/v4.4.37"
},
"funding": [
{
@@ -2768,7 +2765,7 @@
"type": "tidelift"
}
],
"time": "2021-07-21T12:19:41+00:00"
"time": "2022-01-02T09:41:36+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -2839,16 +2836,16 @@
},
{
"name": "symfony/dom-crawler",
"version": "v4.4.36",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/dom-crawler.git",
"reference": "42de12bee3b5e594977209bcdf58ec4fef8dde39"
"reference": "60d36408a3a48500bcc6e30d9f831e51d04d7fa4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/42de12bee3b5e594977209bcdf58ec4fef8dde39",
"reference": "42de12bee3b5e594977209bcdf58ec4fef8dde39",
"url": "https://api.github.com/repos/symfony/dom-crawler/zipball/60d36408a3a48500bcc6e30d9f831e51d04d7fa4",
"reference": "60d36408a3a48500bcc6e30d9f831e51d04d7fa4",
"shasum": ""
},
"require": {
@@ -2893,7 +2890,7 @@
"description": "Eases DOM navigation for HTML and XML documents",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dom-crawler/tree/v4.4.36"
"source": "https://github.com/symfony/dom-crawler/tree/v4.4.37"
},
"funding": [
{
@@ -2909,20 +2906,20 @@
"type": "tidelift"
}
],
"time": "2021-12-28T14:48:02+00:00"
"time": "2022-01-02T09:41:36+00:00"
},
{
"name": "symfony/event-dispatcher",
"version": "v4.4.34",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8"
"reference": "3ccfcfb96ecce1217d7b0875a0736976bc6e63dc"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8",
"reference": "1a024b45369c9d55d76b6b8a241bd20c9ea1cbd8",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3ccfcfb96ecce1217d7b0875a0736976bc6e63dc",
"reference": "3ccfcfb96ecce1217d7b0875a0736976bc6e63dc",
"shasum": ""
},
"require": {
@@ -2977,7 +2974,7 @@
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.34"
"source": "https://github.com/symfony/event-dispatcher/tree/v4.4.37"
},
"funding": [
{
@@ -2993,7 +2990,7 @@
"type": "tidelift"
}
],
"time": "2021-11-15T14:42:25+00:00"
"time": "2022-01-02T09:41:36+00:00"
},
{
"name": "symfony/event-dispatcher-contracts",
@@ -3076,16 +3073,16 @@
},
{
"name": "symfony/finder",
"version": "v4.4.36",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/finder.git",
"reference": "1fef05633cd61b629e963e5d8200fb6b67ecf42c"
"reference": "b17d76d7ed179f017aad646e858c90a2771af15d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/finder/zipball/1fef05633cd61b629e963e5d8200fb6b67ecf42c",
"reference": "1fef05633cd61b629e963e5d8200fb6b67ecf42c",
"url": "https://api.github.com/repos/symfony/finder/zipball/b17d76d7ed179f017aad646e858c90a2771af15d",
"reference": "b17d76d7ed179f017aad646e858c90a2771af15d",
"shasum": ""
},
"require": {
@@ -3118,7 +3115,7 @@
"description": "Finds files and directories via an intuitive fluent interface",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/finder/tree/v4.4.36"
"source": "https://github.com/symfony/finder/tree/v4.4.37"
},
"funding": [
{
@@ -3134,25 +3131,28 @@
"type": "tidelift"
}
],
"time": "2021-12-15T10:33:10+00:00"
"time": "2022-01-02T09:41:36+00:00"
},
{
"name": "symfony/polyfill-ctype",
"version": "v1.23.0",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce"
"reference": "30885182c981ab175d4d034db0f6f469898070ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/30885182c981ab175d4d034db0f6f469898070ab",
"reference": "30885182c981ab175d4d034db0f6f469898070ab",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-ctype": "*"
},
"suggest": {
"ext-ctype": "For best performance"
},
@@ -3197,7 +3197,7 @@
"portable"
],
"support": {
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-ctype/tree/v1.24.0"
},
"funding": [
{
@@ -3213,20 +3213,20 @@
"type": "tidelift"
}
],
"time": "2021-02-19T12:13:01+00:00"
"time": "2021-10-20T20:35:02+00:00"
},
{
"name": "symfony/polyfill-intl-idn",
"version": "v1.23.0",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-idn.git",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65"
"reference": "749045c69efb97c70d25d7463abba812e91f3a44"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/65bd267525e82759e7d8c4e8ceea44f398838e65",
"reference": "65bd267525e82759e7d8c4e8ceea44f398838e65",
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44",
"reference": "749045c69efb97c70d25d7463abba812e91f3a44",
"shasum": ""
},
"require": {
@@ -3248,12 +3248,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
},
"files": [
"bootstrap.php"
]
],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Idn\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -3284,7 +3284,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0"
},
"funding": [
{
@@ -3300,11 +3300,11 @@
"type": "tidelift"
}
],
"time": "2021-05-27T09:27:20+00:00"
"time": "2021-09-14T14:02:44+00:00"
},
{
"name": "symfony/polyfill-intl-normalizer",
"version": "v1.23.0",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
@@ -3333,12 +3333,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Intl\\Normalizer\\": ""
},
"classmap": [
"Resources/stubs"
]
@@ -3368,7 +3368,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.23.0"
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0"
},
"funding": [
{
@@ -3388,21 +3388,24 @@
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.23.1",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825",
"reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
@@ -3448,7 +3451,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0"
},
"funding": [
{
@@ -3464,20 +3467,20 @@
"type": "tidelift"
}
],
"time": "2021-05-27T12:26:48+00:00"
"time": "2021-11-30T18:21:41+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.23.1",
"version": "v1.24.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"shasum": ""
},
"require": {
@@ -3494,12 +3497,12 @@
}
},
"autoload": {
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Php80\\": ""
},
"classmap": [
"Resources/stubs"
]
@@ -3531,7 +3534,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
"source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0"
},
"funding": [
{
@@ -3547,20 +3550,20 @@
"type": "tidelift"
}
],
"time": "2021-07-28T13:41:28+00:00"
"time": "2021-09-13T13:58:33+00:00"
},
{
"name": "symfony/process",
"version": "v4.4.36",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "a35d6b8f82e2272504f23a267de49b8717ca0028"
"reference": "b2d924e5a4cb284f293d5092b1dbf0d364cb8b67"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/a35d6b8f82e2272504f23a267de49b8717ca0028",
"reference": "a35d6b8f82e2272504f23a267de49b8717ca0028",
"url": "https://api.github.com/repos/symfony/process/zipball/b2d924e5a4cb284f293d5092b1dbf0d364cb8b67",
"reference": "b2d924e5a4cb284f293d5092b1dbf0d364cb8b67",
"shasum": ""
},
"require": {
@@ -3593,7 +3596,7 @@
"description": "Executes commands in sub-processes",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/process/tree/v4.4.36"
"source": "https://github.com/symfony/process/tree/v4.4.37"
},
"funding": [
{
@@ -3609,7 +3612,7 @@
"type": "tidelift"
}
],
"time": "2021-12-19T16:27:15+00:00"
"time": "2022-01-27T17:14:04+00:00"
},
{
"name": "symfony/service-contracts",
@@ -3696,16 +3699,16 @@
},
{
"name": "symfony/yaml",
"version": "v4.4.36",
"version": "v4.4.37",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "a19f7c44ba665fa9d9d415cc4493361381b93f9b"
"reference": "d7f637cc0f0cc14beb0984f2bb50da560b271311"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/a19f7c44ba665fa9d9d415cc4493361381b93f9b",
"reference": "a19f7c44ba665fa9d9d415cc4493361381b93f9b",
"url": "https://api.github.com/repos/symfony/yaml/zipball/d7f637cc0f0cc14beb0984f2bb50da560b271311",
"reference": "d7f637cc0f0cc14beb0984f2bb50da560b271311",
"shasum": ""
},
"require": {
@@ -3747,7 +3750,7 @@
"description": "Loads and dumps YAML files",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/yaml/tree/v4.4.36"
"source": "https://github.com/symfony/yaml/tree/v4.4.37"
},
"funding": [
{
@@ -3763,7 +3766,7 @@
"type": "tidelift"
}
],
"time": "2021-11-25T16:40:00+00:00"
"time": "2022-01-24T20:11:01+00:00"
},
{
"name": "theseer/tokenizer",
@@ -3889,5 +3892,5 @@
"platform-overrides": {
"php": "7.3.6"
},
"plugin-api-version": "2.1.0"
"plugin-api-version": "2.2.0"
}

View File

@@ -57,23 +57,23 @@
{% set child = prepare_form_field(child, child_name, field.name, {key: key}) %}
{% if child %}
{% set default_layout = 'text' %}
{% if child.type == 'key' or child.key == true %}
{# Special handling for the key field #}
{% set default_layout = 'key' %}
{% set child_value = key %}
{% elseif child.name == 'value' %}
{# Special handling for the value field #}
{% set child = child|merge({ name: field.name }) %}
{% set child_value = value %}
{% else %}
{% set child_value = form ? form.value(child.name) : data.value(child.name) %}
{% endif %}
{% if child.type == 'key' or child.key == true %}
{# Special handling for the key field #}
{% set default_layout = 'key' %}
{% set child_value = key %}
{% elseif child.name == 'value' %}
{# Special handling for the value field #}
{% set child = child|merge({ name: field.name }) %}
{% set child_value = value %}
{% else %}
{% set child_value = form ? form.value(child.name) : data.value(child.name) %}
{% endif %}
{% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
{% if default_layout != 'key' %}
{% set originalValue = child_value %}
{% endif %}
{% include field_templates with { field: child, value: child_value } %}
{% set field_templates = include_form_field(child.type, field_layout, default_layout) %}
{% if default_layout != 'key' %}
{% set originalValue = child_value %}
{% endif %}
{% include field_templates with { field: child, value: child_value } %}
{% endif %}
{% endfor %}
{% endif %}

2
vendor/autoload.php vendored
View File

@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23::getLoader();
return ComposerAutoloaderInit38a448a612c5797456d245c809d4a914::getLoader();

1
vendor/bin/picofeed vendored
View File

@@ -1 +0,0 @@
../p3k/picofeed/picofeed

107
vendor/bin/picofeed vendored Executable file
View File

@@ -0,0 +1,107 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../p3k/picofeed/picofeed)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/p3k/picofeed/picofeed');
exit(0);
}
}
include __DIR__ . '/..'.'/p3k/picofeed/picofeed';

1
vendor/bin/pscss vendored
View File

@@ -1 +0,0 @@
../scssphp/scssphp/bin/pscss

107
vendor/bin/pscss vendored Executable file
View File

@@ -0,0 +1,107 @@
#!/usr/bin/env php
<?php
/**
* Proxy PHP file generated by Composer
*
* This file includes the referenced bin path (../scssphp/scssphp/bin/pscss)
* using a stream wrapper to prevent the shebang from being output on PHP<8
*
* @generated
*/
namespace Composer;
$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
if (PHP_VERSION_ID < 80000) {
if (!class_exists('Composer\BinProxyWrapper')) {
/**
* @internal
*/
final class BinProxyWrapper
{
private $handle;
private $position;
private $realpath;
public function stream_open($path, $mode, $options, &$opened_path)
{
// get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
$opened_path = substr($path, 17);
$this->realpath = realpath($opened_path) ?: $opened_path;
$opened_path = $this->realpath;
$this->handle = fopen($this->realpath, $mode);
$this->position = 0;
return (bool) $this->handle;
}
public function stream_read($count)
{
$data = fread($this->handle, $count);
if ($this->position === 0) {
$data = preg_replace('{^#!.*\r?\n}', '', $data);
}
$this->position += strlen($data);
return $data;
}
public function stream_cast($castAs)
{
return $this->handle;
}
public function stream_close()
{
fclose($this->handle);
}
public function stream_lock($operation)
{
return $operation ? flock($this->handle, $operation) : true;
}
public function stream_tell()
{
return $this->position;
}
public function stream_eof()
{
return feof($this->handle);
}
public function stream_stat()
{
return array();
}
public function stream_set_option($option, $arg1, $arg2)
{
return true;
}
public function url_stat($path, $flags)
{
$path = substr($path, 17);
if (file_exists($path)) {
return stat($path);
}
return false;
}
}
}
if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
include("phpvfscomposer://" . __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss');
exit(0);
}
}
include __DIR__ . '/..'.'/scssphp/scssphp/bin/pscss';

View File

@@ -149,7 +149,7 @@ class ClassLoader
/**
* @return string[] Array of classname => path
* @psalm-var array<string, string>
* @psalm-return array<string, string>
*/
public function getClassMap()
{

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23
class ComposerAutoloaderInit38a448a612c5797456d245c809d4a914
{
private static $loader;
@@ -24,15 +24,15 @@ class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit38a448a612c5797456d245c809d4a914', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit38a448a612c5797456d245c809d4a914', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit38a448a612c5797456d245c809d4a914::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
@@ -53,23 +53,28 @@ class ComposerAutoloaderInit21cdc8503e0b8e5d43533c2109133c23
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit38a448a612c5797456d245c809d4a914::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire21cdc8503e0b8e5d43533c2109133c23($fileIdentifier, $file);
composerRequire38a448a612c5797456d245c809d4a914($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire21cdc8503e0b8e5d43533c2109133c23($fileIdentifier, $file)
/**
* @param string $fileIdentifier
* @param string $file
* @return void
*/
function composerRequire38a448a612c5797456d245c809d4a914($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
require $file;
}
}

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23
class ComposerStaticInit38a448a612c5797456d245c809d4a914
{
public static $files = array (
'7e9bd612cc444b3eed788ebbe46263a0' => __DIR__ . '/..' . '/laminas/laminas-zendframework-bridge/src/autoload.php',
@@ -63,10 +63,10 @@ class ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$prefixesPsr0;
$loader->classMap = ComposerStaticInit21cdc8503e0b8e5d43533c2109133c23::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixDirsPsr4;
$loader->prefixesPsr0 = ComposerStaticInit38a448a612c5797456d245c809d4a914::$prefixesPsr0;
$loader->classMap = ComposerStaticInit38a448a612c5797456d245c809d4a914::$classMap;
}, null, ClassLoader::class);
}

View File

@@ -193,17 +193,17 @@
},
{
"name": "scssphp/scssphp",
"version": "v1.9.0",
"version_normalized": "1.9.0.0",
"version": "v1.10.0",
"version_normalized": "1.10.0.0",
"source": {
"type": "git",
"url": "https://github.com/scssphp/scssphp.git",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd"
"reference": "9699a52a862da4efb43985943afa17150155dd3d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/bc8bece4e5e176973a832f3763049ddbba16e6fd",
"reference": "bc8bece4e5e176973a832f3763049ddbba16e6fd",
"url": "https://api.github.com/repos/scssphp/scssphp/zipball/9699a52a862da4efb43985943afa17150155dd3d",
"reference": "9699a52a862da4efb43985943afa17150155dd3d",
"shasum": ""
},
"require": {
@@ -219,14 +219,14 @@
"symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5"
},
"suggest": {
"ext-iconv": "Can be used as fallback when ext-mbstring is not available",
"ext-mbstring": "For best performance, mbstring should be installed as it is faster than ext-iconv"
},
"time": "2021-12-13T11:55:16+00:00",
"time": "2022-01-06T18:16:18+00:00",
"bin": [
"bin/pscss"
],
@@ -264,7 +264,7 @@
],
"support": {
"issues": "https://github.com/scssphp/scssphp/issues",
"source": "https://github.com/scssphp/scssphp/tree/v1.9.0"
"source": "https://github.com/scssphp/scssphp/tree/v1.10.0"
},
"install-path": "../scssphp/scssphp"
}

View File

@@ -5,7 +5,7 @@
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '07027f34e0bbf92b2cce3f3ac73ee74940d5b33a',
'reference' => '9317a497fbe62505ab8159be67cc6d365d21201f',
'name' => 'getgrav/grav-plugin-admin',
'dev' => false,
),
@@ -16,7 +16,7 @@
'type' => 'grav-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '07027f34e0bbf92b2cce3f3ac73ee74940d5b33a',
'reference' => '9317a497fbe62505ab8159be67cc6d365d21201f',
'dev_requirement' => false,
),
'laminas/laminas-xml' => array(
@@ -53,12 +53,12 @@
'dev_requirement' => false,
),
'scssphp/scssphp' => array(
'pretty_version' => 'v1.9.0',
'version' => '1.9.0.0',
'pretty_version' => 'v1.10.0',
'version' => '1.10.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../scssphp/scssphp',
'aliases' => array(),
'reference' => 'bc8bece4e5e176973a832f3763049ddbba16e6fd',
'reference' => '9699a52a862da4efb43985943afa17150155dd3d',
'dev_requirement' => false,
),
'symfony/polyfill-php72' => array(

View File

@@ -38,8 +38,8 @@ $embedSourceMap = false;
/**
* Parse argument
*
* @param integer $i
* @param array $options
* @param int $i
* @param string[] $options
*
* @return string|null
*/

View File

@@ -42,7 +42,7 @@
"symfony/phpunit-bridge": "^5.1",
"thoughtbot/bourbon": "^7.0",
"twbs/bootstrap": "~5.0",
"twbs/bootstrap4": "4.6.0",
"twbs/bootstrap4": "4.6.1",
"zurb/foundation": "~6.5"
},
"repositories": [
@@ -50,16 +50,16 @@
"type": "package",
"package": {
"name": "sass/sass-spec",
"version": "2021.09.15",
"version": "2021.11.30",
"source": {
"type": "git",
"url": "https://github.com/sass/sass-spec.git",
"reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955"
"reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sass/sass-spec/zipball/eb2d7a0865c1faf0b55a39ff962b24aca9b4c955",
"reference": "eb2d7a0865c1faf0b55a39ff962b24aca9b4c955",
"url": "https://api.github.com/repos/sass/sass-spec/zipball/ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
"reference": "ee5b460ac84b1ce27b86e22c0252b4296444cf3a",
"shasum": ""
}
}
@@ -86,16 +86,16 @@
"type": "package",
"package": {
"name": "twbs/bootstrap4",
"version": "v4.6.0",
"version": "v4.6.1",
"source": {
"type": "git",
"url": "https://github.com/twbs/bootstrap.git",
"reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2"
"reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/6ffb0b48e455430f8a5359ed689ad64c1143fac2",
"reference": "6ffb0b48e455430f8a5359ed689ad64c1143fac2",
"url": "https://api.github.com/repos/twbs/bootstrap/zipball/043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
"reference": "043a03c95a2ad6738f85b65e53b9dbdfb03b8d10",
"shasum": ""
}
}
@@ -103,6 +103,9 @@
],
"bin": ["bin/pscss"],
"config": {
"sort-packages": true
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true
}
}
}

View File

@@ -34,8 +34,8 @@ class Range
/**
* Initialize range
*
* @param integer|float $first
* @param integer|float $last
* @param int|float $first
* @param int|float $last
*/
public function __construct($first, $last)
{
@@ -46,9 +46,9 @@ class Range
/**
* Test for inclusion in range
*
* @param integer|float $value
* @param int|float $value
*
* @return boolean
* @return bool
*/
public function includes($value)
{

View File

@@ -22,12 +22,12 @@ namespace ScssPhp\ScssPhp;
class Block
{
/**
* @var string
* @var string|null
*/
public $type;
/**
* @var \ScssPhp\ScssPhp\Block
* @var Block|null
*/
public $parent;
@@ -37,17 +37,17 @@ class Block
public $sourceName;
/**
* @var integer
* @var int
*/
public $sourceIndex;
/**
* @var integer
* @var int
*/
public $sourceLine;
/**
* @var integer
* @var int
*/
public $sourceColumn;
@@ -67,7 +67,7 @@ class Block
public $children;
/**
* @var \ScssPhp\ScssPhp\Block|null
* @var Block|null
*/
public $selfParent;
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class AtRootBlock extends Block
{
/**
* @var array|null
*/
public $selector;
/**
* @var array|null
*/
public $with;
public function __construct()
{
$this->type = Type::T_AT_ROOT;
}
}

View File

@@ -0,0 +1,45 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Compiler\Environment;
/**
* @internal
*/
class CallableBlock extends Block
{
/**
* @var string
*/
public $name;
/**
* @var array|null
*/
public $args;
/**
* @var Environment|null
*/
public $parentEnv;
/**
* @param string $type
*/
public function __construct($type)
{
$this->type = $type;
}
}

View File

@@ -0,0 +1,38 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Compiler\Environment;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class ContentBlock extends Block
{
/**
* @var array|null
*/
public $child;
/**
* @var Environment|null
*/
public $scope;
public function __construct()
{
$this->type = Type::T_INCLUDE;
}
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class DirectiveBlock extends Block
{
/**
* @var string|array
*/
public $name;
/**
* @var string|array|null
*/
public $value;
public function __construct()
{
$this->type = Type::T_DIRECTIVE;
}
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class EachBlock extends Block
{
/**
* @var string[]
*/
public $vars = [];
/**
* @var array
*/
public $list;
public function __construct()
{
$this->type = Type::T_EACH;
}
}

View File

@@ -0,0 +1,27 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class ElseBlock extends Block
{
public function __construct()
{
$this->type = Type::T_ELSE;
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class ElseifBlock extends Block
{
/**
* @var array
*/
public $cond;
public function __construct()
{
$this->type = Type::T_ELSEIF;
}
}

View File

@@ -0,0 +1,47 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class ForBlock extends Block
{
/**
* @var string
*/
public $var;
/**
* @var array
*/
public $start;
/**
* @var array
*/
public $end;
/**
* @var bool
*/
public $until;
public function __construct()
{
$this->type = Type::T_FOR;
}
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class IfBlock extends Block
{
/**
* @var array
*/
public $cond;
/**
* @var array<ElseifBlock|ElseBlock>
*/
public $cases = [];
public function __construct()
{
$this->type = Type::T_IF;
}
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class MediaBlock extends Block
{
/**
* @var string|array|null
*/
public $value;
/**
* @var array|null
*/
public $queryList;
public function __construct()
{
$this->type = Type::T_MEDIA;
}
}

View File

@@ -0,0 +1,37 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class NestedPropertyBlock extends Block
{
/**
* @var bool
*/
public $hasValue;
/**
* @var array
*/
public $prefix;
public function __construct()
{
$this->type = Type::T_NESTED_PROPERTY;
}
}

View File

@@ -0,0 +1,32 @@
<?php
/**
* SCSSPHP
*
* @copyright 2012-2020 Leaf Corcoran
*
* @license http://opensource.org/licenses/MIT MIT
*
* @link http://scssphp.github.io/scssphp
*/
namespace ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Block;
use ScssPhp\ScssPhp\Type;
/**
* @internal
*/
class WhileBlock extends Block
{
/**
* @var array
*/
public $cond;
public function __construct()
{
$this->type = Type::T_WHILE;
}
}

View File

@@ -204,10 +204,10 @@ class Colors
/**
* Reverse conversion : from RGBA to a color name if possible
*
* @param integer $r
* @param integer $g
* @param integer $b
* @param integer|float $a
* @param int $r
* @param int $g
* @param int $b
* @param int|float $a
*
* @return string|null
*/

View File

@@ -13,6 +13,17 @@
namespace ScssPhp\ScssPhp;
use ScssPhp\ScssPhp\Base\Range;
use ScssPhp\ScssPhp\Block\AtRootBlock;
use ScssPhp\ScssPhp\Block\CallableBlock;
use ScssPhp\ScssPhp\Block\DirectiveBlock;
use ScssPhp\ScssPhp\Block\EachBlock;
use ScssPhp\ScssPhp\Block\ElseBlock;
use ScssPhp\ScssPhp\Block\ElseifBlock;
use ScssPhp\ScssPhp\Block\ForBlock;
use ScssPhp\ScssPhp\Block\IfBlock;
use ScssPhp\ScssPhp\Block\MediaBlock;
use ScssPhp\ScssPhp\Block\NestedPropertyBlock;
use ScssPhp\ScssPhp\Block\WhileBlock;
use ScssPhp\ScssPhp\Compiler\CachedResult;
use ScssPhp\ScssPhp\Compiler\Environment;
use ScssPhp\ScssPhp\Exception\CompilerException;
@@ -644,7 +655,7 @@ class Compiler
* @param array $target
* @param array $origin
*
* @return boolean
* @return bool
*/
protected function isSelfExtend($target, $origin)
{
@@ -853,10 +864,10 @@ class Compiler
/**
* Match extends
*
* @param array $selector
* @param array $out
* @param integer $from
* @param boolean $initial
* @param array $selector
* @param array $out
* @param int $from
* @param bool $initial
*
* @return void
*/
@@ -989,7 +1000,7 @@ class Compiler
* @param string $part
* @param array $matches
*
* @return boolean
* @return bool
*/
protected function isPseudoSelector($part, &$matches)
{
@@ -1051,11 +1062,11 @@ class Compiler
/**
* Match extends single
*
* @param array $rawSingle
* @param array $outOrigin
* @param boolean $initial
* @param array $rawSingle
* @param array $outOrigin
* @param bool $initial
*
* @return boolean
* @return bool
*/
protected function matchExtendsSingle($rawSingle, &$outOrigin, $initial = true)
{
@@ -1270,6 +1281,7 @@ class Compiler
*/
protected function compileMedia(Block $media)
{
assert($media instanceof MediaBlock);
$this->pushEnv($media);
$mediaQueries = $this->compileMediaQuery($this->multiplyMedia($this->env));
@@ -1347,7 +1359,7 @@ class Compiler
/**
* Compile directive
*
* @param \ScssPhp\ScssPhp\Block|array $directive
* @param DirectiveBlock|array $directive
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
*
* @return void
@@ -1413,6 +1425,7 @@ class Compiler
*/
protected function compileAtRoot(Block $block)
{
assert($block instanceof AtRootBlock);
$env = $this->pushEnv($block);
$envs = $this->compactEnv($env);
list($with, $without) = $this->compileWith(isset($block->with) ? $block->with : null);
@@ -1461,7 +1474,7 @@ class Compiler
}
/**
* Filter at-root scope depending of with/without option
* Filter at-root scope depending on with/without option
*
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope
* @param array $with
@@ -1561,7 +1574,7 @@ class Compiler
* Find a selector by the depth node in the scope
*
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $scope
* @param integer $depth
* @param int $depth
*
* @return array
*/
@@ -1585,7 +1598,7 @@ class Compiler
/**
* Compile @at-root's with: inclusion / without: exclusion into 2 lists uses to filter scope/env later
*
* @param array $withCondition
* @param array|null $withCondition
*
* @return array
*
@@ -1674,7 +1687,7 @@ class Compiler
* @param array $with
* @param array $without
*
* @return boolean
* @return bool
*/
protected function isWith($block, $with, $without)
{
@@ -1684,6 +1697,7 @@ class Compiler
}
if ($block->type === Type::T_DIRECTIVE) {
assert($block instanceof DirectiveBlock || $block instanceof OutputBlock);
if (isset($block->name)) {
return $this->testWithWithout($this->compileDirectiveName($block->name), $with, $without);
} elseif (isset($block->selectors) && preg_match(',@(\w+),ims', json_encode($block->selectors), $m)) {
@@ -1719,7 +1733,7 @@ class Compiler
* @param array $with
* @param array $without
*
* @return boolean
* @return bool
* true if the block should be kept, false to reject
*/
protected function testWithWithout($what, $with, $without)
@@ -1774,6 +1788,7 @@ class Compiler
*/
protected function compileNestedPropertiesBlock(Block $block, OutputBlock $out)
{
assert($block instanceof NestedPropertyBlock);
$prefix = $this->compileValue($block->prefix) . '-';
$nested = $this->makeOutputBlock($block->type);
@@ -1792,6 +1807,7 @@ class Compiler
break;
case Type::T_NESTED_PROPERTY:
assert($child[1] instanceof NestedPropertyBlock);
array_unshift($child[1]->prefix[2], $prefix);
break;
}
@@ -1817,7 +1833,7 @@ class Compiler
// wrap assign children in a block
// except for @font-face
if ($block->type !== Type::T_DIRECTIVE || $this->compileDirectiveName($block->name) !== 'font-face') {
if (!$block instanceof DirectiveBlock || $this->compileDirectiveName($block->name) !== 'font-face') {
// need wrapping?
$needWrapping = false;
@@ -1906,8 +1922,8 @@ class Compiler
/**
* Compile the value of a comment that can have interpolation
*
* @param array $value
* @param boolean $pushEnv
* @param array $value
* @param bool $pushEnv
*
* @return string
*/
@@ -2224,7 +2240,7 @@ class Compiler
*
* @param array $selector
*
* @return boolean
* @return bool
*/
protected function hasSelectorPlaceholder($selector)
{
@@ -2641,9 +2657,9 @@ class Compiler
*
* @param array $rawPath
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $out
* @param boolean $once
* @param bool $once
*
* @return boolean
* @return bool
*/
protected function compileImport($rawPath, OutputBlock $out, $once = false)
{
@@ -2778,7 +2794,7 @@ class Compiler
// insert the directive as a comment
$child = $this->makeOutputBlock(Type::T_COMMENT);
$child->lines[] = $line;
$child->sourceName = $this->sourceNames[$this->sourceIndex];
$child->sourceName = $this->sourceNames[$this->sourceIndex] ?: '(stdin)';
$child->sourceLine = $this->sourceLine;
$child->sourceColumn = $this->sourceColumn;
@@ -3049,6 +3065,7 @@ class Compiler
case Type::T_MIXIN:
case Type::T_FUNCTION:
list(, $block) = $child;
assert($block instanceof CallableBlock);
// the block need to be able to go up to it's parent env to resolve vars
$block->parentEnv = $this->getStoreEnv();
$this->set(static::$namespaces[$block->type] . $block->name, $block, true);
@@ -3099,6 +3116,7 @@ EOL;
case Type::T_IF:
list(, $if) = $child;
assert($if instanceof IfBlock);
if ($this->isTruthy($this->reduce($if->cond, true))) {
return $this->compileChildren($if->children, $out);
@@ -3106,8 +3124,8 @@ EOL;
foreach ($if->cases as $case) {
if (
$case->type === Type::T_ELSE ||
$case->type === Type::T_ELSEIF && $this->isTruthy($this->reduce($case->cond))
$case instanceof ElseBlock ||
$case instanceof ElseifBlock && $this->isTruthy($this->reduce($case->cond))
) {
return $this->compileChildren($case->children, $out);
}
@@ -3116,6 +3134,7 @@ EOL;
case Type::T_EACH:
list(, $each) = $child;
assert($each instanceof EachBlock);
$list = $this->coerceList($this->reduce($each->list), ',', true);
@@ -3150,6 +3169,7 @@ EOL;
case Type::T_WHILE:
list(, $while) = $child;
assert($while instanceof WhileBlock);
while ($this->isTruthy($this->reduce($while->cond, true))) {
$ret = $this->compileChildren($while->children, $out);
@@ -3162,6 +3182,7 @@ EOL;
case Type::T_FOR:
list(, $for) = $child;
assert($for instanceof ForBlock);
$startNumber = $this->assertNumber($this->reduce($for->start, true));
$endNumber = $this->assertNumber($this->reduce($for->end, true));
@@ -3222,6 +3243,8 @@ EOL;
throw $this->error("Undefined mixin $name");
}
assert($mixin instanceof CallableBlock);
$callingScope = $this->getStoreEnv();
// push scope, apply args
@@ -3394,7 +3417,7 @@ EOL;
*
* @param array|Number $value
*
* @return boolean
* @return bool
*/
public function isTruthy($value)
{
@@ -3406,7 +3429,7 @@ EOL;
*
* @param string $value
*
* @return boolean
* @return bool
*/
protected function isImmediateRelationshipCombinator($value)
{
@@ -3418,7 +3441,7 @@ EOL;
*
* @param array $value
*
* @return boolean
* @return bool
*/
protected function shouldEval($value)
{
@@ -3441,7 +3464,7 @@ EOL;
* Reduce value
*
* @param array|Number $value
* @param boolean $inExp
* @param bool $inExp
*
* @return array|Number
*/
@@ -3946,6 +3969,10 @@ EOL;
unset($value['enclosing']);
}
if ($value[1] === '' && count($value[2]) > 1) {
$value[1] = ' ';
}
return $value;
case Type::T_STRING:
@@ -4061,8 +4088,8 @@ EOL;
* Boolean and
*
* @param array|Number $left
* @param array|Number $right
* @param boolean $shouldEval
* @param array|Number $right
* @param bool $shouldEval
*
* @return array|Number|null
*/
@@ -4090,7 +4117,7 @@ EOL;
*
* @param array|Number $left
* @param array|Number $right
* @param boolean $shouldEval
* @param bool $shouldEval
*
* @return array|Number|null
*/
@@ -4516,8 +4543,7 @@ EOL;
// force double quote as string quote for the output in certain cases
if (
$value[1] === "'" &&
(strpos($content, '"') === false or strpos($content, "'") !== false) &&
strpbrk($content, '{}\\\'') !== false
(strpos($content, '"') === false or strpos($content, "'") !== false)
) {
$value[1] = '"';
} elseif (
@@ -4570,6 +4596,8 @@ EOL;
}
}
$separator = $delim === '/' ? ' /' : $delim;
$prefix_value = '';
if ($delim !== ' ') {
@@ -4608,7 +4636,7 @@ EOL;
$filtered[] = $compiled;
}
return $pre . substr(implode("$delim", $filtered), \strlen($prefix_value)) . $post;
return $pre . substr(implode($separator, $filtered), \strlen($prefix_value)) . $post;
case Type::T_MAP:
$keys = $value[1];
@@ -4880,10 +4908,10 @@ EOL;
/**
* Join selectors; looks for & to replace, or append parent before child
*
* @param array $parent
* @param array $child
* @param boolean $stillHasSelf
* @param array $selfParentSelectors
* @param array $parent
* @param array $child
* @param bool $stillHasSelf
* @param array $selfParentSelectors
* @return array
*/
@@ -4961,6 +4989,8 @@ EOL;
return $this->multiplyMedia($env->parent, $childQueries);
}
assert($env->block instanceof MediaBlock);
$parentQueries = isset($env->block->queryList)
? $env->block->queryList
: [[[Type::T_MEDIA_VALUE, $env->block->value]]];
@@ -5095,7 +5125,7 @@ EOL;
*
* @param string $name
* @param mixed $value
* @param boolean $shadow
* @param bool $shadow
* @param \ScssPhp\ScssPhp\Compiler\Environment $env
* @param mixed $valueUnreduced
*
@@ -5201,9 +5231,9 @@ EOL;
* @internal
*
* @param string $name
* @param boolean $shouldThrow
* @param bool $shouldThrow
* @param \ScssPhp\ScssPhp\Compiler\Environment $env
* @param boolean $unreduced
* @param bool $unreduced
*
* @return mixed|null
*/
@@ -5270,7 +5300,7 @@ EOL;
* @param string $name
* @param \ScssPhp\ScssPhp\Compiler\Environment $env
*
* @return boolean
* @return bool
*/
protected function has($name, Environment $env = null)
{
@@ -5460,7 +5490,7 @@ EOL;
*
* @api
*
* @param integer $numberPrecision
* @param int $numberPrecision
*
* @return void
*
@@ -5561,7 +5591,7 @@ EOL;
*
* @api
*
* @param integer $sourceMap
* @param int $sourceMap
*
* @return void
*
@@ -5963,7 +5993,7 @@ EOL;
*
* @api
*
* @param boolean $ignoreErrors
* @param bool $ignoreErrors
*
* @return \ScssPhp\ScssPhp\Compiler
*
@@ -6102,7 +6132,7 @@ EOL;
/**
* Beautify call stack for output
*
* @param boolean $all
* @param bool $all
* @param int|null $limit
*
* @return string
@@ -6162,8 +6192,8 @@ EOL;
/**
* Call SCSS @function
*
* @param Object $func
* @param array $argValues
* @param CallableBlock|null $func
* @param array $argValues
*
* @return array|Number
*/
@@ -6737,9 +6767,8 @@ EOL;
*
* @param array[] $argDef
* @param array|null $argValues
* @param boolean $storeInEnv
* @param boolean $reduce
* only used if $storeInEnv = false
* @param bool $storeInEnv
* @param bool $reduce only used if $storeInEnv = false
*
* @return array<string, array|Number>
*
@@ -6983,14 +7012,14 @@ EOL;
*
* @param array|Number $item
* @param string $delim
* @param boolean $removeTrailingNull
* @param bool $removeTrailingNull
*
* @return array
*/
protected function coerceList($item, $delim = ',', $removeTrailingNull = false)
{
if ($item instanceof Number) {
return [Type::T_LIST, $delim, [$item]];
return [Type::T_LIST, '', [$item]];
}
if ($item[0] === Type::T_LIST) {
@@ -7013,15 +7042,15 @@ EOL;
$list[] = [
Type::T_LIST,
'',
' ',
[$key, $value]
];
}
return [Type::T_LIST, ',', $list];
return [Type::T_LIST, $list ? ',' : '', $list];
}
return [Type::T_LIST, $delim, [$item]];
return [Type::T_LIST, '', [$item]];
}
/**
@@ -7162,10 +7191,10 @@ EOL;
}
/**
* @param integer|Number $value
* @param boolean $isAlpha
* @param int|Number $value
* @param bool $isAlpha
*
* @return integer|mixed
* @return int|mixed
*/
protected function compileRGBAValue($value, $isAlpha = false)
{
@@ -7177,12 +7206,12 @@ EOL;
}
/**
* @param mixed $value
* @param integer|float $min
* @param integer|float $max
* @param boolean $isInt
* @param mixed $value
* @param int|float $min
* @param int|float $max
* @param bool $isInt
*
* @return integer|mixed
* @return int|mixed
*/
protected function compileColorPartValue($value, $min, $max, $isInt = true)
{
@@ -7276,7 +7305,7 @@ EOL;
*
* @param array|Number $value
*
* @return integer|float
* @return int|float
*
* @deprecated
*/
@@ -7414,7 +7443,7 @@ EOL;
* @param array|Number $value
* @param string|null $varName
*
* @return integer
* @return int
*
* @throws SassScriptException
*/
@@ -7478,9 +7507,9 @@ EOL;
*
* @internal
*
* @param integer $red
* @param integer $green
* @param integer $blue
* @param int $red
* @param int $green
* @param int $blue
*
* @return array
*/
@@ -7584,9 +7613,9 @@ EOL;
*
* @api
*
* @param integer $hue H from 0 to 360
* @param integer $whiteness W from 0 to 100
* @param integer $blackness B from 0 to 100
* @param int $hue H from 0 to 360
* @param int $whiteness W from 0 to 100
* @param int $blackness B from 0 to 100
*
* @return array
*/
@@ -7616,9 +7645,9 @@ EOL;
*
* @api
*
* @param integer $red
* @param integer $green
* @param integer $blue
* @param int $red
* @param int $green
* @param int $blue
*
* @return array
*/
@@ -7746,7 +7775,6 @@ EOL;
$values = [];
foreach ($list[2] as $item) {
$values[] = $this->normalizeValue($item);
}
@@ -8375,6 +8403,13 @@ EOL;
}
*/
/**
* @param array $color
* @param int $idx
* @param int|float $amount
*
* @return array
*/
protected function adjustHsl($color, $idx, $amount)
{
$hsl = $this->toHSL($color[1], $color[2], $color[3]);
@@ -8664,7 +8699,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
$list = $this->coerceList($args[0]);
if (\count($list[2]) <= 1 && empty($list['enclosing'])) {
if ($list[1] === '' && \count($list[2]) <= 1 && empty($list['enclosing'])) {
return [Type::T_KEYWORD, 'space'];
}
@@ -8672,6 +8707,10 @@ will be an error in future versions of Sass.\n on line $line of $fname";
return [Type::T_KEYWORD, 'comma'];
}
if ($list[1] === '/') {
return [Type::T_KEYWORD, 'slash'];
}
return [Type::T_KEYWORD, 'space'];
}
@@ -9038,9 +9077,13 @@ will be an error in future versions of Sass.\n on line $line of $fname";
*
* @return string
* @throws CompilerException
*
* @deprecated
*/
protected function listSeparatorForJoin($list1, $sep)
{
@trigger_error(sprintf('The "%s" method is deprecated.', __METHOD__), E_USER_DEPRECATED);
if (! isset($sep)) {
return $list1[1];
}
@@ -9057,14 +9100,40 @@ will be an error in future versions of Sass.\n on line $line of $fname";
}
}
protected static $libJoin = ['list1', 'list2', 'separator:null', 'bracketed:auto'];
protected static $libJoin = ['list1', 'list2', 'separator:auto', 'bracketed:auto'];
protected function libJoin($args)
{
list($list1, $list2, $sep, $bracketed) = $args;
$list1 = $this->coerceList($list1, ' ', true);
$list2 = $this->coerceList($list2, ' ', true);
$sep = $this->listSeparatorForJoin($list1, $sep);
switch ($this->compileStringContent($this->assertString($sep, 'separator'))) {
case 'comma':
$separator = ',';
break;
case 'space':
$separator = ' ';
break;
case 'slash':
$separator = '/';
break;
case 'auto':
if ($list1[1] !== '' || count($list1[2]) > 1 || !empty($list1['enclosing']) && $list1['enclosing'] !== 'parent') {
$separator = $list1[1] ?: ' ';
} elseif ($list2[1] !== '' || count($list2[2]) > 1 || !empty($list2['enclosing']) && $list2['enclosing'] !== 'parent') {
$separator = $list2[1] ?: ' ';
} else {
$separator = ' ';
}
break;
default:
throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator');
}
if ($bracketed === static::$true) {
$bracketed = true;
@@ -9091,11 +9160,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
}
}
$res = [Type::T_LIST, $sep, array_merge($list1[2], $list2[2])];
if (isset($list1['enclosing'])) {
$res['enlcosing'] = $list1['enclosing'];
}
$res = [Type::T_LIST, $separator, array_merge($list1[2], $list2[2])];
if ($bracketed) {
$res['enclosing'] = 'bracket';
@@ -9104,14 +9169,35 @@ will be an error in future versions of Sass.\n on line $line of $fname";
return $res;
}
protected static $libAppend = ['list', 'val', 'separator:null'];
protected static $libAppend = ['list', 'val', 'separator:auto'];
protected function libAppend($args)
{
list($list1, $value, $sep) = $args;
$list1 = $this->coerceList($list1, ' ', true);
$sep = $this->listSeparatorForJoin($list1, $sep);
$res = [Type::T_LIST, $sep, array_merge($list1[2], [$value])];
switch ($this->compileStringContent($this->assertString($sep, 'separator'))) {
case 'comma':
$separator = ',';
break;
case 'space':
$separator = ' ';
break;
case 'slash':
$separator = '/';
break;
case 'auto':
$separator = $list1[1] === '' && \count($list1[2]) <= 1 && (empty($list1['enclosing']) || $list1['enclosing'] === 'parent') ? ' ' : $list1[1];
break;
default:
throw SassScriptException::forArgument('Must be "space", "comma", "slash", or "auto".', 'separator');
}
$res = [Type::T_LIST, $separator, array_merge($list1[2], [$value])];
if (isset($list1['enclosing'])) {
$res['enclosing'] = $list1['enclosing'];
@@ -9134,7 +9220,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
$result = [Type::T_LIST, ',', $lists];
if (! \is_null($firstList)) {
foreach ($firstList[2] as $key => $item) {
$list = [Type::T_LIST, '', [$item]];
$list = [Type::T_LIST, ' ', [$item]];
foreach ($argLists as $arg) {
if (isset($arg[2][$key])) {
@@ -9514,6 +9600,8 @@ will be an error in future versions of Sass.\n on line $line of $fname";
) {
$value['enclosing'] = 'forced_' . $value['enclosing'];
$force_enclosing_display = true;
} elseif (! \count($value[2])) {
$value['enclosing'] = 'forced_parent';
}
foreach ($value[2] as $k => $listelement) {
@@ -9637,7 +9725,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
* @param array $super
* @param array $sub
*
* @return boolean
* @return bool
*/
protected function isSuperSelector($super, $sub)
{
@@ -9718,7 +9806,7 @@ will be an error in future versions of Sass.\n on line $line of $fname";
* @param array $superParts
* @param array $subParts
*
* @return boolean
* @return bool
*/
protected function isSuperPart($superParts, $subParts)
{
@@ -9785,21 +9873,18 @@ will be an error in future versions of Sass.\n on line $line of $fname";
// do the trick, happening $lastSelector to $previousSelector
$appended = [];
foreach ($lastSelectors as $lastSelector) {
$previous = $previousSelectors;
foreach ($lastSelector as $lastSelectorParts) {
foreach ($lastSelectorParts as $lastSelectorPart) {
foreach ($previous as $i => $previousSelector) {
foreach ($previousSelector as $j => $previousSelectorParts) {
$previous[$i][$j][] = $lastSelectorPart;
foreach ($previousSelectors as $previousSelector) {
foreach ($lastSelectors as $lastSelector) {
$previous = $previousSelector;
foreach ($previousSelector as $j => $previousSelectorParts) {
foreach ($lastSelector as $lastSelectorParts) {
foreach ($lastSelectorParts as $lastSelectorPart) {
$previous[$j][] = $lastSelectorPart;
}
}
}
}
foreach ($previous as $ps) {
$appended[] = $ps;
$appended[] = $previous;
}
}
@@ -9855,10 +9940,10 @@ will be an error in future versions of Sass.\n on line $line of $fname";
* Extend/replace in selectors
* used by selector-extend and selector-replace that use the same logic
*
* @param array $selectors
* @param array $extendee
* @param array $extender
* @param boolean $replace
* @param array $selectors
* @param array $extendee
* @param array $extender
* @param bool $replace
*
* @return array
*/

View File

@@ -31,6 +31,26 @@ class Environment
*/
public $parent;
/**
* @var Environment|null
*/
public $declarationScopeParent;
/**
* @var Environment|null
*/
public $parentStore;
/**
* @var array|null
*/
public $selectors;
/**
* @var string|null
*/
public $marker;
/**
* @var array
*/
@@ -42,7 +62,7 @@ class Environment
public $storeUnreduced;
/**
* @var integer
* @var int
*/
public $depth;
}

View File

@@ -25,7 +25,7 @@ use ScssPhp\ScssPhp\SourceMap\SourceMapGenerator;
abstract class Formatter
{
/**
* @var integer
* @var int
*/
public $indentLevel;
@@ -60,7 +60,7 @@ abstract class Formatter
public $assignSeparator;
/**
* @var boolean
* @var bool
*/
public $keepSemicolons;
@@ -70,12 +70,12 @@ abstract class Formatter
protected $currentBlock;
/**
* @var integer
* @var int
*/
protected $currentLine;
/**
* @var integer
* @var int
*/
protected $currentColumn;
@@ -239,7 +239,7 @@ abstract class Formatter
*
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block
*
* @return boolean
* @return bool
*/
protected function testEmptyChildren($block)
{

View File

@@ -50,8 +50,6 @@ class Compressed extends Formatter
foreach ($block->lines as $index => $line) {
if (substr($line, 0, 2) === '/*' && substr($line, 2, 1) !== '!') {
unset($block->lines[$index]);
} elseif (substr($line, 0, 3) === '/*!') {
$block->lines[$index] = '/*' . substr($line, 3);
}
}

View File

@@ -27,7 +27,7 @@ use ScssPhp\ScssPhp\Type;
class Nested extends Formatter
{
/**
* @var integer
* @var int
*/
private $depth;
@@ -221,7 +221,7 @@ class Nested extends Formatter
*
* @param \ScssPhp\ScssPhp\Formatter\OutputBlock $block
*
* @return boolean
* @return bool
*/
private function hasFlatChild($block)
{

View File

@@ -27,7 +27,7 @@ class OutputBlock
public $type;
/**
* @var integer
* @var int
*/
public $depth;
@@ -57,12 +57,12 @@ class OutputBlock
public $sourceName;
/**
* @var integer|null
* @var int|null
*/
public $sourceLine;
/**
* @var integer|null
* @var int|null
*/
public $sourceColumn;
}

View File

@@ -27,7 +27,7 @@ abstract class Node
public $type;
/**
* @var integer
* @var int
*/
public $sourceIndex;

View File

@@ -38,7 +38,7 @@ class Number extends Node implements \ArrayAccess
const PRECISION = 10;
/**
* @var integer
* @var int
* @deprecated use {Number::PRECISION} instead to read the precision. Configuring it is not supported anymore.
*/
public static $precision = self::PRECISION;
@@ -81,7 +81,7 @@ class Number extends Node implements \ArrayAccess
];
/**
* @var integer|float
* @var int|float
*/
private $dimension;
@@ -100,7 +100,7 @@ class Number extends Node implements \ArrayAccess
/**
* Initialize number
*
* @param integer|float $dimension
* @param int|float $dimension
* @param string[]|string $numeratorUnits
* @param string[] $denominatorUnits
*
@@ -147,7 +147,7 @@ class Number extends Node implements \ArrayAccess
}
/**
* {@inheritdoc}
* @return bool
*/
#[\ReturnTypeWillChange]
public function offsetExists($offset)
@@ -173,7 +173,7 @@ class Number extends Node implements \ArrayAccess
}
/**
* {@inheritdoc}
* @return mixed
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
@@ -200,7 +200,7 @@ class Number extends Node implements \ArrayAccess
}
/**
* {@inheritdoc}
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetSet($offset, $value)
@@ -209,7 +209,7 @@ class Number extends Node implements \ArrayAccess
}
/**
* {@inheritdoc}
* @return void
*/
#[\ReturnTypeWillChange]
public function offsetUnset($offset)
@@ -220,7 +220,7 @@ class Number extends Node implements \ArrayAccess
/**
* Returns true if the number is unitless
*
* @return boolean
* @return bool
*/
public function unitless()
{

View File

@@ -12,6 +12,18 @@
namespace ScssPhp\ScssPhp;
use ScssPhp\ScssPhp\Block\AtRootBlock;
use ScssPhp\ScssPhp\Block\CallableBlock;
use ScssPhp\ScssPhp\Block\ContentBlock;
use ScssPhp\ScssPhp\Block\DirectiveBlock;
use ScssPhp\ScssPhp\Block\EachBlock;
use ScssPhp\ScssPhp\Block\ElseBlock;
use ScssPhp\ScssPhp\Block\ElseifBlock;
use ScssPhp\ScssPhp\Block\ForBlock;
use ScssPhp\ScssPhp\Block\IfBlock;
use ScssPhp\ScssPhp\Block\MediaBlock;
use ScssPhp\ScssPhp\Block\NestedPropertyBlock;
use ScssPhp\ScssPhp\Block\WhileBlock;
use ScssPhp\ScssPhp\Exception\ParserException;
use ScssPhp\ScssPhp\Logger\LoggerInterface;
use ScssPhp\ScssPhp\Logger\QuietLogger;
@@ -125,7 +137,7 @@ class Parser
* @api
*
* @param string|null $sourceName
* @param integer $sourceIndex
* @param int $sourceIndex
* @param string|null $encoding
* @param Cache|null $cache
* @param bool $cssOnly
@@ -305,7 +317,7 @@ class Parser
* @param string $buffer
* @param string|array $out
*
* @return boolean
* @return bool
*/
public function parseValue($buffer, &$out)
{
@@ -334,7 +346,7 @@ class Parser
* @param string|array $out
* @param bool $shouldValidate
*
* @return boolean
* @return bool
*/
public function parseSelector($buffer, &$out, $shouldValidate = true)
{
@@ -371,7 +383,7 @@ class Parser
* @param string $buffer
* @param string|array $out
*
* @return boolean
* @return bool
*/
public function parseMediaQueryList($buffer, &$out)
{
@@ -428,7 +440,7 @@ class Parser
* position into $s. Then if a chain fails, use $this->seek($s) to
* go back where we started.
*
* @return boolean
* @return bool
*/
protected function parseChunk()
{
@@ -447,7 +459,8 @@ class Parser
) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$atRoot = $this->pushSpecialBlock(Type::T_AT_ROOT, $s);
$atRoot = new AtRootBlock();
$this->registerPushedBlock($atRoot, $s);
$atRoot->selector = $selector;
$atRoot->with = $with;
@@ -461,7 +474,8 @@ class Parser
$this->mediaQueryList($mediaQueryList) &&
$this->matchChar('{', false)
) {
$media = $this->pushSpecialBlock(Type::T_MEDIA, $s);
$media = new MediaBlock();
$this->registerPushedBlock($media, $s);
$media->queryList = $mediaQueryList[2];
return true;
@@ -477,7 +491,8 @@ class Parser
) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$mixin = $this->pushSpecialBlock(Type::T_MIXIN, $s);
$mixin = new CallableBlock(Type::T_MIXIN);
$this->registerPushedBlock($mixin, $s);
$mixin->name = $mixinName;
$mixin->args = $args;
@@ -509,7 +524,8 @@ class Parser
];
if (! empty($hasBlock)) {
$include = $this->pushSpecialBlock(Type::T_INCLUDE, $s);
$include = new ContentBlock();
$this->registerPushedBlock($include, $s);
$include->child = $child;
} else {
$this->append($child, $s);
@@ -599,7 +615,8 @@ class Parser
) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$func = $this->pushSpecialBlock(Type::T_FUNCTION, $s);
$func = new CallableBlock(Type::T_FUNCTION);
$this->registerPushedBlock($func, $s);
$func->name = $fnName;
$func->args = $args;
@@ -631,7 +648,8 @@ class Parser
) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$each = $this->pushSpecialBlock(Type::T_EACH, $s);
$each = new EachBlock();
$this->registerPushedBlock($each, $s);
foreach ($varNames[2] as $varName) {
$each->vars[] = $varName[1];
@@ -660,7 +678,8 @@ class Parser
$cond = reset($cond[2]);
}
$while = $this->pushSpecialBlock(Type::T_WHILE, $s);
$while = new WhileBlock();
$this->registerPushedBlock($while, $s);
$while->cond = $cond;
return true;
@@ -680,7 +699,8 @@ class Parser
) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$for = $this->pushSpecialBlock(Type::T_FOR, $s);
$for = new ForBlock();
$this->registerPushedBlock($for, $s);
$for->var = $varName[1];
$for->start = $start;
$for->end = $end;
@@ -697,7 +717,8 @@ class Parser
) {
! $this->cssOnly || $this->assertPlainCssValid(false, $s);
$if = $this->pushSpecialBlock(Type::T_IF, $s);
$if = new IfBlock();
$this->registerPushedBlock($if, $s);
while (
$cond[0] === Type::T_LIST &&
@@ -776,20 +797,21 @@ class Parser
if (isset($last) && $last[0] === Type::T_IF) {
list(, $if) = $last;
assert($if instanceof IfBlock);
if ($this->literal('@else', 5)) {
if ($this->matchChar('{', false)) {
$else = $this->pushSpecialBlock(Type::T_ELSE, $s);
$else = new ElseBlock();
} elseif (
$this->literal('if', 2) &&
$this->functionCallArgumentsList($cond, false, '{', false)
) {
$else = $this->pushSpecialBlock(Type::T_ELSEIF, $s);
$else = new ElseifBlock();
$else->cond = $cond;
}
if (isset($else)) {
$else->dontAppend = true;
$this->registerPushedBlock($else, $s);
$if->cases[] = $else;
return true;
@@ -827,7 +849,8 @@ class Parser
($t1 = $this->supportsQuery($supportQuery)) &&
($t2 = $this->matchChar('{', false))
) {
$directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s);
$directive = new DirectiveBlock();
$this->registerPushedBlock($directive, $s);
$directive->name = 'supports';
$directive->value = $supportQuery;
@@ -848,11 +871,12 @@ class Parser
$dirName = [Type::T_STRING, '', $dirName];
}
if ($dirName === 'media') {
$directive = $this->pushSpecialBlock(Type::T_MEDIA, $s);
$directive = new MediaBlock();
} else {
$directive = $this->pushSpecialBlock(Type::T_DIRECTIVE, $s);
$directive = new DirectiveBlock();
$directive->name = $dirName;
}
$this->registerPushedBlock($directive, $s);
if (isset($dirValue)) {
! $this->cssOnly || ($dirValue = $this->assertPlainCssValid($dirValue));
@@ -1028,7 +1052,8 @@ class Parser
if ($this->matchChar('{', false)) {
! $this->cssOnly || $this->assertPlainCssValid(false);
$propBlock = $this->pushSpecialBlock(Type::T_NESTED_PROPERTY, $s);
$propBlock = new NestedPropertyBlock();
$this->registerPushedBlock($propBlock, $s);
$propBlock->prefix = $name;
$propBlock->hasValue = $foundSomething;
@@ -1054,12 +1079,13 @@ class Parser
}
}
if (isset($block->type) && $block->type === Type::T_INCLUDE) {
if ($block instanceof ContentBlock) {
$include = $block->child;
assert(\is_array($include));
unset($block->child);
$include[3] = $block;
$this->append($include, $s);
} elseif (empty($block->dontAppend)) {
} elseif (!$block instanceof ElseBlock && !$block instanceof ElseifBlock) {
$type = isset($block->type) ? $block->type : Type::T_BLOCK;
$this->append([$type, $block], $s);
}
@@ -1088,20 +1114,34 @@ class Parser
* Push block onto parse tree
*
* @param array|null $selectors
* @param integer $pos
* @param int $pos
*
* @return Block
*/
protected function pushBlock($selectors, $pos = 0)
{
$b = new Block();
$b->selectors = $selectors;
$this->registerPushedBlock($b, $pos);
return $b;
}
/**
* @param Block $b
* @param int $pos
*
* @return void
*/
private function registerPushedBlock(Block $b, $pos)
{
list($line, $column) = $this->getSourcePosition($pos);
$b = new Block();
$b->sourceName = $this->sourceName;
$b->sourceLine = $line;
$b->sourceColumn = $column;
$b->sourceIndex = $this->sourceIndex;
$b->selectors = $selectors;
$b->comments = [];
$b->parent = $this->env;
@@ -1126,15 +1166,15 @@ class Parser
$this->append(null);
}
}
return $b;
}
/**
* Push special (named) block onto parse tree
*
* @deprecated
*
* @param string $type
* @param integer $pos
* @param int $pos
*
* @return Block
*/
@@ -1183,11 +1223,11 @@ class Parser
/**
* Peek input stream
*
* @param string $regex
* @param array $out
* @param integer $from
* @param string $regex
* @param array $out
* @param int $from
*
* @return integer
* @return int
*/
protected function peek($regex, &$out, $from = null)
{
@@ -1204,7 +1244,7 @@ class Parser
/**
* Seek to position in input stream (or return current position in input stream)
*
* @param integer $where
* @param int $where
*/
protected function seek($where)
{
@@ -1215,7 +1255,8 @@ class Parser
* Assert a parsed part is plain CSS Valid
*
* @param array|false $parsed
* @param int $startPos
* @param int $startPos
*
* @throws ParserException
*/
protected function assertPlainCssValid($parsed, $startPos = null)
@@ -1243,7 +1284,10 @@ class Parser
/**
* Check a parsed element is plain CSS Valid
*
* @param array $parsed
* @param bool $allowExpression
*
* @return bool|array
*/
protected function isPlainCssValidElement($parsed, $allowExpression = false)
@@ -1423,7 +1467,7 @@ class Parser
* @param array $m Matches (passed by reference)
* @param string $delim Delimiter
*
* @return boolean True if match; false otherwise
* @return bool True if match; false otherwise
*/
protected function matchString(&$m, $delim)
{
@@ -1459,11 +1503,11 @@ class Parser
/**
* Try to match something on head of buffer
*
* @param string $regex
* @param array $out
* @param boolean $eatWhitespace
* @param string $regex
* @param array $out
* @param bool $eatWhitespace
*
* @return boolean
* @return bool
*/
protected function match($regex, &$out, $eatWhitespace = null)
{
@@ -1489,10 +1533,10 @@ class Parser
/**
* Match a single string
*
* @param string $char
* @param boolean $eatWhitespace
* @param string $char
* @param bool $eatWhitespace
*
* @return boolean
* @return bool
*/
protected function matchChar($char, $eatWhitespace = null)
{
@@ -1516,11 +1560,11 @@ class Parser
/**
* Match literal string
*
* @param string $what
* @param integer $len
* @param boolean $eatWhitespace
* @param string $what
* @param int $len
* @param bool $eatWhitespace
*
* @return boolean
* @return bool
*/
protected function literal($what, $len, $eatWhitespace = null)
{
@@ -1544,7 +1588,7 @@ class Parser
/**
* Match some whitespace
*
* @return boolean
* @return bool
*/
protected function whitespace()
{
@@ -1643,7 +1687,7 @@ class Parser
* Append statement to current block
*
* @param array|null $statement
* @param integer $pos
* @param int $pos
*/
protected function append($statement, $pos = null)
{
@@ -1688,7 +1732,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function mediaQueryList(&$out)
{
@@ -1700,7 +1744,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function mediaQuery(&$out)
{
@@ -1754,7 +1798,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function supportsQuery(&$out)
{
@@ -1887,7 +1931,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function mediaExpression(&$out)
{
@@ -1920,7 +1964,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function argValues(&$out)
{
@@ -1945,7 +1989,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function argValue(&$out)
{
@@ -2025,10 +2069,10 @@ class Parser
/**
* Parse directive value list that considers $vars as keyword
*
* @param array $out
* @param boolean|string $endChar
* @param array $out
* @param bool|string $endChar
*
* @return boolean
* @return bool
*/
protected function directiveValue(&$out, $endChar = false)
{
@@ -2089,7 +2133,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function valueList(&$out)
{
@@ -2105,10 +2149,11 @@ class Parser
* Parse a function call, where externals () are part of the call
* and not of the value list
*
* @param $out
* @param bool $mandatoryEnclos
* @param array $out
* @param bool $mandatoryEnclos
* @param null|string $charAfter
* @param null|bool $eatWhiteSp
* @param null|bool $eatWhiteSp
*
* @return bool
*/
protected function functionCallArgumentsList(&$out, $mandatoryEnclos = true, $charAfter = null, $eatWhiteSp = null)
@@ -2145,7 +2190,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function spaceList(&$out)
{
@@ -2155,12 +2200,12 @@ class Parser
/**
* Parse generic list
*
* @param array $out
* @param string $parseItem The name of the method used to parse items
* @param string $delim
* @param boolean $flatten
* @param array $out
* @param string $parseItem The name of the method used to parse items
* @param string $delim
* @param bool $flatten
*
* @return boolean
* @return bool
*/
protected function genericList(&$out, $parseItem, $delim = '', $flatten = true)
{
@@ -2256,11 +2301,11 @@ class Parser
/**
* Parse expression
*
* @param array $out
* @param boolean $listOnly
* @param boolean $lookForExp
* @param array $out
* @param bool $listOnly
* @param bool $lookForExp
*
* @return boolean
* @return bool
*/
protected function expression(&$out, $listOnly = false, $lookForExp = true)
{
@@ -2322,11 +2367,11 @@ class Parser
* Parse expression specifically checking for lists in parenthesis or brackets
*
* @param array $out
* @param integer $s
* @param int $s
* @param string $closingParen
* @param array $allowedTypes
*
* @return boolean
* @return bool
*/
protected function enclosedExpression(&$out, $s, $closingParen = ')', $allowedTypes = [Type::T_LIST, Type::T_MAP])
{
@@ -2381,8 +2426,8 @@ class Parser
/**
* Parse left-hand side of subexpression
*
* @param array $lhs
* @param integer $minP
* @param array $lhs
* @param int $minP
*
* @return array
*/
@@ -2437,7 +2482,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function value(&$out)
{
@@ -2645,7 +2690,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function parenValue(&$out)
{
@@ -2684,7 +2729,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function progid(&$out)
{
@@ -2717,7 +2762,7 @@ class Parser
* @param string $name
* @param array $func
*
* @return boolean
* @return bool
*/
protected function func($name, &$func)
{
@@ -2771,7 +2816,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function argumentList(&$out)
{
@@ -2816,7 +2861,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function argumentDef(&$out)
{
@@ -2878,7 +2923,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function map(&$out)
{
@@ -2920,7 +2965,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function color(&$out)
{
@@ -2946,7 +2991,7 @@ class Parser
*
* @param array $unit
*
* @return boolean
* @return bool
*/
protected function unit(&$unit)
{
@@ -2971,8 +3016,9 @@ class Parser
* Parse string
*
* @param array $out
* @param bool $keepDelimWithInterpolation
*
* @return boolean
* @return bool
*/
protected function string(&$out, $keepDelimWithInterpolation = false)
{
@@ -3053,7 +3099,8 @@ class Parser
/**
* @param string $out
* @param bool $inKeywords
* @param bool $inKeywords
*
* @return bool
*/
protected function matchEscapeCharacter(&$out, $inKeywords = false)
@@ -3103,10 +3150,10 @@ class Parser
/**
* Parse keyword or interpolation
*
* @param array $out
* @param boolean $restricted
* @param array $out
* @param bool $restricted
*
* @return boolean
* @return bool
*/
protected function mixedKeyword(&$out, $restricted = false)
{
@@ -3147,14 +3194,14 @@ class Parser
/**
* Parse an unbounded string stopped by $end
*
* @param string $end
* @param array $out
* @param string $nestOpen
* @param string $nestClose
* @param boolean $rtrim
* @param string $end
* @param array $out
* @param string $nestOpen
* @param string $nestClose
* @param bool $rtrim
* @param string $disallow
*
* @return boolean
* @return bool
*/
protected function openString($end, &$out, $nestOpen = null, $nestClose = null, $rtrim = true, $disallow = null)
{
@@ -3230,9 +3277,9 @@ class Parser
* Parser interpolation
*
* @param string|array $out
* @param boolean $lookWhite save information about whitespace before and after
* @param bool $lookWhite save information about whitespace before and after
*
* @return boolean
* @return bool
*/
protected function interpolation(&$out, $lookWhite = true)
{
@@ -3287,7 +3334,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function propertyName(&$out)
{
@@ -3342,7 +3389,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function customProperty(&$out)
{
@@ -3400,9 +3447,9 @@ class Parser
* Parse comma separated selector list
*
* @param array $out
* @param string|boolean $subSelector
* @param string|bool $subSelector
*
* @return boolean
* @return bool
*/
protected function selectors(&$out, $subSelector = false)
{
@@ -3436,9 +3483,9 @@ class Parser
* Parse whitespace separated selector list
*
* @param array $out
* @param string|boolean $subSelector
* @param string|bool $subSelector
*
* @return boolean
* @return bool
*/
protected function selector(&$out, $subSelector = false)
{
@@ -3494,7 +3541,8 @@ class Parser
* - but this require a better formal selector representation instead of the array we have now
*
* @param string $out
* @param bool $keepEscapedNumber
* @param bool $keepEscapedNumber
*
* @return bool
*/
protected function matchEscapeCharacterInSelector(&$out, $keepEscapedNumber = false)
@@ -3539,9 +3587,9 @@ class Parser
* }}
*
* @param array $out
* @param string|boolean $subSelector
* @param string|bool $subSelector
*
* @return boolean
* @return bool
*/
protected function selectorSingle(&$out, $subSelector = false)
{
@@ -3765,7 +3813,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function variable(&$out)
{
@@ -3792,11 +3840,11 @@ class Parser
/**
* Parse a keyword
*
* @param string $word
* @param boolean $eatWhitespace
* @param boolean $inSelector
* @param string $word
* @param bool $eatWhitespace
* @param bool $inSelector
*
* @return boolean
* @return bool
*/
protected function keyword(&$word, $eatWhitespace = null, $inSelector = false)
{
@@ -3859,11 +3907,11 @@ class Parser
/**
* Parse a keyword that should not start with a number
*
* @param string $word
* @param boolean $eatWhitespace
* @param boolean $inSelector
* @param string $word
* @param bool $eatWhitespace
* @param bool $inSelector
*
* @return boolean
* @return bool
*/
protected function restrictedKeyword(&$word, $eatWhitespace = null, $inSelector = false)
{
@@ -3883,7 +3931,7 @@ class Parser
*
* @param string|array $placeholder
*
* @return boolean
* @return bool
*/
protected function placeholder(&$placeholder)
{
@@ -3912,7 +3960,7 @@ class Parser
*
* @param array $out
*
* @return boolean
* @return bool
*/
protected function url(&$out)
{
@@ -3947,7 +3995,7 @@ class Parser
* Consume an end of statement delimiter
* @param bool $eatWhitespace
*
* @return boolean
* @return bool
*/
protected function end($eatWhitespace = null)
{
@@ -4065,7 +4113,7 @@ class Parser
/**
* Get source line number and column (given character position in the buffer)
*
* @param integer $pos
* @param int $pos
*
* @return array
*/

View File

@@ -164,7 +164,7 @@ class Base64
/**
* Convert to base64
*
* @param integer $value
* @param int $value
*
* @return string
*/
@@ -178,7 +178,7 @@ class Base64
*
* @param string $value
*
* @return integer
* @return int
*/
public static function decode($value)
{

View File

@@ -51,7 +51,7 @@ class Base64VLQ
/**
* Returns the VLQ encoded value.
*
* @param integer $value
* @param int $value
*
* @return string
*/
@@ -80,9 +80,9 @@ class Base64VLQ
* Decodes VLQValue.
*
* @param string $str
* @param integer $index
* @param int $index
*
* @return integer
* @return int
*/
public static function decode($str, &$index)
{
@@ -107,9 +107,9 @@ class Base64VLQ
* 1 becomes 2 (10 binary), -1 becomes 3 (11 binary)
* 2 becomes 4 (100 binary), -2 becomes 5 (101 binary)
*
* @param integer $value
* @param int $value
*
* @return integer
* @return int
*/
private static function toVLQSigned($value)
{
@@ -126,9 +126,9 @@ class Base64VLQ
* 2 (10 binary) becomes 1, 3 (11 binary) becomes -1
* 4 (100 binary) becomes 2, 5 (101 binary) becomes -2
*
* @param integer $value
* @param int $value
*
* @return integer
* @return int
*/
private static function fromVLQSigned($value)
{

View File

@@ -114,11 +114,11 @@ class SourceMapGenerator
/**
* Adds a mapping
*
* @param integer $generatedLine The line number in generated file
* @param integer $generatedColumn The column number in generated file
* @param integer $originalLine The line number in original file
* @param integer $originalColumn The column number in original file
* @param string $sourceFile The original source file
* @param int $generatedLine The line number in generated file
* @param int $generatedColumn The column number in generated file
* @param int $originalLine The line number in original file
* @param int $originalColumn The column number in original file
* @param string $sourceFile The original source file
*
* @return void
*/
@@ -326,7 +326,7 @@ class SourceMapGenerator
*
* @param string $filename
*
* @return integer|false
* @return int|false
*/
protected function findFileIndex($filename)
{
@@ -362,8 +362,8 @@ class SourceMapGenerator
/**
* Fix windows paths
*
* @param string $path
* @param boolean $addEndSlash
* @param string $path
* @param bool $addEndSlash
*
* @return string
*/

View File

@@ -19,58 +19,190 @@ namespace ScssPhp\ScssPhp;
*/
class Type
{
/**
* @internal
*/
const T_ASSIGN = 'assign';
/**
* @internal
*/
const T_AT_ROOT = 'at-root';
/**
* @internal
*/
const T_BLOCK = 'block';
/** @deprecated */
/**
* @deprecated
* @internal
*/
const T_BREAK = 'break';
/**
* @internal
*/
const T_CHARSET = 'charset';
const T_COLOR = 'color';
/**
* @internal
*/
const T_COMMENT = 'comment';
/** @deprecated */
/**
* @deprecated
* @internal
*/
const T_CONTINUE = 'continue';
/** @deprecated */
/**
* @deprecated
* @internal
*/
const T_CONTROL = 'control';
/**
* @internal
*/
const T_CUSTOM_PROPERTY = 'custom';
/**
* @internal
*/
const T_DEBUG = 'debug';
/**
* @internal
*/
const T_DIRECTIVE = 'directive';
/**
* @internal
*/
const T_EACH = 'each';
/**
* @internal
*/
const T_ELSE = 'else';
/**
* @internal
*/
const T_ELSEIF = 'elseif';
/**
* @internal
*/
const T_ERROR = 'error';
/**
* @internal
*/
const T_EXPRESSION = 'exp';
/**
* @internal
*/
const T_EXTEND = 'extend';
/**
* @internal
*/
const T_FOR = 'for';
const T_FUNCTION = 'function';
/**
* @internal
*/
const T_FUNCTION_REFERENCE = 'function-reference';
/**
* @internal
*/
const T_FUNCTION_CALL = 'fncall';
/**
* @internal
*/
const T_HSL = 'hsl';
/**
* @internal
*/
const T_HWB = 'hwb';
/**
* @internal
*/
const T_IF = 'if';
/**
* @internal
*/
const T_IMPORT = 'import';
/**
* @internal
*/
const T_INCLUDE = 'include';
/**
* @internal
*/
const T_INTERPOLATE = 'interpolate';
/**
* @internal
*/
const T_INTERPOLATED = 'interpolated';
/**
* @internal
*/
const T_KEYWORD = 'keyword';
const T_LIST = 'list';
const T_MAP = 'map';
/**
* @internal
*/
const T_MEDIA = 'media';
/**
* @internal
*/
const T_MEDIA_EXPRESSION = 'mediaExp';
/**
* @internal
*/
const T_MEDIA_TYPE = 'mediaType';
/**
* @internal
*/
const T_MEDIA_VALUE = 'mediaValue';
/**
* @internal
*/
const T_MIXIN = 'mixin';
/**
* @internal
*/
const T_MIXIN_CONTENT = 'mixin_content';
/**
* @internal
*/
const T_NESTED_PROPERTY = 'nestedprop';
/**
* @internal
*/
const T_NOT = 'not';
const T_NULL = 'null';
const T_NUMBER = 'number';
/**
* @internal
*/
const T_RETURN = 'return';
/**
* @internal
*/
const T_ROOT = 'root';
/**
* @internal
*/
const T_SCSSPHP_IMPORT_ONCE = 'scssphp-import-once';
/**
* @internal
*/
const T_SELF = 'self';
const T_STRING = 'string';
/**
* @internal
*/
const T_UNARY = 'unary';
/**
* @internal
*/
const T_VARIABLE = 'var';
/**
* @internal
*/
const T_WARN = 'warn';
/**
* @internal
*/
const T_WHILE = 'while';
}

View File

@@ -79,7 +79,7 @@ class Util
/**
* mb_chr() wrapper
*
* @param integer $code
* @param int $code
*
* @return string
*/

View File

@@ -19,5 +19,5 @@ namespace ScssPhp\ScssPhp;
*/
class Version
{
const VERSION = '1.9.0';
const VERSION = '1.10.0';
}