2017-10-14 07:09:28 +08:00
|
|
|
html {
|
2015-11-10 23:26:39 +08:00
|
|
|
font-family: "Open Sans", sans-serif
|
|
|
|
color: #333
|
2015-09-19 04:13:55 +08:00
|
|
|
}
|
|
|
|
|
2017-06-05 10:58:51 +08:00
|
|
|
body {
|
|
|
|
margin: 0;
|
2017-09-18 17:18:21 +08:00
|
|
|
font-size: 1rem;
|
2018-01-19 23:41:50 +08:00
|
|
|
overflow-x: hidden;
|
2017-06-05 10:58:51 +08:00
|
|
|
}
|
|
|
|
|
2017-04-13 22:46:54 +08:00
|
|
|
code {
|
CSS: better fallback stack for monospaced fonts
List of system fonts (R, I, B means roman, italic and bold. Ubuntu probably comes with more fonts, but I couldn't find a list to confirm.):
```txt
Windows
----------
Consolas R RI B BI
Courier R
Courier New R RI B BI
Lucida Console R
Mac
----------
Andale Mono R
Courier R RI B BI
Courier New R RI B BI
Menlo R RI B BI
Monaco R
Ubuntu
----------
Ubuntu Mono R RI B BI
DejaVu Sans Mono R RI B BI
```
```css
font-family: Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
```
Consolas and Ubuntu are professionally designed fonts ([Lucas de Groot][1] and [Dalton Maag][2]), with true, calligraphic italic, so they go at the top of the stack.
Menlo is [based on DejaVu Sans Mono][3], the only difference being a few tweaked glyphs, so DejaVu serves as a fallback for it.
As for Courier New, other than being unreadably spindly, it's the default monospaced font in all browsers, so there's no need to include it in the stack.
The `monospace, monospace;` declaration is, by now, [a standard hack][4] that overrides some browsers' behaviour of defaulting the `monospace` elements to smaller font size. Without it, any relative font size you apply to them will be calculated from that reduced size (seems to be 13 px in all browsers).
[1]: https://en.wikipedia.org/wiki/Luc(as)_de_Groot
[2]: https://en.wikipedia.org/wiki/Dalton_Maag
[3]: http://www.leancrew.com/all-this/2009/10/the-compleat-menlovera-sans-comparison/
[4]: https://stackoverflow.com/questions/38781089/font-family-monospace-monospace
2017-05-24 12:07:58 +08:00
|
|
|
font-family: "Source Code Pro", Consolas, "Ubuntu Mono", Menlo, "DejaVu Sans Mono", monospace, monospace;
|
2018-06-20 04:28:23 +08:00
|
|
|
font-size: 0.875em; // please adjust the ace font size accordingly in editor.js
|
2017-04-13 22:46:54 +08:00
|
|
|
}
|
|
|
|
|
2015-09-19 04:13:55 +08:00
|
|
|
.left {
|
2015-11-10 23:26:39 +08:00
|
|
|
float: left
|
2015-09-19 04:13:55 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.right {
|
2015-11-10 23:26:39 +08:00
|
|
|
float: right
|
2015-09-19 04:13:55 +08:00
|
|
|
}
|
2015-11-10 23:26:39 +08:00
|
|
|
|
2015-12-29 19:26:32 +08:00
|
|
|
.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2017-08-08 06:05:33 +08:00
|
|
|
.play-button.hidden {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2015-11-10 23:26:39 +08:00
|
|
|
h2, h3 { margin-top: 2.5em }
|
2015-12-30 22:41:49 +08:00
|
|
|
h4, h5 { margin-top: 2em }
|
|
|
|
|
|
|
|
.header + .header h3, .header + .header h4, .header + .header h5 { margin-top: 1em }
|
2016-01-03 20:47:59 +08:00
|
|
|
|
2018-03-07 21:02:06 +08:00
|
|
|
a.header:target h1:before,
|
|
|
|
a.header:target h2:before,
|
|
|
|
a.header:target h3:before,
|
|
|
|
a.header:target h4:before {
|
|
|
|
display: inline-block;
|
|
|
|
content: "»";
|
|
|
|
margin-left: -30px;
|
|
|
|
width: 30px;
|
|
|
|
}
|
|
|
|
|
2016-01-03 20:47:59 +08:00
|
|
|
table {
|
|
|
|
margin: 0 auto;
|
2016-02-06 01:09:35 +08:00
|
|
|
border-collapse: collapse;
|
2016-01-03 20:47:59 +08:00
|
|
|
|
2016-02-06 01:09:35 +08:00
|
|
|
td {
|
|
|
|
padding: 3px 20px;
|
|
|
|
border: 1px solid;
|
|
|
|
}
|
|
|
|
|
|
|
|
thead {
|
|
|
|
td { font-weight: 700; }
|
|
|
|
}
|
2016-01-03 20:47:59 +08:00
|
|
|
}
|
2018-02-02 20:15:48 +08:00
|
|
|
|
|
|
|
:not(.footnote-definition) + .footnote-definition,
|
|
|
|
.footnote-definition + :not(.footnote-definition) {
|
|
|
|
margin-top: 2em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.footnote-definition {
|
|
|
|
font-size: 0.9em;
|
|
|
|
margin: 0.5em 0;
|
|
|
|
|
|
|
|
p { display: inline; }
|
|
|
|
}
|