Skip to content

Commit

Permalink
Updating with minor fixes
Browse files Browse the repository at this point in the history
Changing a ternary operator into an && statement. Adding a
p.has-drop-cap as the selector instead of just .has-drop-cap.
  • Loading branch information
BE-Webdesign authored and youknowriad committed Jun 29, 2017
1 parent 68c9c57 commit 4b5f5fa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions blocks/library/text/block.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.has-drop-cap {
p.has-drop-cap {
&:first-letter {
float: left;
font-size: 4.1em;
Expand All @@ -11,6 +11,6 @@
}
}

.has-drop-cap:not( :focus ) {
p.has-drop-cap:not( :focus ) {
overflow: hidden;
}
2 changes: 1 addition & 1 deletion blocks/library/text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p className={ className }>{ content }</p>;
Expand Down

0 comments on commit 4b5f5fa

Please sign in to comment.