Here's a sample of the code I used at one time for dropcaps. It was a bit of a pain since the different x-heights of the letters were not accounted for and I finally gave on up on such decoration after I realized that I had a collection of dropcap-a to dropcap-z classes with varying right, left and bottom margins and while those looked good on my Forma, they were not optimal for any of my other ereaders.
Code:
.dropcap {
float: left;
font-size: 2.5em;
line-height: 1.5;
margin-bottom: -0.4em;
margin-right: 0.05em;
margin-top: -0.35em;
}
Killed a couple of minutes digging into my old notes and stuff and this was the last simplified multiple class dropcap version I played with.
Code:
.first-letter1 {
float: left;
font-size: 250%;
margin-bottom: -0.31em;
margin-right: 0.05em;
margin-top: -0.35em;
}
.first-letter2 {
float: left;
font-size: 250%;
margin-top: -0.35em;
margin-right: 0.05em;
margin-bottom: -0.05em;
margin-left: 0.22em;
}
.first-letter3 {
float: left;
font-size: 250%;
margin-bottom: -0.31em;
margin-right: 0.03em;
margin-top: -0.35em;
}
.first-letter4 {
float: left;
font-size: 250%;
margin-bottom: -0.31em;
margin-right: 0.09em;
margin-top: -0.35em;
}
.first-letter5 {
float: left;
font-size: 250%;
margin-bottom: -0.31em;
margin-right: 0.07em;
margin-top: -0.35em;
}
.first-letter6 {
float: left;
font-size: 250%;
margin-bottom: -0.31em;
margin-right: 0.08em;
margin-top: -0.35em;
}