Add support for drop-cap paragraph styling
I'd like to propose adding support for drop-cap paragraphs in Leaflet.
For long-form and literary publications, it would be useful to style the first letter of selected paragraphs as a large drop cap, e.g.:
p.dropCap::first-letter {
font-size: 5.9em;
float: left;
margin-left: 0.05em;
padding-right: 0.13em;
line-height: 1;
font-style: normal;
}
p.dropCap {
text-indent: 0;
margin-top: 0.5em;
}
Currently, achieving this appears to require injecting custom CSS, which isn't exposed as a publication-level customization option.
Proposed approach
Rather than adding arbitrary CSS injection, I think this could work nicely as a paragraph style in the editor, for example:
- Normal paragraph
- Drop cap
The selected paragraph could then be rendered with an appropriate class/attribute, allowing Leaflet's theme styles to control the appearance.
Ideally, the drop-cap typography would integrate with the publication's existing typography/theme settings rather than requiring authors to specify a particular font stack.
Would this be a feature the maintainers would be interested in accepting?
I'm happy to fork the project and open a PR for this if needed.
Add support for drop-cap paragraph styling
I'd like to propose adding support for drop-cap paragraphs in Leaflet.
For long-form and literary publications, it would be useful to style the first letter of selected paragraphs as a large drop cap, e.g.:
Currently, achieving this appears to require injecting custom CSS, which isn't exposed as a publication-level customization option.
Proposed approach
Rather than adding arbitrary CSS injection, I think this could work nicely as a paragraph style in the editor, for example:
The selected paragraph could then be rendered with an appropriate class/attribute, allowing Leaflet's theme styles to control the appearance.
Ideally, the drop-cap typography would integrate with the publication's existing typography/theme settings rather than requiring authors to specify a particular font stack.
Would this be a feature the maintainers would be interested in accepting?
I'm happy to fork the project and open a PR for this if needed.