Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
},
"dependencies": {
"cheerio": "^1.1.2",
"colorjs.io": "^0.5.2",
"colorjs.io": "^0.6.0",
"css-tree": "^3.1.0",
"gulp-rename": "^2.1.0",
"gulp-svg-symbols": "^3.2.3",
Expand All @@ -85,25 +85,25 @@
"@babel/core": "^7.28.5",
"@babel/eslint-parser": "^7.28.5",
"@babel/preset-env": "^7.28.5",
"@eslint/js": "^9.39.1",
"@eslint/js": "^9.39.2",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"accoutrement": "^4.0.6",
"autoprefixer": "^10.4.22",
"autoprefixer": "^10.4.23",
"babel-jest": "^30.2.0",
"babel-loader": "^10.0.0",
"chalk": "^4.1.2",
"core-js": "^3.47.0",
"css-loader": "^7.1.2",
"css-minimizer-webpack-plugin": "^7.0.2",
"css-minimizer-webpack-plugin": "^7.0.4",
"cssremedy": "^0.1.0-beta.2",
"del": "^6.1.1",
"eslint": "^9.39.1",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-webpack": "^0.13.10",
"eslint-plugin-import": "^2.32.0",
"eslint-plugin-jest": "^29.2.1",
"eslint-plugin-jest": "^29.12.1",
"eslint-plugin-jest-dom": "^5.5.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^16.5.0",
Expand All @@ -126,18 +126,18 @@
"nyc": "^17.1.0",
"postcss": "^8.5.6",
"postcss-loader": "^8.2.0",
"prettier": "^3.7.3",
"sass": "^1.94.2",
"sass-embedded": "^1.93.3",
"prettier": "^3.7.4",
"sass": "^1.97.1",
"sass-embedded": "^1.97.1",
"sass-loader": "^16.0.6",
"sass-true": "^10.0.0",
"sass-true": "^10.1.0",
"sassdoc": "^2.7.4",
"sinon": "^21.0.0",
"sinon": "^21.0.1",
"srcdoc-polyfill": "^1.0.0",
"stylelint": "^16.26.1",
"stylelint-config-standard-scss": "^16.0.0",
"svgo": "^4.0.0",
"webpack": "^5.103.0",
"webpack": "^5.104.1",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"
},
Expand Down
4 changes: 3 additions & 1 deletion scss/samples/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ $private: 'for internal use only';
/// @group demo_test-sassdoc
/// @type *
/// @requires $private
$basic-value: if(not 'social', $private, 'hello world');
$basic-value: if(
sass(not 'social'): $private; else: 'hello world',
);

// Map Value
// ---------
Expand Down
27 changes: 19 additions & 8 deletions scss/utilities/_json-encode.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// Json Encoding
// =============

// JSON Ecode
// ----------
// JSON Encode
// -----------
/// Encode any Sass value as a JSON-ready string.
///
/// @group config_api-utilities
Expand Down Expand Up @@ -44,7 +44,9 @@
$str: '';

@each $item in $list {
$str: if($str != '', $str + ', ', $str);
@if ($str != '') {
$str: $str + ', ';
}
$str: $str + encode($item);
}

Expand All @@ -64,7 +66,8 @@
$str: '';

@each $key, $value in $map {
$str: if($str != '', $str + ', ', $str);
/* prettier-ignore */
$str: if(sass($str != ''): $str + ', '; else: $str);
$str: $str + quotes($key) + ': ' + encode($value);
}

Expand Down Expand Up @@ -124,10 +127,14 @@
@if ($string == $old) {
$return: $new;
} @else if $i {
$a: if($i > 1, string.slice($string, 1, $i - 1), '');
$a: if(
sass($i > 1): string.slice($string, 1, $i - 1) ; else: '',
);
$z: string.slice($string, $i + $n);
$z: escape-quotes($z);
$return: $a + if($new, $new, '') + $z;

/* prettier-ignore */
$return: $a + if(sass($new): $new; else: '') + $z;
}

@return $return;
Expand All @@ -152,10 +159,14 @@
@if ($string == $old) {
$return: $new;
} @else if $i {
$a: if($i > 1, string.slice($string, 1, $i - 1), '');
$a: if(
sass($i > 1): string.slice($string, 1, $i - 1) ; else: '',
);
$z: string.slice($string, $i + $n);
$z: escape-backslashes($z);
$return: $a + if($new, $new, '') + $z;

/* prettier-ignore */
$return: $a + if(sass($new): $new; else: '') + $z;
}

@return $return;
Expand Down
Loading
Loading