Skip to content

Commit

Permalink
feat(ffe-cards): groupcard, fjernet nopadding og oppdatert utseende
Browse files Browse the repository at this point in the history
  • Loading branch information
tuva-odegard committed Aug 19, 2024
1 parent 73e66a2 commit 37b406d
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 10 deletions.
66 changes: 56 additions & 10 deletions packages/ffe-cards/less/group-card.less
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
.card-background-styling();

border: none;
box-shadow: none;
box-shadow: var(--ffe-v-cards-common-card-box-shadow);

&--shadow {
box-shadow: var(--ffe-v-cards-common-card-box-shadow);
&--no-shadow {
box-shadow: none;
}

& > :first-child {
Expand All @@ -25,16 +25,26 @@
border-radius: var(--ffe-v-cards-common-card-border-radius);
}

&__element {
padding: var(--ffe-spacing-sm);
border: 2px solid transparent;
transition: all var(--ffe-transition-duration) var(--ffe-ease);
margin: 0;
&__title {
.ffe-h6();

padding: var(--ffe-spacing-sm) var(--ffe-spacing-md);
border: 1px solid transparent;
border-bottom-color: var(
--ffe-v-cards-common-group-card-separation-border-color
);
margin-bottom: 0;

&--no-padding {
padding: 0;
&--no-separator {
border-bottom-color: transparent;
}
}

&__element {
padding: var(--ffe-spacing-md);
border: 1px solid transparent;
transition: all var(--ffe-transition-duration) var(--ffe-ease);
margin: 0;
border-bottom-color: var(
--ffe-v-cards-common-group-card-separation-border-color
);
Expand All @@ -48,12 +58,48 @@
.clickable-card-styling();
}
}

&__footer {
padding: var(--ffe-spacing-sm) var(--ffe-spacing-md);
border: 1px solid transparent;
background-color: var(--ffe-v-group-card-footer-background-color);
display: flex;
justify-content: center;
align-items: center;

&--clickable {
.clickable-card-styling();

color: var(--ffe-farge-fjell);
}
}
}

.native & {
@media (prefers-color-scheme: dark) {
.ffe-group-card {
.card-background-dm-styling();

box-shadow: none;
border: 1px solid
var(--ffe-v-cards-common-group-card-separation-border-color-dm);

&__title {
color: var(--ffe-farge-vann-30);
}

&__title,
&__element {
border-bottom-color: var(
--ffe-v-cards-common-group-card-separation-border-color-dm
);
}

&__footer {
background-color: var(
--ffe-v-group-card-footer-background-color-dm
);
}
}
}
}
5 changes: 5 additions & 0 deletions packages/ffe-cards/less/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
--ffe-v-cards-common-group-card-separation-border-color: var(
--ffe-farge-lysgraa
);
--ffe-v-cards-common-group-card-separation-border-color-dm: var(
--ffe-farge-koksgraa
);
--ffe-v-group-card-footer-background-color: var(--ffe-farge-syrin-30);
--ffe-v-group-card-footer-background-color-dm: var(--ffe-farge-koksgraa);

@media (prefers-color-scheme: dark) {
.native {
Expand Down

0 comments on commit 37b406d

Please sign in to comment.