Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sass Color Function Update #327

Merged
merged 5 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ yarn add -D sass

## Requirements

This project uses the "new" [Sass Module system](https://sass-lang.com/blog/the-module-system-is-launched). Therefore your build tool or taskrunner have to support **Dart Sass 1.33.0** or above.
This project uses the "new" [Sass Module system](https://sass-lang.com/blog/the-module-system-is-launched). Therefore your build tool or taskrunner have to support **Dart Sass 1.79.0** or above.

### <img src="https://sass-lang.com/assets/img/logos/logo-b6e1ef6e.svg" width="50"> Sass support

Expand Down
4 changes: 2 additions & 2 deletions functions/_colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $is-test: false !default;
/// @author Felix Scholze
/// @since v1.5.0
@function hex-to-rgb-values($color) {
@return color.red($color) + ", " + color.green($color) + ", " + color.blue($color);
@return color.channel($color, 'red', $space: rgb) + ", " + color.channel($color, 'green', $space: rgb) + ", " + color.channel($color, 'blue', $space: rgb);
}

/// Convert HEX colors to RGB (space-separated values)
Expand All @@ -25,7 +25,7 @@ $is-test: false !default;
/// @author Felix Scholze
/// @since v1.5.0
@function hex-to-rgb($color, $alpha: false) {
@return string.unquote("rgb") + "(" + (color.red($color) color.green($color) color.blue($color)) + if($alpha, " / " + $alpha, "") + ")";
@return string.unquote("rgb") + "(" + (color.channel($color, 'red', $space: rgb) color.channel($color, 'green', $space: rgb) color.channel($color, 'blue', $space: rgb)) + if($alpha, " / " + $alpha, "") + ")";
}

/// Generate shades in light and dark from a base color.
Expand Down
21 changes: 12 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,24 +81,27 @@
],
"packageManager": "[email protected]",
"devDependencies": {
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@commitlint/cli": "^19.6.0",
"@commitlint/config-conventional": "^19.6.0",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"glob": "^11.0.0",
"husky": "^9.1.1",
"husky": "^9.1.7",
"jest": "^29.7.0",
"postcss": "^8.4.39",
"postcss": "^8.4.49",
"postcss-scss": "^4.0.9",
"sass": "^1.77.8",
"sass-true": "^8.0.0",
"sass": "^1.83.0",
"sass-true": "^8.1.0",
"sassdoc": "^2.7.4",
"semantic-release": "^24.0.0",
"stylelint": "^16.7.0",
"semantic-release": "^24.2.0",
"stylelint": "^16.11.0",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-config-standard-scss": "^14.0.0",
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
"stylelint-order": "^6.0.4"
},
"peerDependencies": {
"sass": ">=1.79.0"
}
}
Loading
Loading