Skip to content

Commit fa9fad2

Browse files
Rename: deltaEdelta (class name and CSS variable)
1 parent d5aaf0e commit fa9fad2

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/color-swatch/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,8 @@ These properties are read-only.
299299
| `--transparency-cell-size` | `<length>` | The size of the cells of the transparency gradient. |
300300
| `--transparcency-background` | `<color>` | The background color of the transparency gradient. |
301301
| `--transparency-darkness` | `<percentage>` | The opacity of the black color used for dark parts of the transparency gradient. |
302-
| `--positive-deltaE-color` | `<color>` | The color used for the positive color difference in color coords. |
303-
| `--negative-deltaE-color` | `<color>` | The color used for the negative color difference in color coords. |
302+
| `--positive-delta-color` | `<color>` | The color used for the positive color difference in color coords. |
303+
| `--negative-delta-color` | `<color>` | The color used for the negative color difference in color coords. |
304304

305305
### Parts
306306

src/color-swatch/color-swatch.css

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
0 0 / calc(2 * var(--_transparency-cell-size)) calc(2 * var(--_transparency-cell-size))
88
content-box border-box var(--_transparency-background)
99
);
10-
--_positive-deltaE-color: var(--positive-deltaE-color, hsl(120, 80%, 25%));
11-
--_negative-deltaE-color: var(--negative-deltaE-color, hsl(0, 85%, 40%));
10+
--_positive-delta-color: var(--positive-delta-color, hsl(120, 80%, 25%));
11+
--_negative-delta-color: var(--negative-delta-color, hsl(0, 85%, 40%));
1212

1313
position: relative;
1414
display: inline-flex;
@@ -82,7 +82,7 @@ slot {
8282
.data {
8383
display: contents;
8484

85-
dd:not(.deltaE, :has(~ dd)) {
85+
dd:not(.delta, :has(~ dd)) {
8686
grid-column: span 2;
8787
}
8888
}
@@ -97,15 +97,15 @@ slot {
9797
font-weight: bold;
9898
font-variant-numeric: tabular-nums;
9999

100-
&.deltaE {
101-
color: var(--_deltaE-color);
100+
&.delta {
101+
color: var(--_delta-color);
102102

103103
&.positive {
104-
--_deltaE-color: var(--_positive-deltaE-color);
104+
--_delta-color: var(--_positive-delta-color);
105105
}
106106

107107
&.negative {
108-
--_deltaE-color: var(--_negative-deltaE-color);
108+
--_delta-color: var(--_negative-delta-color);
109109
}
110110
}
111111
}

src/color-swatch/color-swatch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const Self = class ColorSwatch extends ColorElement {
145145

146146
delta = isAngle ? delta : delta / rawValue * 100;
147147
delta = typeof delta === "number" ? Number(delta.toPrecision(4)) : delta;
148-
ret += `<dd class="deltaE ${className}">(${ sign }${ delta }${ !isAngle ? "%" : ""})</dd>`;
148+
ret += `<dd class="delta ${className}">(${ sign }${ delta }${ !isAngle ? "%" : ""})</dd>`;
149149
}
150150

151151
ret += "</div>";

0 commit comments

Comments
 (0)