Resolved Header Placeholder Overlap and Style Issues #240
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue:
closes #239
Description:
This PR addresses the issue: Header placeholder elements cover the top of the image block and have incorrect styles. The placeholders for the headers were causing an overlap with the top of the image block and had incorrect styles applied.
Changes:
handleTop()
to ensure correct spacing from the top, depending on the header type. It includes different return values for various header types ranging from "header-one" to "header-six".Code snippet:
Also updated the styling for the Typography component. The
top
property now useshandleTop
to correctly position the placeholder.Code snippet:
.rich-editor-placeholder
class. This ensures the placeholders have the correct font family, font size, and line height.Code snippet:
These changes resolve the issue with header placeholder overlap and incorrect styles. Now, the placeholders display correctly according to their respective header types and do not overlap with image blocks.
Test Plan:
To verify these changes, create blocks with different header types and observe the placeholder position and style. There should no longer be any overlap with image blocks, and the placeholders should be styled correctly.