Skip to content

Commit

Permalink
Start simplifying EPUB output
Browse files Browse the repository at this point in the history
This removes all uses of stRegion and starts simplifying the markup
further. Currently, TOCs are not rendered. The stylesheets need
drastic refactoring for the sake of sanity.

Affects: #13
  • Loading branch information
io7m committed Jun 29, 2021
1 parent 05b1afd commit 70e8d73
Show file tree
Hide file tree
Showing 3 changed files with 271 additions and 110 deletions.
Expand Up @@ -23,14 +23,14 @@
--stVerbatimColor: #202020;
--stVerbatimBorder: 1px solid #dddddd;
--stMetaBorder: 1px solid #dddddd;
--stFontSize: 90%;
--stMetaFontSize: 80%;
--stHeaderFontSize: 100%;
--stFontSize: 100%;
--stMetaFontSize: 90%;
--stHeaderFontSize: 110%;
}

body
{
font-size: var(--stFontSize);

}

h1,
Expand All @@ -46,8 +46,13 @@ h6

#stMain
{
margin-top: var(--stMarginWidth);
margin-right: var(--stMarginWidth);
font-size: var(--stFontSize);
width: 90%;
height: 90%;
margin-left: 5%;
margin-right: 5%;
margin-top: 5%;
margin-bottom: 5%;
}

/*
Expand Down Expand Up @@ -107,25 +112,6 @@ h6
padding-left: 1em;
}

/*
* Standard regions.
*/

.stRegion
{

}
.stRegionMargin
{
width: var(--stMarginWidth);
float: left;
}
.stRegionContent
{
margin-left: var(--stMarginWidth);
margin-bottom: 1em;
}

/*
* Verbatims.
*/
Expand Down Expand Up @@ -186,6 +172,10 @@ h6
-epub-hyphens: auto;
}

.stParagraph + .stParagraph {
margin-top: 1em;
}

/*
* Metadata table
*/
Expand Down Expand Up @@ -220,21 +210,26 @@ h6
}

/*
* Footnote references.
* Footnotes.
*/

.stFootnoteReferences h4,
.stFootnoteReferences a
.stFootnotes table
{
font-size: 80%;
border: var(--stMetaBorder);
width: 100%;
border-collapse: collapse;
}
.stFootnoteReferences ul
.stFootnotes td
{
padding: 0;
margin: 0;
margin-left: 1em;
vertical-align: top;
border: var(--stMetaBorder);
padding: 0.5em;
}
.stFootnoteReferences li > ul
.stFootnoteNumber
{

}
.stFootnoteReferences
{
margin-top: 1em;
}
Expand Up @@ -321,7 +321,7 @@
</xsl:template>

<xsl:mode name="sxc:tableOfContentsOptional"
visibility="final"
visibility="public"
warning-on-no-match="true"/>

<xsl:template match="s70:Section"
Expand Down Expand Up @@ -1282,7 +1282,7 @@
</xsl:template>

<xsl:template name="sxc:footnotes"
visibility="final">
visibility="public">

<xsl:call-template name="sxc:standardRegion">
<xsl:with-param name="class"
Expand Down

0 comments on commit 70e8d73

Please sign in to comment.