Bastien <bastien.gue...@wikimedia.fr> writes:

> Christian Egli <christian.e...@sbszh.ch> writes:
>
>> What I'd like to see is something more aligned with the css for asciidoc
>> which makes for a very pleasant and readable experience.
>
> Yes, the CSS behind asciidoc is neat.
>
>> Unfortunatelly my expertise is limited to trial and error when it
>> comes to css.
>
> Trial and error will be very useful for suggested CSS.

Actually, come to think of it: I had totally forgotten that I once took
the css from org
(http://repo.or.cz/w/org-mode.git/blob/HEAD:/ORGWEBPAGE/org.css) and
added some asciidoc styling to it. An example output can be seen at
http://www.daisyproducer.org/. It is in a "works for me" state, I think
I probably hard coded some assumptions I had on my side.

The css is attached. 

If there is demand I could merge it with the original org.css or create
a patch.

Thanks
Christian

@media all
{
body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

tt {
  color: navy;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  font-family: sans-serif;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}

div.sectionbody {
  font-family: serif;
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}

pre {
  padding: 0;
  margin: 0;
}

#table-of-contents {
    font-size: 85%;
    line-height: 1.4em;
}

#table-of-contents ul {
    list-style: none;
    margin: 7px 0px 7px 15px ;
    padding: 0px;
}

div.content { /* Block element content. */
  padding: 0;
}

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}

table {
    border:3px solid #527bbd;
    border-left-style:none;
    border-right-style:none;
    margin-bottom:1.5em;
    margin-top:0.25em;
}
thead {
  font-family: sans-serif;
  font-weight: bold;
  border-bottom: 3px solid #527bbd;
}
tfoot {
  font-weight: bold;
}
th, td {
    border-bottom: 1px solid #527bbd;
}
tbody tr:hover {
    color: #527bbd;
}

code {font-size: 10pt;}

img {
    border: none;
}

.share img {
    opacity: .4;
    -moz-opacity: .4;
    filter: alpha(opacity=40);
}

.share img:hover {
    opacity: 1;
    -moz-opacity: 1;
    filter: alpha(opacity=100);
}


}  /* END OF @media all */


@media screen
{
  body {
	margin: 10px 6% 10px 180px;
	font-family: serif;
  }

  .logo-link {
    position: fixed;
    top: 10px;
    left: 30px;
  }

  #table-of-contents {
	position: fixed;
	display: block;
	left: 10px;
	width: 150px;
	min-height:60px;
	max-height:90%;
	overflow:auto;
  }

  #table-of-contents h2 {
	display:none;
  }



  /* These style are only for IE: */

  * html {
    overflow-y: hidden;
    padding-bottom:0px;
    margin:0px;
  }

  * html body {
    height: 100%;
    overflow-y: auto;
    font-size: 100%;
    margin: 0px 0px 0px 180px;
    padding: 0px 10% 0px 0px;
  }

  * html #table-of-contents {
    position: absolute;
    width:150px;
  }

  * html h1 {
    margin-top:10px;
  }

  * html .logo-link {
    position: absolute;
    top: 10px;
    left: 30px;
  }

}  /* END OF @media screen */




/* Printing */



@page
{
	margin-top:3cm;
    margin-bottom:2.5cm;
}

@page :left
{
  margin-left:1.5cm;
  margin-right:2cm;
}

@page :right
{
  margin-left:2cm;
  margin-right:1.5cm;
}


@media print
{
  body {
	margin:0px;
	font-family: Verdana, Helvetica, sans-serif;
  }

  div {
    orphans:2;
  }

  p {
    orphans:2;
  }

  li {
    orphans:2;
  }

  .logo-link {
    top: 10px;
    left: 30px;
  }

  #table-of-contents h2 {
    margin-top:1.5cm;
    page-break-before:auto;
    border-style:none;
  }

  #text-table-of-contents {
    width:50%;
    margin-top:1cm;
    margin-left:0cm;
    margin-right:auto;
    text-align:left;
  }

  #table-of-contents ul {
    text-align:left;
  }

  h2 {
    /* page-break-before:always; */
  }

  pre {
    page-break-inside:avoid;
  }

  /* Hide all org-info.js stuff for printing: */

  div#org-info-js_console-container {
    display:none;
  }

  div.org-info-js_local-toc {
    display:none;
  }

  table.org-info-js_info-navigation {
    display:none;
  }
  div.org-info-js_header-navigation {
    display:none;
    visibility:hidden; /* needed to overwrite the hardcoded style setting... */
  }

}  /* END OF @media print */
-- 
Christian Egli
Swiss Library for the Blind, Visually Impaired and Print Disabled
Grubenstrasse 12, CH-8045 Zürich, Switzerland
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to