Skip to content

Commit

Permalink
fix: enable the ability to apply strong to header
Browse files Browse the repository at this point in the history
  • Loading branch information
elistone committed Dec 13, 2024
1 parent f75d281 commit 901d3dd
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/drupal/gutenberg_blocks/js/blocks/heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ registerBlockType<{
keepPlaceholderOnFocus={true}
onChange={(text) => {
props.setAttributes({
text: cleanUpText(text),
text: cleanUpText(text, ['strong']),
});
}}
/>
Expand Down
32 changes: 30 additions & 2 deletions packages/ui/src/components/Atoms/Fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,45 @@
@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 600;
font-weight: 700;
src: url('/fonts/preload/Inter-Bold.woff2') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 600;
font-weight: 700;
src: url('/fonts/preload/Inter-BoldItalic.woff2') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 800;
src: url('/fonts/preload/Inter-ExtraBold.woff2') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 800;
src: url('/fonts/preload/Inter-ExtraBoldItalic.woff2') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: normal;
font-weight: 900;
src: url('/fonts/preload/Inter-Black.woff2') format('woff2');
}

@font-face {
font-family: 'Inter';
font-style: italic;
font-weight: 900;
src: url('/fonts/preload/Inter-Black.woff2') format('woff2');
}

html,
body {
font-family: 'Inter', sans-serif;
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions tests/schema/specs/blocks.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -576,11 +576,11 @@ test('Block: Heading', async () => {
<h4 class="wp-block-custom-heading">Heading four</h4>
<h2 class="wp-block-custom-heading">Heading two - Bold</h2>
<h2 class="wp-block-custom-heading"><strong>Heading two - Bold</strong></h2>
<h3 class="wp-block-custom-heading">Heading three - Bold</h3>
<h3 class="wp-block-custom-heading"><strong>Heading three - Bold</strong></h3>
<h4 class="wp-block-custom-heading">Heading four - Bold</h4>
<h4 class="wp-block-custom-heading"><strong>Heading four - Bold</strong></h4>
",
},
],
Expand Down

0 comments on commit 901d3dd

Please sign in to comment.