Skip to content

Commit 9f91b7f

Browse files
committed
Convert all Sass color functions to color.adjust
1 parent 3de00a4 commit 9f91b7f

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

src/api/_constants.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "sass:color";
2+
13
// Namespace for all classes, reduces the risk of style clashes.
24
$DRAFTAIL: "Draftail-";
35

@@ -22,9 +24,9 @@ $draftail-editor-readonly-opacity: 0.5 !default;
2224
$draftail-editor-chrome: $color-light-grey !default;
2325
$draftail-editor-chrome-text: $color-grey !default;
2426
$draftail-editor-chrome-active: $color-black !default;
25-
$draftail-editor-chrome-accent: darken(
27+
$draftail-editor-chrome-accent: color.adjust(
2628
$color: $draftail-editor-chrome,
27-
$amount: 10%,
29+
$lightness: -10%,
2830
) !default;
2931
$draftail-tooltip-chrome: $color-grey !default;
3032
$draftail-tooltip-chrome-text: $color-white !default;

src/components/Toolbar/ToolbarButton.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
$button-active-color: transparentize(
1+
@use "sass:color";
2+
3+
$button-active-color: color.adjust(
24
$color: $draftail-editor-chrome-active,
3-
$amount: 0.9,
5+
$alpha: -0.9,
46
);
5-
$button-active-border-color: transparentize(
7+
$button-active-border-color: color.adjust(
68
$color: $draftail-editor-chrome-active,
7-
$amount: 0.8,
9+
$alpha: -0.8,
810
);
911
$button-font-size: 1rem;
1012

src/components/Toolbar/ToolbarTooltip.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
@use "sass:math";
2+
@use "sass:color";
23

34
// Code initially taken from Balloon.css
45
// See https://github.com/kazzkiq/balloon.css.
56
//
67
// Variables
78
// -----------------------------------------
89

9-
$balloon-bg: transparentize(
10+
$balloon-bg: color.adjust(
1011
$color: #111,
11-
$amount: 0.1,
12+
$alpha: -0.1,
1213
) !default;
1314
$balloon-text-color: $color-white;
1415
$arrow-height: 6px;

0 commit comments

Comments
 (0)