Skip to content

Commit

Permalink
accordion: remove border-bottom on content, add on item
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianNymark committed Jan 23, 2025
1 parent 21841aa commit 92beffb
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions @navikt/core/css/darkside/accordion.darkside.css
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,6 @@
background-color: var(--ax-border-subtleA);
}

.navds-accordion__item:last-child > .navds-accordion__content {
border-bottom: 1px solid transparent;
}

.navds-accordion__header::after {
top: initial;
bottom: 0;
Expand Down Expand Up @@ -146,16 +142,23 @@
}
}

&[data-expanded="true"] > .navds-accordion__content {
grid-template-rows: 1fr;
visibility: visible;
margin-block: var(--ax-space-8);
margin-block-end: var(--ax-space-24);
border-color: var(--ax-border-subtleA);
opacity: 1;
&[data-expanded="true"] {
& > .navds-accordion__content {
grid-template-rows: 1fr;
visibility: visible;
margin-block: var(--ax-space-8);
margin-block-end: var(--ax-space-24);
border-color: var(--ax-border-subtleA);
opacity: 1;

& .navds-accordion__content-inner {
min-height: fit-content;
}
}

& .navds-accordion__content-inner {
min-height: fit-content;
&:last-child {
margin-block-end: var(--ax-space-24);
border-bottom: 1px solid var(--ax-border-subtleA);
}
}
}
Expand Down

0 comments on commit 92beffb

Please sign in to comment.