Skip to content

Commit

Permalink
Apply consistent font to header links & button. Vertically center hea…
Browse files Browse the repository at this point in the history
…der.

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.
  • Loading branch information
cben committed May 25, 2015
1 parent dcac759 commit a5a7294
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<span style="float: right">
<a href="?doc=help" target="_blank">Help</a>
|
<button onclick="newPad()" class="call_to_action">New document</button>
<button onclick="newPad()" class="call_to_action" id="new">New document</button>
</span>
</div>
<div id="status_container">
Expand Down
11 changes: 9 additions & 2 deletions mathdown.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
#header { font-size: 200%; }
#header {
font-size: 200%;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
/* Vertically center, if we're lucky to fit. */
line-height: 3ex;
height: 3ex;
}

#logo {
font-size: 50%; /* Fit 2-line math within single-line header */
color: black; text-decoration: none; /* Don't look like a link */
Expand All @@ -7,7 +14,7 @@
.warning { color: orange; }
.call_to_action {
font-weight: bold;
font-size: inherit; /* avoid browser <button> small font */
font-size: inherit; font-family: inherit; /* avoid parts of browser <button> styling */
text-decoration: none;
/*color: black; background-color: springgreen;
padding: 0 0.5em; border-radius: 0.5ex; border-style: outset;*/
Expand Down

0 comments on commit a5a7294

Please sign in to comment.