User:Barto/common.css

From ProofWiki
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/**
 * Fixing whitespace using css instead of double blank lines.
 * Empty paragraphs are deleted using $\href{common.js}{\text{user:barto/common.js}}$
 * Done only on namespaces Main, ProofWiki, Help, Axiom, Definition
 * ------------------------------------------------------
 */
 
/** topmargin of H2
 * ------------------------------------------------------
 * default (1em) + lineheight (22.4px) and top margin (0.5em) of p
 */
 .ns-0 h2:not(:first-of-type),
 .ns-4 h2:not(:first-of-type),
 .ns-12 h2:not(:first-of-type),
 .ns-100 h2:not(:first-of-type),
 .ns-102 h2:not(:first-of-type) {
 	margin-top: calc(1em + 22.4px + 0.5em);
 }

/** topmargin of H3
 * ------------------------------------------------------
 * default (0.3em) + lineheight (22.4px) and top margin (0.5em) of p
 */
 .ns-0 h3,
 .ns-4 h3,
 .ns-12 h3,
 .ns-100 h3,
 .ns-102 h3 {
 	margin-top: calc(0.3em + 22.4px + 0.5em);
 }
 
/** 
 * Default margin if the h3 directly follows a h2
 */
 .ns-0 h2 + h3,
 .ns-4 h2 + h3,
 .ns-12 h2 + h3,
 .ns-100 h2 + h3,
 .ns-102 h2 + h3 {
 	margin-top: 0.3em !important;
 }
 
/** 
 * Default margin if the h3 is a transcluded definition on an equivalence proof page, except the first one.
 */
 /** Commented out, because it often doesn't look good. But it does work.
 body[class*=Equivalence_of_Definitions].ns-0 h3:not(:first-of-type) {
 	margin-top: 0.3em;
 }
 body[class*=Equivalence_of_Definitions].ns-0 h2:nth-of-type(2)~h3 {
 	margin-top: calc(0.3em + 22.4px + 0.5em);
 }*/
 
 /** topmargin of H4
 * ------------------------------------------------------
 * default (0.3em) + lineheight (22.4px) and top margin (0.5em) of p
 */
 .ns-0 h4,
 .ns-4 h4,
 .ns-12 h4,
 .ns-100 h4,
 .ns-102 h4 {
 	margin-top: calc(0.3em + 22.4px + 0.5em);
 }
 
/**
 * Default margin if the h3 directly follows a h2 or h3
 */
 .ns-0 h2 + h4,
 .ns-0 h3 + h4,
 .ns-4 h2 + h4,
 .ns-4 h3 + h4,
 .ns-12 h2 + h4,
 .ns-12 h3 + h4,
 .ns-100 h2 + h4,
 .ns-100 h3 + h4,
 .ns-102 h2 + h4,
 .ns-102 h3 + h4 {
 	margin-top: 0.3em;
 }

/**
 * Lists with LaTeX numbering
 * ------------------------------------------------------
 */
ol li::before {
/*	content: attr(data-content) counter(item)".";*/
}