Skip to content

Instantly share code, notes, and snippets.

@caraya
Created March 20, 2019 04:52
Show Gist options
  • Save caraya/8d12c8bbfb07681b4d5b56dfeecc88bc to your computer and use it in GitHub Desktop.
Save caraya/8d12c8bbfb07681b4d5b56dfeecc88bc to your computer and use it in GitHub Desktop.
/* Monospaced font for code samples */
@font-face {
font-family: "notomono_regular";
src: url("../fonts/notomono-regular.eot");
src: url("../fonts/notomono-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/notomono-regular.woff2") format("woff2"), url("../fonts/notomono-regular.woff") format("woff"), url("../fonts/notomono-regular.ttf") format("truetype"), url("../fonts/notomono-regular.svg#notomono_regular") format("svg");
font-weight: normal;
font-style: normal;
}
/* Regular font */
@font-face {
font-family: "notosans-regular";
src: url("../fonts/notosans-regular.eot");
src: url("../fonts/notosans-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/notosans-regular.woff2") format("woff2"), url("../fonts/notosans-regular.woff") format("woff"), url("../fonts/notosans-regular.ttf") format("truetype"), url("../fonts/notosans-regular.svg#notosans-regular") format("svg");
font-weight: normal;
font-style: normal;
}
/* Bold font */
@font-face {
font-family: "notosans-bold";
src: url("../fonts/notosans-bold.eot");
src: url("../fonts/notosans-bold.eot?#iefix") format("embedded-opentype"), url("../fonts/notosans-bold.woff2") format("woff2"), url("../fonts/notosans-bold.woff") format("woff"), url("../fonts/notosans-bold.ttf") format("truetype"), url("../fonts/notosans-bold.svg#notosans-bold") format("svg");
font-weight: 700;
font-style: normal;
}
/* Italic Font */
@font-face {
font-family: "notosans-italics";
src: url("../fonts/notosans-italic.eot");
src: url("../fonts/notosans-italic.eot?#iefix") format("embedded-opentype"), url("../fonts/notosans-italic.woff2") format("woff2"), url("../fonts/notosans-italic.woff") format("woff"), url("../fonts/notosans-italic.ttf") format("truetype"), url("../fonts/notosans-italic.svg#notosans-italics") format("svg");
font-weight: normal;
font-style: italic;
}
/* bold-italic font */
@font-face {
font-family: "notosans-bolditalic";
src: url("../fonts/notosans-bolditalic.eot");
src: url("../fonts/notosans-bolditalic.eot?#iefix") format("embedded-opentype"), url("../fonts/notosans-bolditalic.woff2") format("woff2"), url("../fonts/notosans-bolditalic.woff") format("woff"), url("../fonts/notosans-bolditalic.ttf") format("truetype"), url("../fonts/notosans-bolditalic.svg#notosans-bolditalic") format("svg");
font-weight: 700;
font-style: italic;
}
aside {
border-bottom: 3px double #222023;
border-top: 3px double #222023;
color: #403f4e;
line-height: 1.5em;
padding-bottom: .5em;
padding-top: .5em;
width: 100%;
}
aside h3 {
text-align: center;
}
aside .pull {
margin-bottom: .5em;
margin-left: -20%;
margin-top: .2em;
}
aside .lowlight {
opacity: .3;
}
aside .lowlight :hover {
opacity: 1;
}
.opening {
border-bottom: 3px double #000;
border-top: 3px double #000;
font-size: 2em;
margin-bottom: 10em;
padding-bottom: 2em;
padding-top: 2em;
text-align: center;
}
blockquote {
border-left: 5px solid #ccc;
color: #222023;
font-weight: 100;
margin-bottom: 1.2em;
margin-left: 4em;
margin-right: 4em;
margin-top: 2em;
}
blockquote p {
padding-left: 1em;
}
.pullquote {
border-bottom: 18px solid #000;
border-top: 18px solid #000;
font-size: 36px;
font-weight: 700;
letter-spacing: -.02em;
line-height: 38px;
margin-right: 100px;
padding: 20px 0;
position: relative;
width: 200px;
}
.pullquote p {
color: #00298a;
font-weight: 700;
position: relative;
text-transform: uppercase;
z-index: 1;
}
.pullquote p:last-child {
line-height: 20px;
padding-top: 2px;
}
.pullquote cite {
color: #333;
font-size: 18px;
font-weight: 400;
}
.margin-notes,
.content-left {
clear: both;
display: block;
float: left;
font-size: .75em;
margin: 1em;
width: 40%;
}
.margin-notes h3,
.content-left h3 {
text-align: center;
}
.margin-notes-right,
.content-right {
clear: both;
display: block;
float: right;
font-size: .75em;
margin: 1em;
width: 40%;
}
.margin-notes-right h3,
.content-right h3 {
text-align: center;
}
.margin-notes-right > p:last-of-type,
.content-right > p:last-of-type {
clear: both;
float: right;
}
.margin-notes-left > p:last-of-type,
.content-left > p:last-of-type {
clear: both;
float: left;
}
.content-right ul,
.content-left ul {
list-style: none;
}
p {
font-size: 1em;
margin-bottom: 1.3em;
}
p + p {
text-indent: 2em;
}
.first-line {
font-size: 1.1em;
text-indent: 0;
text-transform: uppercase;
}
.first-letter {
float: left;
font-size: 7em;
line-height: .8em;
margin-bottom: -.1em;
padding-right: .1em;
}
ul li {
list-style: square;
}
ol li {
list-style: decimal;
}
h1 {
font-size: 3em;
line-height: 1.05;
}
@media screen and (min-width: 37.5em) and (max-width: 50em) and (-webkit-min-device-pixel-ratio: 1) {
h1 {
font-size: 2.5em;
line-height: 1.125;
}
}
@media screen and (min-width: 20em) and (max-width: 37.5em) and (-webkit-min-device-pixel-ratio: 1) {
h1 {
font-size: 2em;
line-height: 1.25;
}
}
h2 {
font-size: 2.25em;
line-height: 1.25;
}
@media screen and (min-width: 37.5em) and (max-width: 50em) and (-webkit-min-device-pixel-ratio: 1) {
h2 {
font-size: 2em;
line-height: 1.25;
}
}
@media screen and (min-width: 20em) and (max-width: 37.5em) and (-webkit-min-device-pixel-ratio: 1) {
h2 {
font-size: 1.625em;
line-height: 1.15384615;
}
}
h3 {
font-size: 1.75em;
line-height: 1.25;
}
@media screen and (min-width: 37.5em) and (max-width: 50em) and (-webkit-min-device-pixel-ratio: 1) {
h3 {
font-size: 1.5em;
line-height: 1.25;
}
}
@media screen and (min-width: 20em) and (max-width: 37.5em) and (-webkit-min-device-pixel-ratio: 1) {
h3 {
font-size: 1.375em;
line-height: 1.13636364;
}
}
h4 {
font-size: 1.125em;
line-height: 1.25;
}
@media screen and (min-width: 37.5em) and (max-width: 50em) and (-webkit-min-device-pixel-ratio: 1) {
h4 {
font-size: 1.125em;
line-height: 1.222222;
}
}
@media screen and (min-width: 20em) and (max-width: 37.5em) and (-webkit-min-device-pixel-ratio: 1) {
h4 {
font-size: 1.125em;
line-height: 1.111111;
}
}
h5 {
font-size: ms(2);
line-height: 1.25;
}
h6 {
font-size: ms(1);
line-height: 1.25;
}
.container {
width: 100%;
}
@page {
size: 8.5in 11in;
margin: 0.5in 1in;
/* Footnote related attributes */
@footnote {
border-top: 1px solid black;
padding-top: 6pt;
counter-increment: footnote;
float: bottom;
column-span: all;
height: auto;
}
}
body[data-type="article"] {
font-family: notosans-regular, Verdana, sans-serif;
font-size: 12pt;
line-height: 1.375;
orphans: 4;
widows: 2;
page: article;
page-break-before: always;
page-break-after: always;
}
section[data-type='bibliography'] {
font-family: notosans-regular, Verdana, sans-serif;
font-size: 12pt;
line-height: 1.375;
orphans: 4;
widows: 2;
page: bibliography;
page-break-before: always;
page-break-after: always;
}
section[data-type='bibliography'] p {
text-align: left;
text-indent: 0 !important;
}
h1, h2, h3, h4, h5, h6,
p, li, dt, dd, figcaption {
font-family: notosans-regular, Verdana, sans-serif;
}
pre, code {
font-family: notomono_regular, Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
}
p b,
p strong,
strong, b {
font-family: notosans-bold, Verdana, sans-serif;
}
em, i,
i, em,
p em, p i {
font-family: notosans-italic, Verdana, sans-serif;
}
table, thead, tbody, tr, th, td {
border: 1px solid black;
border-collapse: collapse;
padding: .5em;
}
thead tr th {
font-weight: bold;
padding: .5em;
text-align: center;
}
@page article:left {
@bottom-right {
content: counter(page);
}
}
@page article:right {
@bottom-right {
content: counter(page);
}
}
@page bibliography:left {
@bottom-right {
content: counter(page);
}
}
@page bibliography:right {
@bottom-right {
content: counter(page);
}
}
@page article:blank {
/* Need this to clean up page numbers in titlepage in Prince*/
@top-center {
content: "This page is intentionally left blank";
}
@bottom-left-corner {
content: normal;
}
@bottom-right-corner {
content: normal;
}
}
/* Footnotes */
span.footnote {
float: footnote;
display: prince-footnote;
}
::footnote-marker {
font-family: notosans-regular, verdana, sans-serif;
content: counter(footnote) ". ";
list-style-position: inside;
}
::footnote-call {
content: counter(footnote);
vertical-align: super;
font-size: 65%;
}
/* XReferences */
a.xref[href]::after {
content: " [See page " target-counter(attr(href), page) "]";
}
/* PDF BOOKMARKS */
body[data-type='article'] h1 {
-ah-bookmark-level: 1;
-ah-bookmark-state: open;
-ah-bookmark-label: content();
prince-bookmark-level: 1;
prince-bookmark-state: open;
prince-bookmark-label: content();
}
body[data-type='article'] h2 {
-ah-bookmark-level: 2;
-ah-bookmark-state: open;
-ah-bookmark-label: content();
prince-bookmark-level: 2;
prince-bookmark-state: open;
prince-bookmark-label: content();
}
body[data-type='article'] h3 {
-ah-bookmark-level: 3;
-ah-bookmark-state: open;
-ah-bookmark-label: content();
prince-bookmark-level: 3;
prince-bookmark-state: open;
prince-bookmark-label: content();
}
body[data-type='article'] h4 {
-ah-bookmark-level: 4;
prince-bookmark-level: 4;
}
body[data-type='article'] h5 {
-ah-bookmark-level: 5;
prince-bookmark-level: 5;
}
body[data-type='article'] h6 {
-ah-bookmark-level: 6;
prince-bookmark-level: 6;
}
small,
.font-small {
font-size: .833em;
}
.justified {
text-align: justify;
}
pre {
background-color: #ddd;
padding: 1em;
overflow-wrap: break-word;
white-space: pre-wrap;
word-wrap: break-word;
}
.footnote {
font-family: notosans-regular, verdana, sans-serif;
}
figure {
counter-increment: figure-count;
margin: 12pt 0;
max-width: min-content;
}
figure img {
max-width: auto;
max-height: auto;
}
figure figcaption {
font-size: .75rem;
color: #333333;
}
figure figcaption::before {
content: "Figure " counter(figure-count) ": ";
max-width: min-content;
}
/* Informational messages */
.message {
border: 1px solid black;
border-radius: 10px;
display: block;
padding: .5em;
margin: 1em 0;
}
.message.info {
background-color: lightblue;
}
.message.warning {
background-color: lightyellow;
}
.message.danger {
background-color: indianred;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment