Skip to content

Commit

Permalink
Review
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnw committed Oct 8, 2024
1 parent 96e0240 commit 42454b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions source/assets/js/playground/color-decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const COLOR_FUNCTIONS = [
'color',
'hsl',
'hsla',
'hwb',
'lab',
'lch',
'oklab',
Expand Down
5 changes: 3 additions & 2 deletions source/assets/js/playground/console-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,16 @@ export function displayForConsoleLog(
}
}
if (item.type === 'debug') {
// TODO: Support nested data structures after
// https://github.com/sass/sass/issues/3957 is implemented.
try {
const color = new Color(item.message);
const colorSwatch = colorSwatchView(
color.toString(),
color.inGamut('p3')
);
message = message + colorSwatch.outerHTML;
// eslint-disable-next-line @typescript-eslint/no-unused-vars
} catch (error) {
} catch {
// Ignore
}
}
Expand Down

0 comments on commit 42454b8

Please sign in to comment.