Skip to content

Instantly share code, notes, and snippets.

@dfeng
Created September 14, 2015 20:16
Show Gist options
  • Select an option

  • Save dfeng/32a6c492d997462b75dd to your computer and use it in GitHub Desktop.

Select an option

Save dfeng/32a6c492d997462b75dd to your computer and use it in GitHub Desktop.
Tufter Handout Custom CSS
.caption {
font-size: smaller;
}
html {
min-width: 1040px;
}
h1 { font-style: italic;
font-weight: 400;
margin-top: 8rem;
margin-bottom: 4rem;
font-size: 5rem;
line-height: 1; }
h2 { font-style: italic;
font-weight: 400;
margin-top: 3rem;
margin-bottom: 1.5rem;
font-size: 2rem;
line-height: 1;
padding-top: 1rem;}
h3 { font-style: italic;
font-weight: 400;
font-size: 1.7rem;
margin-top: 3rem;
margin-bottom: 1.5rem;
line-height: 1; }
/*ul { font-style: italic;
font-weight: 400;
line-height: 1; }
*/
body {
background: #FFF !important;
font-family: Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
color: #333;
margin: 1em auto 4em auto;
position: relative;
/*width: 960px;*/
width: 1080px;
font-size: 15px;
}
header aside,
footer aside {
float: left;
margin-right: .5em;
}
header aside:after,
footer aside:after {
padding-left: .5em;
content: "/";
}
footer {
margin-top: 8em;
}
aside {
font-size: 1.2rem;
line-height: 1.96;
right: 0;
position: absolute;
/*width: 180px;*/
width: 20%;
margin-top: 0;
margin-bottom: 0;
}
aside > pre > code {
font-size: smaller;
line-height: 1em;
}
div > pre, body > pre {
/*width: 720px;*/
width: 75%;
}
aside > pre {
width: 180px;
padding: 5px;
margin: 5px;
}
div > p, li > p {
line-height: 1.5em;
}
div > p, li > p {
/*width: 720px;*/
width: 75%;
}
.fullwidth {
/*width: 960px;*/
width: 100%;
}
body > blockquote {
width: 70%;
}
blockquote q {
display: block;
font-style: oblique;
}
#body li {
width: 75%;
}
pre code {
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 1.2rem;
line-height: 1.6;
}
pre.r {
background: none;
border: none;
}
/* This is where the TOC happens */
/*ul {
list-style:none;
padding-left:0;
margin-top: 20rem;
margin-bottom: 25rem;
line-height: 2;
}
*/
/* TOC */
.sidebar{
margin-top: 13em;
position: fixed;
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
.sidebar>div {
position: fixed;
/*margin-top: -60px;*/
cursor: pointer;
/*margin-left: -5px;*/
font-size: 1em;
color: #111;
}
/* all links */
.sidebar ul>li>a {
color: #555;
border-left: 2px solid transparent;
padding: 4px 20px;
/*font-size: 1em;*/
font-size: 0.7em;
font-weight: 500; /* 700 */
}
/* nested links */
.sidebar ul ul>li>a {
padding-top: 1px;
padding-bottom: 1px;
padding-left: 30px;
/*font-size: 0.9em;*/
font-size: 0.6em;
font-weight: 400;
}
/* active & hover links */
.sidebar ul>.active>a,
.sidebar ul>li>a:hover,
.sidebar ul>li>a:focus {
color: #111; /* 563d7c */
text-decoration: none;
background-color: transparent;
border-left-color: #111;
}
/* all active links */
.sidebar ul>.active>a,
.sidebar ul>.active:hover>a,
.sidebar ul>.active:focus>a {
font-weight: 700;
}
/* nested active links */
.sidebar ul ul>.active>a,
.sidebar ul ul>.active:hover>a,
.sidebar ul ul>.active:focus>a {
font-weight: 500;
}
/* hide inactive nested list */
.sidebar ul ul {
display: none;
}
/* show active nested list */
.sidebar ul>.active>ul {
display: block;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment