Permalink
Browse files

Fixes #2 — CSS used in preview & print doesn't match the one used for…

… HTML export
  • Loading branch information...
1 parent a63c2a1 commit 939d3fd376cbd761c20438715fad6a9f6d1e66bb @dmfrancisco committed Jul 17, 2011
Showing with 33 additions and 10 deletions.
  1. +0 −6 public/css/_escrito.less
  2. +33 −4 public/js/script.js
View
@@ -162,12 +162,6 @@
#paper p img {
margin: 0;
}
-#paper a {
- color: #261a3b;
-}
-#paper a:visited {
- color: #261a3b;
-}
#paper pre, #paper tt, #paper code {
font-size: 12px; line-height: 18px;
font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace;
View
@@ -396,12 +396,41 @@ var escrito = function () {
function saveHtml() {
var attrs = [
- " <style type=\"text/css\">",
+ " <style>",
" body { margin: 50px; font: 16px 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; }",
- " p { text-align: justify; }",
- " a { color: #261a3b; }",
- " a:visited { color: #261a3b; }",
+ " h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight:inherit; }",
+ " p { text-align:justify; line-height:26px; color:#222; }",
+ " p img { margin:0; }",
" pre, tt, code { font: 12px Menlo, Monaco, Consolas, 'Lucida Console', monospace; }",
+ " hr { border:solid #ddd; border-width:1px 0 0; clear:both; margin:10px 0 30px; height:0; }",
+ " /* Tables */",
+ " table { font-size:14px; border-collapse:collapse; text-align:left; margin-bottom:30px; }",
+ " th { font-size:17px; font-weight:normal; border-bottom:2px solid #222; padding:10px 8px; }",
+ " td { padding:10px 8px 0; }",
+ " /* Blockquotes (from getskeleton.com) */",
+ " blockquote, blockquote p { font-size:17px; line-height:24px; color:#444; font-style:italic; }",
+ " blockquote { margin:0 0 20px; padding:0 0 0 19px; border-left:1px solid #ddd; }",
+ " blockquote cite { display:block; font-size:12px; color:#444; }",
+ " blockquote cite a, blockquote cite a:visited, blockquote cite a:visited { color:#444; }",
+ " /* Links (from getskeleton.com) */",
+ " a, a:visited { color:#333; text-decoration:underline; outline:0; }",
+ " a:hover, a:focus { color:#000; }",
+ " p a, p a:visited { line-height:inherit; }",
+ " /* Lists (from getskeleton.com) */",
+ " ul, ol { margin-bottom:20px; }",
+ " ul { list-style:square outside; }",
+ " ol { list-style:decimal; }",
+ " ol, ul.square, ul.circle, ul.disc { margin-left:30px; }",
+ " ul.square { list-style:square outside; }",
+ " ul.circle { list-style:circle outside; }",
+ " ul.disc { list-style:disc outside; }",
+ " ul ul, ul ol,",
+ " ol ol, ol ul { margin:4px 0 5px 30px; font-size:90%; }",
+ " ul ul li, ul ol li,",
+ " ol ol li, ol ul li { margin-bottom:6px; }",
+ " li { line-height:24px; margin-bottom:12px; }",
+ " ul.large li { line-height:21px; }",
+ " li p { line-height:21px; }",
" </style>"
], uriContent = "data:application/octet-stream," +
encodeURIComponent("<html>\n<head>\n <meta charset=\"UTF-8\">\n"+ attrs.join("\n") +"\n<head>\n" +

0 comments on commit 939d3fd

Please sign in to comment.