Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Don't use color.channel
  • Loading branch information
t-hamano committed May 16, 2025
commit f48ed53d4fffefc7fc9fe19bf38bd5011671b06e
8 changes: 7 additions & 1 deletion packages/base-styles/_functions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@
@use "sass:color";

@function hex-to-rgb($hex) {
@return color.channel($hex, "red", $space: rgb), color.channel($hex, "green", $space: rgb), color.channel($hex, "blue", $space: rgb);
/*
* We should use the color.channel() function instead of color.red(), color.green(), color.blue().
* However, the Sass currently used by the Gutenberg project does not support color.channel().
* We should update to color.channel() once the entire Gutenberg project has completed the migration to
* Dart Sass and the Sass version is updated.
*/
@return color.red($hex), color.green($hex), color.blue($hex);
}
Loading