all repos — hastystyles @ master

The stylesheets for HastyScrybe and HastySite.

src/styles/_printing.less

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
@media print {

  body {
    width: 700px;
  }


  /* Table of Contents */

  #toc {
  	width: 650px;
    list-style-type: none;
  }
  #toc ul {
    list-style-type: none;
    padding-left: 20px;
    margin-left: 0;
  }
  
  #toc li {
    padding-left: 0;
    margin-left: 0;
  	padding-bottom: 0.2em;
  }
  
  #toc a {
    text-decoration: none;
  }
  
  #toc a::after {
  	content: leader(".") target-counter(attr(href), page); }
  
  #toc a[href="#preface"]::after {
  	content: leader(".") target-counter(attr(href), page, lower-roman); }
  
  #toc  a {
  	color: #000; }
  
  #toc > li {
  	margin: 0.2em 0; 
  	line-height: 1.2em;
  	font-weight: bold;
  	padding-bottom: 0.4em;
  	font-size: 110%;
  }
  
  #toc > li > ul > li {
  	font-weight: normal;
  	font-size: 100%;
  }
  
  #toc li li li li li li {
  	display: none; /* None sane of mind would EVER want more than five TOC levels. */
  }
  
  #toc > li  {
  	counter-increment: toc1;
  	counter-reset: toc2;
  }
  #toc > li > a::before {
    content: counter(toc1) " ";
  }
  #toc > li > a[href="#preface"]::before {
  	counter-reset: toc1;
  	content: "";
  }
  #toc > li > ul > li {
  	counter-increment: toc2;
  	counter-reset: toc3;
  }
  #toc > li > ul > li > a::before {
    content: counter(toc1) "." counter(toc2) " "; 
  }
  
  #toc > li > ul > li > ul > li {
  	counter-increment: toc3;
  	counter-reset: toc4;
  }
  #toc > li > ul > li > ul > li > a::before {
    content: counter(toc1) "." counter(toc2) "." counter(toc3) " "; 
  }
  #toc > li > ul > li > ul > li > ul > li {
  	counter-increment: toc4;
  	counter-reset: toc5;
  }
  #toc > li > ul > li > ul > li > ul > li > a::before {
    content: counter(toc1) "." counter(toc2) "." counter(toc3) "." counter(toc4) " "; 
  }
  #toc > li > ul > li > ul > li > ul > li > ul > li {
  	counter-increment: toc5;
  	counter-reset: toc6;
  }
  #toc > li > ul > li > ul > li > ul > li > ul > li > a::before {
    content: counter(toc1) "." counter(toc2) "." counter(toc3) "." counter(toc4) "." counter(toc5) " "; 
  }

  a[href="#document-top"] {
    display: none;
  }

  h1 {
    margin-bottom: 50px;
    border-bottom: 0;
  }

  h2 {
    margin-bottom: 30px;
    page-break-before: always;
    border-bottom: 0;
    
  }

  h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  @page {
	  size: A4;
	  margin: 50pt 30pt 50pt 30pt;
    padding-top: 20pt;
    @bottom-right {
		  content: counter(page); 
		  font-family: 'sans-serif';
		  font-size: 0.8em;
	  }
  } 
}