View Single Post
Old 05-18-2020, 01:42 AM   #3
hobnail
Running with scissors
hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.hobnail ought to be getting tired of karma fortunes by now.
 
Posts: 1,590
Karma: 14328510
Join Date: Nov 2019
Device: none
I have both. But I rarely use the formatting classes and have all of that stuff within the css for the "ordinary" tags. For example, occasionally I need a noindent paragraph but for the normal case as in a paragraph after an h2 or h3 tag I have

Code:
dl + p,
hr.asterism + p,
header + p,
p:first-child,
section.endnotes ol,
table + p  {
    margin-top: 1.0em;
    text-indent: 0em;
}
The plus means the css is for the tag (p) after that plus and in the html that tag (p) immediately follows what is in front of the plus (header, table, etc.). My h2 and h3 tags are inside a header group/block which is why you don't see them in this css.

For a tag that's inside another thing it's a space instead of a plus:

Code:
blockquote p, div.block p {
    margin-top: 0.25em;
    text-indent: 0em;
}
My goal is to use as few class="whatever" tags as possible.

Last edited by hobnail; 05-18-2020 at 02:19 PM.
hobnail is offline   Reply With Quote