Skip to content

Commit

Permalink
Post Title Block: add typography formatting options
Browse files Browse the repository at this point in the history
  • Loading branch information
creativecoder committed Sep 14, 2021
1 parent 8714f66 commit 890ef1d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@
* WordPress dependencies
*/
import { Button } from '@wordpress/components';
import { formatStrikethrough, formatUnderline } from '@wordpress/icons';
import {
formatStrikethrough,
formatUnderline,
textColor,
} from '@wordpress/icons';
import { __ } from '@wordpress/i18n';

const TEXT_DECORATIONS = [
{
name: __( 'None' ),
value: 'none',
icon: textColor,
},
{
name: __( 'Underline' ),
value: 'underline',
Expand Down
10 changes: 8 additions & 2 deletions packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@
"typography": {
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true
}
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextTransform": true
},
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true
},
"style": "wp-block-post-title"
}
4 changes: 4 additions & 0 deletions packages/block-library/src/post-title/style.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.wp-block-post-title a {
display: inline-block;

// Inherit the styles from the main block element, so that text decoration settings
// for the block apply to post title links.
text-decoration: inherit;
}

0 comments on commit 890ef1d

Please sign in to comment.