0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-10-10 00:25:06 -04:00
Files
nasm/doc/nasmdoc.css
H. Peter Anvin 0e253844da doc: prettify the HTML documentation
- Improve the look of the TOC
- Add some highlight to code blocks

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
2025-09-29 11:28:12 -07:00

207 lines
3.5 KiB
CSS

body {
font-family: "source sans pro", "clear sans", "liberation sans",
"arial", "sans-serif";
background: white;
}
div.title {
text-align: center;
font-weight: bold;
margin: 0.67em 0;
}
h1 {
font-size: 250%;
margin: 0;
}
h2 {
font-size: 200%;
font-weight: bold;
}
h3 {
font-size: 160%;
font-weight: bold;
}
h4 {
font-size: 128%;
font-weight: bold;
}
h5 {
font-size: 100%;
font-weight: bold;
}
h6 {
font-size: 100%;
text-decoration: underline;
}
span.subtitle {
font-size: 1.25em;
font-style: italic;
}
code, pre {
font-family: "source code pro", "liberation mono", "monospace";
font-size: 80%;
}
pre, blockquote {
margin-left: 4em;
margin-right: 4em;
padding: 0.25em 0.4em;
}
pre {
background: #f0f0f0;
}
code {
display: inline;
white-space: nowrap;
/* Extra padding due to monospaced font */
padding-left: 0.2em;
padding-right: 0.2em;
}
a {
text-decoration: none;
}
div.toc ol {
padding-left: 2em;
font-size: 80%;
list-style-type: none;
}
div.toc ol.toc1 {
/* Compensate for the size reduction for each level */
font-size: 150%;
}
/* -- TOC numbering using data-name attribute -- */
ol li[data-name]::marker {
content: attr(data-name) '.';
}
ol.toc1 > li {
padding-left: 1em;
padding-top: 0.7em;
font-weight: bold;
}
ol.toc2 > li {
padding-top: 0.3em;
}
ol.toc2 li {
padding-left: 0.4em;
font-weight: normal;
}
div.toc span.node {
display: none;
}
.index li {
list-style-type: none;
display: flex;
flex-direction: row;
justify-content: space-between;
}
.index .term {
display: inline-block;
text-align: left;
vertical-align: top;
flex: 3 3 0;
}
.index .ref {
width: 30%;
display: inline-block;
text-align: right;
vertical-align: top;
flex: 1 1 0;
}
div.contents {
column-width: 35em;
}
/* This is overridden for @media screen */
ul.navbar {
display: none;
}
@media print {
a {
color: inherit;
}
ul.navbar div.title {
display: none !important;
}
div.index {
-webkit-column-gap: 2em;
-moz-column-gap: 2em;
column-gap: 2em;
-webkit-column-count: 2;
-moz-column-count: 2;
column-count: 2;
}
}
@media screen {
div.contents {
-webkit-column-gap: 4em;
-webkit-column-rule: 1px dotted black;
-moz-column-gap: 4em;
-moz-column-rule: 1px dotted black;
column-gap: 4em;
column-rule: 1px dotted black;
}
}
@media screen {
/* Setting an explicit margin to keep the navbar from moving */
body {
padding: 0;
margin: 8px;
}
/* Link styles */
a:link {
color: #33c;
}
a:visited {
color: #338;
}
a:hover {
background: #ccc;
}
a:active {
color: #f33;
background: #ccc;
}
/* Trick to avoid the navbar hiding the the target of an # link */
:target {
margin-top: -10vh;
padding-top: 10vh;
background: #ffa; /* Highlight the jump target */
background-clip: content-box;
}
ul.navbar {
display: block;
position: sticky;
top: 8px;
width: 100%;
margin: 0;
padding: 0;
overflow: hidden;
white-space: nowrap;
list-style-type: none;
background: #336 url("nasmlogw.png") no-repeat right center;
background-size: contain;
}
ul.navbar li {
float: left;
}
ul.navbar li.last {
border-right: none;
}
ul.navbar a {
border-right: 1px solid #bbb;
display: block;
color: white;
text-align: center;
padding: 1em 1.5em;
text-decoration: none;
}
ul.navbar a:hover {
background-color: #448;
}
.index li:hover {
background: #eef;
}
}