Skip to content

Commit

Permalink
Merge pull request #327 from felix-berlin/sass-update
Browse files Browse the repository at this point in the history
Sass Color Function Update
  • Loading branch information
felix-berlin authored Dec 13, 2024
2 parents 7679c9a + d982654 commit da281b9
Show file tree
Hide file tree
Showing 5 changed files with 573 additions and 487 deletions.
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": "pnpm@9.15.0",
"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

0 comments on commit da281b9

Please sign in to comment.