Skip to content

Commit

Permalink
misc content styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Oct 7, 2024
1 parent 78f3228 commit 650e5de
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ En kombinasjon av obligatoriske og valgfrie felt er ikke ideellt! Men det vil v

<Card
color='brand3'
data-untyled
data-unstyled
>
*Retningslinjene er utarbeidet i en tverretatlig arbeidsgruppe med deltakere fra Digdir, Nav, Skatt, Brreg og Oslo Origo. Du kan påvirke arbeidet i [Github](https://github.com/digdir/designsystemet/issues/new) eller i [#Mønster-kanalen](https://designsystemet.slack.com/archives/C05RBGB92MC/p1712751837722749)[Slack](https://join.slack.com/t/designsystemet/shared_invite/zt-2438eotl3-a4266Vd2IeqMWO8TBw5PrQ).
</Card>
Empty file.
12 changes: 11 additions & 1 deletion apps/storefront/components/MdxContent/MdxContent.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
margin-bottom: 0;
}

& p {
margin-bottom: var(--ds-spacing-4);
}

& > h1,
& > h2,
& > h3,
Expand Down Expand Up @@ -128,7 +132,13 @@
margin-top: var(--ds-spacing-5);
}

& ~ *:not([data-unstyled]) {
& *[data-unstyled] {
& p {
margin: unset;
}
}

& *:not([data-unstyled]) {
& p,
& h2,
& h3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
}

.githubLink {
display: inline-block;
margin-top: var(--ds-spacing-12);
}

Expand Down
9 changes: 1 addition & 8 deletions apps/storefront/mdx-components.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,7 @@ import type { MDXComponents } from 'mdx/types';
export function useMDXComponents(components: MDXComponents): MDXComponents {
return {
...components,
p: (props: ParagraphProps) => (
<Paragraph
{...props}
style={{
marginBottom: 'var(--ds-spacing-4)',
}}
/>
),
p: (props: ParagraphProps) => <Paragraph {...props} />,
a: (props) => <Link {...(props as LinkProps)} />,
ol: (props: ListOrderedProps) => <ListOrdered {...props} />,
ul: (props: ListUnorderedProps) => <ListUnordered {...props} />,
Expand Down

0 comments on commit 650e5de

Please sign in to comment.