diff --git a/blocks/library/text/block.scss b/blocks/library/text/block.scss index 947c3351c6f5ba..1cc6bd7b2ff4da 100644 --- a/blocks/library/text/block.scss +++ b/blocks/library/text/block.scss @@ -1,4 +1,4 @@ -.has-drop-cap { +p.has-drop-cap { &:first-letter { float: left; font-size: 4.1em; @@ -11,6 +11,6 @@ } } -.has-drop-cap:not( :focus ) { +p.has-drop-cap:not( :focus ) { overflow: hidden; } diff --git a/blocks/library/text/index.js b/blocks/library/text/index.js index 89302a507a1d67..3e1f27aaba9cd2 100644 --- a/blocks/library/text/index.js +++ b/blocks/library/text/index.js @@ -87,7 +87,7 @@ registerBlockType( 'core/text', { save( { attributes } ) { const { align, content, dropCap } = attributes; - const className = dropCap ? 'has-drop-cap' : undefined; + const className = dropCap && 'has-drop-cap'; if ( ! align ) { return

{ content }

;