Skip to content

Commit a3b303a

Browse files
authored
Merge pull request #2530 from SpareBank1/semantiske-farger-lists
Semantiske farger lists
2 parents 81fae95 + 8e40f26 commit a3b303a

File tree

4 files changed

+19
-45
lines changed

4 files changed

+19
-45
lines changed

packages/ffe-lists-react/src/DetailListCard.tsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,19 @@ import classNames from 'classnames';
33

44
export interface DetailListCardProps
55
extends React.ComponentPropsWithoutRef<'dl'> {
6-
bgColor?: 'sand-30' | 'sand-70' | 'frost-30' | 'syrin-30' | 'syrin-70';
7-
bgDarkmodeColor?: 'natt' | 'svart' | 'koksgraa';
6+
bgColor?: 'primary' | 'secondary' | 'tertiary';
87
}
98

109
export const DetailListCard: React.FC<DetailListCardProps> = ({
1110
className,
1211
bgColor,
13-
bgDarkmodeColor,
1412
children,
1513
...rest
1614
}) => {
1715
return (
1816
<dl
1917
className={classNames('ffe-detail-list-card', className, {
2018
[`ffe-detail-list-card--bg-${bgColor}`]: bgColor,
21-
[`ffe-detail-list-card--dm-bg-${bgDarkmodeColor}`]:
22-
bgDarkmodeColor,
2319
})}
2420
{...rest}
2521
>

packages/ffe-lists/less/description-list.less

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
.ffe-description-list__term {
13-
color: var(--ffe-v-lists-title-color);
13+
color: var(--ffe-color-foreground-emphasis);
1414
font-size: var(--ffe-fontsize-h6);
1515
&:extend(.ffe-strong-text);
1616
}
@@ -20,7 +20,7 @@
2020
.ffe-description-list__description {
2121
padding-bottom: var(--vertical-seperation);
2222
margin-left: 0;
23-
color: var(--ffe-v-lists-description-description-color);
23+
color: var(--ffe-color-foreground-default);
2424
}
2525

2626
.ffe-description-list__description + .ffe-description-list__description {
+11-35
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
.ffe-detail-list-card {
2-
--detail-list-bg-color: var(--ffe-v-detail-list-card-background-color);
2+
--detail-list-bg-color: var(--ffe-color-surface-primary-default);
33

44
background-color: var(--detail-list-bg-color);
5+
border: 1px solid var(--ffe-color-border-primary-subtle);
56
border-radius: var(--ffe-v-detail-list-card-border-radius);
67
font-family: var(--ffe-g-font);
78
font-variant-numeric: tabular-nums;
89
container-type: inline-size;
910

1011
&__item:not(:last-child) {
11-
border-bottom: 1px solid var(--ffe-v-detail-list-card-border-color);
12+
border-bottom: 1px solid var(--ffe-color-border-primary-subtle);
1213
}
1314

1415
&__item {
@@ -45,13 +46,14 @@
4546

4647
&-label {
4748
font-family: var(--ffe-g-font-heading-small);
48-
color: var(--ffe-g-secondary-color);
49+
color: var(--ffe-color-foreground-emphasis);
4950
}
5051

5152
&-value {
5253
margin: 0; // Removes the default dd-element margin when it breaks to a new line
5354
display: flex;
5455
align-items: center;
56+
color: var(--ffe-color-foreground-default);
5557

5658
& > a,
5759
& > button {
@@ -65,41 +67,15 @@
6567
}
6668
}
6769

68-
&--bg-sand-30 {
69-
--detail-list-bg-color: var(--ffe-farge-sand-30);
70+
&--bg-primary {
71+
--detail-list-bg-color: var(--ffe-color-surface-primary-default);
7072
}
7173

72-
&--bg-sand-70 {
73-
--detail-list-bg-color: var(--ffe-farge-sand-70);
74+
&--bg-secondary {
75+
--detail-list-bg-color: var(--ffe-color-surface-secondary-default);
7476
}
7577

76-
&--bg-frost-30 {
77-
--detail-list-bg-color: var(--ffe-farge-frost-30);
78-
}
79-
80-
&--bg-syrin-30 {
81-
--detail-list-bg-color: var(--ffe-farge-syrin-30);
82-
}
83-
84-
&--bg-syrin-70 {
85-
--detail-list-bg-color: var(--ffe-farge-syrin-70);
86-
}
87-
}
88-
89-
.regard-color-scheme-preference & {
90-
@media (prefers-color-scheme: dark) {
91-
.ffe-detail-list-card {
92-
&--dm-bg-svart {
93-
--detail-list-bg-color: var(--ffe-farge-svart);
94-
}
95-
96-
&--dm-bg-natt {
97-
--detail-list-bg-color: var(--ffe-farge-natt);
98-
}
99-
100-
&--dm-bg-koksgraa {
101-
--detail-list-bg-color: var(--ffe-farge-koksgraa);
102-
}
103-
}
78+
&--bg-tertiary {
79+
--detail-list-bg-color: var(--ffe-color-surface-tertiary-default);
10480
}
10581
}

packages/ffe-lists/less/regular-lists.less

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
.ffe-numbered-list,
55
.ffe-bullet-list {
66
font-family: var(--ffe-g-font);
7+
color: var(--ffe-color-foreground-default);
78
padding: 0;
89
text-align: left;
910
margin: 0 0 var(--ffe-spacing-sm);
@@ -59,6 +60,7 @@
5960
.ffe-check-list,
6061
.ffe-stylized-numbered-list {
6162
font-family: var(--ffe-g-font);
63+
color: var(--ffe-color-foreground-default);
6264
padding: 0;
6365
text-align: left;
6466
margin: 0 0 var(--ffe-spacing-sm);
@@ -83,11 +85,11 @@
8385
grid-row: 1 e('/') 2;
8486
place-self: center;
8587
&--check.ffe-icons {
86-
color: var(--ffe-v-lists-check-list-check-icon-color);
88+
color: var(--ffe-color-fill-feedback-success);
8789
}
8890

8991
&--cross.ffe-icons {
90-
color: var(--ffe-v-lists-check-list-cross-icon-color);
92+
color: var(--ffe-color-fill-feedback-critical);
9193
}
9294
}
9395

@@ -122,7 +124,7 @@
122124
content: counter(list-elements);
123125
grid-column: 1 e('/') 2;
124126
grid-row: 1 e('/') 2;
125-
color: var(--ffe-v-lists-title-color);
127+
color: var(--ffe-color-foreground-emphasis);
126128
&:extend(.ffe-strong-text);
127129
}
128130
}

0 commit comments

Comments
 (0)