From 3ddd09168cee03aa3233e993602d7f920583dd91 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Mon, 26 Jun 2017 21:57:17 +0200 Subject: [PATCH 1/2] Fix undefined drop-cap class --- blocks/editable/style.scss | 4 ++-- blocks/library/text/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blocks/editable/style.scss b/blocks/editable/style.scss index 9c143868dcdbe3..0aeea2343009c3 100644 --- a/blocks/editable/style.scss +++ b/blocks/editable/style.scss @@ -50,7 +50,7 @@ } } -.drop-cap-true .blocks-editable__tinymce:not( :focus ) { +.drop-cap .blocks-editable__tinymce:not( :focus ) { &:first-letter { float: left; font-size: 4.1em; @@ -63,7 +63,7 @@ } } -.drop-cap-true:not( :focus ) { +.drop-cap:not( :focus ) { overflow: hidden; } diff --git a/blocks/library/text/index.js b/blocks/library/text/index.js index a8ab8f0d73f55f..4b003ebcb2626d 100644 --- a/blocks/library/text/index.js +++ b/blocks/library/text/index.js @@ -78,7 +78,7 @@ registerBlockType( 'core/text', { } } onMerge={ mergeBlocks } style={ { textAlign: align } } - className={ `drop-cap-${ dropCap }` } + className={ dropCap && 'drop-cap' } placeholder={ __( 'Write…' ) } />, ]; From 306f201c8419506a1080987933ad13ad2ae0d3c0 Mon Sep 17 00:00:00 2001 From: Pascal Birchler Date: Tue, 27 Jun 2017 13:42:47 +0200 Subject: [PATCH 2/2] Rename to has-drop-cap --- blocks/editable/style.scss | 4 ++-- blocks/library/text/index.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blocks/editable/style.scss b/blocks/editable/style.scss index 0aeea2343009c3..4f157639435680 100644 --- a/blocks/editable/style.scss +++ b/blocks/editable/style.scss @@ -50,7 +50,7 @@ } } -.drop-cap .blocks-editable__tinymce:not( :focus ) { +.has-drop-cap .blocks-editable__tinymce:not( :focus ) { &:first-letter { float: left; font-size: 4.1em; @@ -63,7 +63,7 @@ } } -.drop-cap:not( :focus ) { +.has-drop-cap:not( :focus ) { overflow: hidden; } diff --git a/blocks/library/text/index.js b/blocks/library/text/index.js index 4b003ebcb2626d..acdd6740d1b77c 100644 --- a/blocks/library/text/index.js +++ b/blocks/library/text/index.js @@ -78,7 +78,7 @@ registerBlockType( 'core/text', { } } onMerge={ mergeBlocks } style={ { textAlign: align } } - className={ dropCap && 'drop-cap' } + className={ dropCap && 'has-drop-cap' } placeholder={ __( 'Write…' ) } />, ];