Skip to content

Commit b5fe87a

Browse files
committed
plot: Chart to use PF6 colors vars
1 parent ec955b4 commit b5fe87a

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

pkg/lib/cockpit-components-plot.scss

+20-20
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
// Selected set of PF chart colors to optimize for full-spectrum and colorblindness
22
// using unique part of PF name and a hex color fallback
33
$plotColors: (
4-
blue-300 #06c,
5-
green-100 #bde2b9,
6-
cyan-200 #73c5c5,
7-
purple-100 #b2b0ea,
8-
gold-300 #f4c145,
9-
orange-300 #ec7a08,
10-
red-200 #a30000,
11-
cyan-300 #009596,
12-
black-500 #4d5258
4+
"blue--300" #06c,
5+
"green--100" #bde2b9,
6+
"teal--200" #73c5c5,
7+
"purple--100" #b2b0ea,
8+
"gold--300" #f4c145,
9+
"orange--300" #ec7a08,
10+
"red-orange--200" #a30000,
11+
"teal--300" #009596,
12+
"black--500" #4d5258
1313
);
1414

1515
.ct-plot {
16-
font-family: var(--pf-v5-chart-global--FontFamily);
16+
font-family: var(--pf-t--global--font--family--body);
1717

1818
&-border {
19-
stroke: var(--pf-v5-chart-global--Fill--Color--300);
19+
stroke: var(--pf-t--chart--global--fill--color--300);
2020
fill: transparent;
2121
shape-rendering: crispedges;
2222
}
2323

2424
&-title {
25-
font-size: calc(var(--pf-v5-chart-global--FontSize--md) * 1px);
25+
font-size: calc(var(--pf-t--chart--global--FontSize--sm) * 1px);
2626
}
2727

2828
// Placeholder string to stretch the column, set offscreen
@@ -32,19 +32,19 @@ $plotColors: (
3232

3333
&-axis,
3434
&-unit {
35-
font-size: calc(var(--pf-v5-chart-global--FontSize--xs) * 1px);
36-
fill: var(--pf-v5-chart-global--Fill--Color--700);
37-
letter-spacing: var(--pf-v5-chart-global--letter-spacing);
35+
font-size: calc(var(--pf-t--chart--global--FontSize--xs) * 1px);
36+
fill: var(--pf-t--chart--global--fill--color--700);
37+
letter-spacing: var(--pf-t--chart--global--letter-spacing);
3838
}
3939

4040
.pf-v6-theme-dark &-axis,
4141
.pf-v6-theme-dark &-unit {
42-
fill: var(--pf-v5-chart-global--Fill--Color--400);
42+
fill: var(--pf-t--chart--global--fill--color--400);
4343
}
4444

4545
&-lines,
4646
&-ticks {
47-
stroke: var(--pf-v5-chart-global--Fill--Color--300);
47+
stroke: var(--pf-t--chart--global--fill--color--300);
4848
shape-rendering: crispedges;
4949
}
5050

@@ -56,7 +56,7 @@ $plotColors: (
5656
}
5757

5858
&-paths {
59-
stroke-width: var(--pf-v5-chart-global--stroke--Width--sm);
59+
stroke-width: var(--pf-t--chart--global--stroke--width--xs);
6060
shape-rendering: geometricprecision;
6161

6262
> path {
@@ -67,7 +67,7 @@ $plotColors: (
6767
}
6868

6969
.ct-plot-title {
70-
fill: var(--pf-v5-global--Color--100);
70+
fill: var(--pf-t--global--text--color--regular);
7171
}
7272

7373
$plotColorCurrent: 0;
@@ -80,7 +80,7 @@ $plotColorTotal: 0;
8080
@each $plotColor, $plotColorBackup in $plotColors {
8181
$plotColorCurrent: $plotColorCurrent + 1;
8282
.ct-plot-paths > path:nth-last-child(#{$plotColorTotal}n + #{$plotColorCurrent}) {
83-
--ct-plot-path-color: var(--pf-v5-chart-color-#{$plotColor}, #{$plotColorBackup});
83+
--ct-plot-path-color: var(--pf-t--chart--color--#{$plotColor}, #{$plotColorBackup});
8484
}
8585
}
8686

0 commit comments

Comments
 (0)