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 May 8, 2021
1 parent 95593c9 commit 4de6370
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 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
6 changes: 5 additions & 1 deletion packages/block-library/src/post-title/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@
},
"fontSize": true,
"lineHeight": true,
"__experimentalFontFamily": true
"__experimentalFontFamily": true,
"__experimentalFontWeight": true,
"__experimentalFontStyle": true,
"__experimentalTextDecoration": true,
"__experimentalTextTransform": 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 4de6370

Please sign in to comment.