Skip to content

Commit

Permalink
fix: #1160 fix placeholder color, change H6 to H5 (#1194)
Browse files Browse the repository at this point in the history
* fix: #1160 fix placeholder color

* fix: #1160 change h6 to h5 in desciption
  • Loading branch information
Cuong Vu authored May 12, 2020
1 parent 1d30c8b commit 2c83468
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 10 deletions.
2 changes: 2 additions & 0 deletions packages/elements/src/components/HtmlRender/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ const sortTags = (domTag: Element, index: number, diffing: boolean) => {
return <H4 {...attributes}>{children}</H4>
case 'h2':
return <H5 {...attributes}>{children}</H5>
case 'h5':
return <H5 {...attributes}>{children}</H5>
case 'h6':
return <H6 {...attributes}>{children}</H6>
case 'i':
Expand Down
12 changes: 11 additions & 1 deletion packages/elements/src/styles/vendor/pell.scss
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ $pell-content-padding: 10px !default;
font-weight: bold;
}

h5 {
display: block;
font-size: 1.25rem;
margin-block-start: 0.83rem;
margin-block-end: 0.83rem;
margin-inline-start: 0px;
margin-inline-end: 0px;
font-weight: bold;
}

h6 {
display: block;
font-size: 1rem;
Expand Down Expand Up @@ -110,6 +120,6 @@ $pell-content-padding: 10px !default;

div[contenteditable='true']:empty:before {
content: attr(placeholder);
color: $grey-lighter;
color: #d3d3d3;
display: block; /* For Firefox */
}
2 changes: 1 addition & 1 deletion packages/elements/src/tests/badges/badge-branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/elements/src/tests/badges/badge-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/elements/src/tests/badges/badge-statements.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -558,9 +558,9 @@ export const SubmitApp: React.FC<SubmitAppProps> = ({
'link',
{
name: 'test',
icon: '<b>H<sub>6</sub></b>',
title: 'Add heading 6',
result: () => exec('formatBlock', '<h6>'),
icon: '<b>H<sub>5</sub></b>',
title: 'Add heading 5',
result: () => exec('formatBlock', '<h5>'),
},
]}
dataTest="submit-app-description"
Expand Down
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion packages/marketplace/src/tests/badges/badge-statements.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2c83468

Please sign in to comment.