Skip to content

Commit a5a7294

Browse files
committed
Apply consistent font to header links & button. Vertically center header.
The header is using default browser fonts, which was OK but with [New document] now being a button it got different font from the other links. Experimented with same serif fonts as the editor but felt sans-serif is better; looked at rhythmus's redesign #45 which uses sans and stole his fonts. [Reminder to self: stop goofing around adding bugs and merge most of his design.] Also improved vertical centering of header (the float: right half was really off in firefox). Used simplest height = line-height technique (http://stackoverflow.com/a/8865463/239657) which is not fully robust.
1 parent dcac759 commit a5a7294

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
<span style="float: right">
7070
<a href="?doc=help" target="_blank">Help</a>
7171
|
72-
<button onclick="newPad()" class="call_to_action">New document</button>
72+
<button onclick="newPad()" class="call_to_action" id="new">New document</button>
7373
</span>
7474
</div>
7575
<div id="status_container">

mathdown.css

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
#header { font-size: 200%; }
1+
#header {
2+
font-size: 200%;
3+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
4+
/* Vertically center, if we're lucky to fit. */
5+
line-height: 3ex;
6+
height: 3ex;
7+
}
8+
29
#logo {
310
font-size: 50%; /* Fit 2-line math within single-line header */
411
color: black; text-decoration: none; /* Don't look like a link */
@@ -7,7 +14,7 @@
714
.warning { color: orange; }
815
.call_to_action {
916
font-weight: bold;
10-
font-size: inherit; /* avoid browser <button> small font */
17+
font-size: inherit; font-family: inherit; /* avoid parts of browser <button> styling */
1118
text-decoration: none;
1219
/*color: black; background-color: springgreen;
1320
padding: 0 0.5em; border-radius: 0.5ex; border-style: outset;*/

0 commit comments

Comments
 (0)