add named aliases for first-letter drop-cap style

This commit is contained in:
Eric
2026-09-14 20:33:54 +10:00
parent 7ce3e471a2
commit c14d1833b1
5 changed files with 42 additions and 37 deletions
+3 -2
View File
@@ -115,14 +115,15 @@ body { counter-reset : phb-page-numbers; }
font-size : 0.987cm; font-size : 0.987cm;
-webkit-column-span : all; -webkit-column-span : all;
-moz-column-span : all; -moz-column-span : all;
& + p::first-letter { }
.first-letter, .drop-cap,
h1 + p::first-letter {
float : left; float : left;
font-family : 'Solberry'; font-family : 'Solberry';
font-size : 10em; font-size : 10em;
line-height : 0.795em; line-height : 0.795em;
color : #222222; color : #222222;
} }
}
h2 { font-size : 0.705cm; } h2 { font-size : 0.705cm; }
h3 { h3 {
font-size : 0.529cm; font-size : 0.529cm;
+1
View File
@@ -14,6 +14,7 @@
.note table tbody tr:nth-child(odd) { background : #FFFFFF; } .note table tbody tr:nth-child(odd) { background : #FFFFFF; }
/* DROP CAP */ /* DROP CAP */
.first-letter, .drop-cap
h1 + p::first-letter { h1 + p::first-letter {
color : black; color : black;
background-image : unset; background-image : unset;
+1
View File
@@ -30,6 +30,7 @@ export default [
name : 'Tweak Drop Cap', name : 'Tweak Drop Cap',
icon : 'fas fa-sliders-h', icon : 'fas fa-sliders-h',
gen : dedent`/* Drop Cap settings */ gen : dedent`/* Drop Cap settings */
.page .first-letter, .page .drop-cap,
.page h1 + p::first-letter { .page h1 + p::first-letter {
font-family: SolberaImitationRemake; font-family: SolberaImitationRemake;
font-size: 3.5cm; font-size: 3.5cm;
+4 -3
View File
@@ -85,7 +85,10 @@
line-height : 1em; line-height : 1em;
-webkit-column-span : all; -webkit-column-span : all;
-moz-column-span : all; -moz-column-span : all;
& + p::first-letter { & + p::first-line { font-variant : small-caps; }
}
.first-letter, .drop-cap,
h1 + p::first-letter {
float : left; float : left;
padding-bottom : 2px; padding-bottom : 2px;
padding-left : 40px; //Allow background color to extend into margins padding-left : 40px; //Allow background color to extend into margins
@@ -100,8 +103,6 @@
-webkit-background-clip : text; -webkit-background-clip : text;
background-clip : text; background-clip : text;
} }
& + p::first-line { font-variant : small-caps; }
}
h2 { h2 {
//margin-top : 0px; //Font is misaligned. Shift up slightly //margin-top : 0px; //Font is misaligned. Shift up slightly
//margin-bottom : 0.05cm; //margin-bottom : 0.05cm;
+4 -3
View File
@@ -80,7 +80,10 @@
font-size : 0.89cm; font-size : 0.89cm;
font-variant : small-caps; font-variant : small-caps;
line-height : 1em; line-height : 1em;
& + p::first-letter { & + p::first-line { font-variant : small-caps; }
}
.first-letter, .drop-cap,
h1 + p::first-letter {
float : left; float : left;
padding-top : 0.3em; padding-top : 0.3em;
padding-bottom : 2px; padding-bottom : 2px;
@@ -93,8 +96,6 @@
font-size : 1.9em; font-size : 1.9em;
line-height : 1em; line-height : 1em;
} }
& + p::first-line { font-variant : small-caps; }
}
h2 { h2 {
font-size : 0.62cm; font-size : 0.62cm;
line-height : 0.988em; //Font is misaligned. Shift up slightly line-height : 0.988em; //Font is misaligned. Shift up slightly