Skip to content

Commit

Permalink
🎨 remove em and strong from promotion card ingress #2401 (#2404)
Browse files Browse the repository at this point in the history
* 🎨 remove em and strong from promotion card ingress

* 🎨 update base styling
  • Loading branch information
BorghildSelle authored Jul 5, 2024
1 parent 6e865b1 commit cda5fc0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/pageComponents/shared/portableText/Blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const inlineBlockTypes = ['block', 'positionedInlineImage', 'pullQuote', 'basicI
export default function Blocks({
value,
blocks: blocksComponents,
marks: marksComponents,
components,
proseClassName = '',
className = '',
Expand Down Expand Up @@ -170,6 +171,7 @@ export default function Blocks({
types: { ...defaultSerializers.types },
marks: {
...defaultSerializers.marks,
...marksComponents,
...(includeFootnotes && footnoteSerializer),
},
}}
Expand Down
4 changes: 4 additions & 0 deletions web/sections/cards/PromotionCard/PromotionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ const PromotionCard = forwardRef<HTMLAnchorElement, PromotionCardProps>(function
value={ingress}
className={` max-w-prose grow ${type !== 'news' && type !== 'localNews' ? '' : 'hidden lg:block'}`}
{...(!(variant === 'single' && !isMobile) && { clampLines: isMobile ? 3 : 5 })}
marks={{
em: ({ children }: { children?: React.ReactNode }) => <>{children}</>,
strong: ({ children }: { children?: React.ReactNode }) => <>{children}</>,
}}
/>
)}
</Card.Content>
Expand Down
12 changes: 12 additions & 0 deletions web/styles/tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@
@import './components/videojs.css';
@import 'tailwindcss/utilities';

@layer base {
p,
h1,
h2,
h3,
h4,
h5,
h6 {
overflow-wrap: break-word;
}
}

@layer components {
article {
counter-reset: footnotes;
Expand Down

0 comments on commit cda5fc0

Please sign in to comment.