Skip to content

Commit 5ce071a

Browse files
authored
Merge pull request #2422 from navikt/oversiktssider-v3
fjerner overstyrende padding på Header i ProductPanelExpandable
2 parents 66b4325 + cb163e8 commit 5ce071a

9 files changed

+112
-378
lines changed

package-lock.json

Lines changed: 86 additions & 328 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading
Loading
Loading
Loading

packages/nextjs/src/components/_common/productPanelExpandable/ProductPanelExpandable.module.scss

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,10 @@
1313
}
1414

1515
.expandableHeader {
16-
padding: var(--a-spacing-5);
16+
padding: var(--a-spacing-5) var(--a-spacing-1) var(--a-spacing-5) var(--a-spacing-3);
1717
gap: var(--a-spacing-4);
1818
border-radius: var(--a-border-radius-large);
1919

20-
@media #{common.$mq-screen-mobile} {
21-
padding: var(--a-spacing-3) 0;
22-
}
23-
2420
&:after {
2521
display: none;
2622
}
@@ -29,20 +25,23 @@
2925
&:focus {
3026
background-color: var(--a-deepblue-100);
3127
color: var(--a-text-default);
32-
box-shadow: 0 0 0 0;
28+
box-shadow: none;
3329
outline: 5px solid var(--a-bg-default);
3430

3531
& + :global(.navds-expansioncard__content) {
36-
box-shadow: 0 0 0 0;
32+
box-shadow: none;
3733
}
38-
3934
.illustration {
4035
& > :first-child:not(:last-child) * {
4136
fill: var(--a-white);
4237
}
4338
}
4439
}
4540

41+
&:hover :global(.navds-expansioncard__header-button) {
42+
background-color: transparent;
43+
}
44+
4645
&.alignCenter {
4746
:global(.navds-expansioncard__header-content) {
4847
align-items: center;
@@ -59,12 +58,6 @@
5958
:global(.navds-expansioncard__header-button) {
6059
align-self: center;
6160
}
62-
63-
@media #{common.$mq-screen-mobile} {
64-
:global(.navds-expansioncard__header-button) {
65-
transform: translateX(10px);
66-
}
67-
}
6861
}
6962

7063
.expandableContent {
@@ -73,7 +66,7 @@
7366
// Remove when we remove the old overview pages.
7467
&:not(.noLeftPadding) {
7568
@media #{common.$mq-screen-tablet-and-desktop} {
76-
padding-left: 82px;
69+
padding-left: 76px;
7770
}
7871
}
7972
}
@@ -103,19 +96,14 @@
10396
}
10497

10598
.panelHeader {
106-
font-size: 22px;
10799
display: flex;
108100
flex-direction: column;
101+
}
102+
103+
.title {
104+
font-size: var(--text-fluid-20-22);
109105
font-weight: var(--a-font-weight-bold);
110106
word-break: break-word;
111-
112-
> * {
113-
line-height: 1.5;
114-
}
115-
116-
@media #{common.$mq-screen-mobile} {
117-
font-size: var(--a-font-size-xlarge);
118-
}
119107
}
120108

121109
.ingress {

packages/nextjs/src/components/_common/productPanelExpandable/ProductPanelExpandable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const ProductPanelExpandable = ({
9494
>
9595
<IllustrationStatic className={style.illustration} illustration={illustration} />
9696
<div className={style.panelHeader}>
97-
{header}
97+
<span className={style.title}>{header}</span>
9898
{ingress && <BodyLong className={style.ingress}>{ingress}</BodyLong>}
9999
</div>
100100
</ExpansionCard.Header>

packages/nextjs/src/components/pages/oversikt-page/forms-list/panel/OversiktListPanel.module.scss

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@
1212

1313
.tjenesterPanel {
1414
border-bottom: 1px solid var(--a-gray-300);
15-
padding: var(--a-spacing-5) 0 var(--a-spacing-5) var(--a-spacing-4);
15+
padding: var(--a-spacing-5) var(--a-spacing-2) var(--a-spacing-5) var(--a-spacing-3);
1616
display: grid;
17-
grid-template-columns: var(--a-spacing-16) 1fr auto;
17+
grid-template-columns: auto 1fr auto;
1818
grid-template-areas:
19-
'icon . arrow'
2019
'icon title arrow'
21-
'icon tjenesterIngress arrow';
20+
'icon ingress arrow';
2221
column-gap: var(--a-spacing-4);
2322
position: relative;
2423

@@ -27,7 +26,7 @@
2726
flex-shrink: 0;
2827
width: var(--a-spacing-12);
2928
height: var(--a-spacing-12);
30-
align-self: center;
29+
align-self: start;
3130

3231
& > :first-child:not(:last-child) * {
3332
fill: var(--a-deepblue-100);
@@ -39,22 +38,16 @@
3938
display: flex;
4039
flex-direction: column;
4140
word-break: break-word;
42-
}
43-
44-
.lenketekst {
45-
font-size: 22px;
41+
font-size: var(--text-fluid-20-22);
4642
text-decoration: none;
4743
font-weight: 600;
48-
49-
@media #{common.$mq-screen-mobile} {
50-
font-size: var(--a-font-size-xlarge);
51-
}
5244
}
5345

54-
.tjenesterIngress {
55-
grid-area: tjenesterIngress;
46+
.ingress {
47+
grid-area: ingress;
5648
text-wrap: pretty;
5749
text-decoration: none;
50+
color: var(--a-text-subtle);
5851
}
5952

6053
.arrow {
@@ -74,7 +67,7 @@
7467
box-shadow: 0 0 0 0;
7568
outline: 5px solid var(--a-bg-default);
7669

77-
.lenketekst {
70+
.title {
7871
text-decoration: underline;
7972
text-decoration-color: var(--a-border-action-hover);
8073
}

packages/nextjs/src/components/pages/oversikt-page/forms-list/panel/OversiktListPanel.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { ProductDetailsProps } from 'types/content-props/dynamic-page-props';
1515
import { ProductDetails } from 'components/_common/productDetails/ProductDetails';
1616
import { ProductDetailType } from 'types/content-props/product-details';
1717
import { IllustrationStatic } from 'components/_common/illustration/static/IllustrationStatic';
18-
import { LenkeStandalone } from 'components/_common/lenke/lenkeStandalone/LenkeStandalone';
18+
import { LenkeInline } from 'components/_common/lenke/lenkeInline/LenkeInline';
1919
import style from './OversiktListPanel.module.scss';
2020

2121
type OversiktType = OversiktPageData['oversiktType'];
@@ -95,15 +95,10 @@ export const OversiktListPanel = ({ panelDetails, oversiktType, formNumberSelect
9595
return (
9696
<div className={style.tjenesterPanel}>
9797
<IllustrationStatic illustration={illustration} className={style.icon} />
98-
<LenkeStandalone
99-
href={url}
100-
title={title}
101-
className={style.title}
102-
tekstClassName={style.lenketekst}
103-
>
98+
<LenkeInline href={url} title={title} className={style.title}>
10499
{title}
105-
</LenkeStandalone>
106-
<BodyLong className={style.tjenesterIngress}>{ingress}</BodyLong>
100+
</LenkeInline>
101+
<BodyLong className={style.ingress}>{ingress}</BodyLong>
107102
<ArrowRightIcon title="Pil høyre" className={style.arrow} />
108103
</div>
109104
);

0 commit comments

Comments
 (0)