Skip to content

Commit

Permalink
Load default font-sizes in the front.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtias committed Mar 8, 2018
1 parent b67b0c3 commit 3131add
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 12 deletions.
15 changes: 13 additions & 2 deletions blocks/library/paragraph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,23 @@ export const settings = {
edit: ParagraphBlock,

save( { attributes } ) {
const { width, align, content, dropCap, backgroundColor, textColor, fontSize } = attributes;
const {
width,
align,
content,
dropCap,
backgroundColor,
textColor,
textClass,
fontSize,
} = attributes;

const className = classnames( {
[ `align${ width }` ]: width,
'has-background': backgroundColor,
'has-drop-cap': dropCap,
} );
}, textClass );

const styles = {
backgroundColor: backgroundColor,
color: textColor,
Expand Down
38 changes: 28 additions & 10 deletions blocks/library/paragraph/style.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,31 @@
p.has-drop-cap {
&:first-letter {
float: left;
font-size: 4.1em;
line-height: 0.7;
font-family: serif;
font-weight: bold;
margin: .07em .23em 0 0;
text-transform: uppercase;
font-style: normal;
p {
&.is-small-text {
font-size: 14px;
}

&.is-regular-text {
font-size: 16px;
}

&.is-large-text {
font-size: 36px;
}

&.is-larger-text {
font-size: 48px;
}

&.has-drop-cap {
&:first-letter {
float: left;
font-size: 4.1em;
line-height: 0.7;
font-family: serif;
font-weight: bold;
margin: .07em .23em 0 0;
text-transform: uppercase;
font-style: normal;
}
}
}

Expand Down

0 comments on commit 3131add

Please sign in to comment.