View Single Post
Old 03-03-2020, 10:45 AM   #7
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 317
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
the rest of the dtopcaps

/*
NAME: dropcap (snippet 'dc3' into stylesheet) (put class="h" in every header tag) (dc appears in EVERY <p> not preceeded by <p>) (see dc4 to exclude intervening tags)
TRIGGER: dc3
*/

Code:
dropcapsnippetdc3, .h+p {text-indent:0}
dropcapsnippetdc3, .h+p:first-letter {color: red; font-size: 2em; line-height: 0.7em;  float: ;}
NAME: dropcap (snippet 'dc5' into stylesheet) (1st letter dc in EVERY <p> not preceeded by <p>) (includes quotes, excludes superscripts)
TRIGGER: dc5
Code:
dropcapsnippetdc5, :not(p)+p{text-indent: 0;}
dropcapsnippetdc5, :not(p) +p:first-letter{ color: red; font-size: 2em; line-height: 0.7em; float: ;}
NAME: dropcap (snippet 'dc6' into stylesheet) (works for h1 & h2 even if h1 & h2 mixed inside of one xhtml)
TRIGGER: dc6
Code:
dropcapsnippetdc6, 
h1+p, 
h1+:not(p) +p, 
h1+:not(p) +:not(p) +p,
h1+:not(p) +:not(p) +:not(p) +p,
h2+p, 
h2+:not(p) +p, 
h2+:not(p) +:not(p) +p,
h2+:not(p) +:not(p) +:not(p) +p {text-indent: 0;}  
dropcapsnippetdc6, 
h1+p:first-letter, 
h1+:not(p) +p:first-letter, 
h1+:not(p) +:not(p) +p:first-letter,
h1+:not(p) +:not(p) +:not(p) +p:first-letter,
h2+p:first-letter, 
h2+:not(p) +p:first-letter, 
h2+:not(p) +:not(p) +p:first-letter,
h2+:not(p) +:not(p) +:not(p) +p:first-letter{ color: red; font-size: 2em; line-height: 0.7em; float: ;}
/*
NOTE: similar to dc4 without requiring class="h" in h tags; only works for h1 and h2
NAME: dropcap (snippet 'dc7' into stylesheet) (can put as many as 3 non-p-tags between H tag and P)
TRIGGER: dc7
*/
Code:
dropcapdsnippetdc7,
h1~p:first-of-type,
h2+p, 
h2+:not(p) +p, 
h2+:not(p) +:not(p) +p,
h2+:not(p) +:not(p) +:not(p) +p {text-indent: 0;}
dropcapsnippetdc7, /*1st-of-type:1st-letter for h1; 1st-letter lists for h2*/ 
h1~p:first-of-type:first-letter, 
h2+p:first-letter, 
h2+:not(p) +p:first-letter, 
h2+:not(p) +:not(p) +p:first-letter,
h2+:not(p) +:not(p) +:not(p) +p:first-letter{ color: red; font-size: 2em; line-height: 0.7em; float: ;}
/*
NAME: dropcap (snippet 'dc8' into stylesheet) (only 1 <h?> tags allowed per xhtml) (not affected by intervening tags between <h?> and first <p>)(for h1, h2, & h3)
TRIGGER: dc8
*/
Code:
dropcapsnippetdc8, h1~p:first-of-type, h2~p:first-of-type, h3~p:first-of-type {text-indent: 0;}
dropcapsnippetdc8,h1~p:first-letter, h2~p:first-letter, h3~p:first-letter {color: red; font-size: 2em; line-height: 0.7em; float: ;}

NAME:dropcap (snippet 'dc9' into stylesheet) (won't work if intervening non-p tags between <h1> and <p>)
TRIGGER:dc9
dropcapsnippetdc9, h1~p:first-of-type, h2+p {text-indent: 0;}
dropcapsnippetdc9, /*1st-of-type:1st-letter for h1; 1st-letter lists for h2*/
h1~p:first-of-type:first-letter, h2+p:first-letter {color: red; font-size: 2em; line-height: 0.7em; float: ;}

All this fun stuff helped me to understand a little bit about how to use styles, classes, css, etc. I hope it helps someone. Best regards, Pop
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-03-03 09-43-43.png
Views:	169
Size:	675.7 KB
ID:	177487  
rjwse@aol.com is offline   Reply With Quote