Skip to content

Commit

Permalink
Merge pull request #35 from opentorah/css-cleanup
Browse files Browse the repository at this point in the history
Further clean-up of the CETEIcean.css
  • Loading branch information
raffazizzi authored Jun 19, 2020
2 parents af3ee68 + 6628ece commit f623433
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/CETEI.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ processElement(elt) {
// Given a qualified name (e.g. tei:text), return the element name
tagName(name) {
if (name.includes(":"), 1) {
return name.replace(/:/,"-").toLowerCase();;
return name.replace(/:/,"-").toLowerCase();
} else {
return "ceteicean-" + name.toLowerCase();
}
Expand Down
76 changes: 38 additions & 38 deletions test/CETEIcean.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,27 @@
/* on TEI Boilerplate */

/* language support */
/* render Arabic, Persian, Ottoman, Hebrew as rtl */
/* render Arabic, Persian, Ottoman, Hebrew and Yiddish as rtl */
[lang = "ar"],
[lang = "ota"],
[lang = "fa"],
[lang = "he"],
[lang = "yi"],
[lang *="-Arab-AR"]{
direction:rtl;
text-align:right;
direction:rtl;
text-align:right;
}
/* display latin scripts as ltr */
/* display latin and some other scripts as ltr */
[lang = "en"],
[lang = "fr"],
[lang = "de"],
[lang = "it"],
[lang = "ru"],
[lang = "pl"],
[lang *="ar-Latn-"],
[lang *="ota-Latn-"]{
direction:ltr;
text-align:left;
direction:ltr;
text-align:left;
}

/* Choice elements */
Expand All @@ -46,10 +49,10 @@ tei-ab {
margin-top: 1em;
margin-bottom: 1em;
}
tei-accMat {
tei-accmat {
display: block;
}
tei-accMat:before {
tei-accmat:before {
content: "accompanying materials: ";
}
tei-acquisition {
Expand Down Expand Up @@ -88,22 +91,22 @@ tei-additions {
tei-additions:before {
content: "Significant additions within the document: ";
}
tei-addrLine {
tei-addrline {
display: block;
}
tei-address[data-tei-rend~="block"], addresss[data-tei-rendition~="#block"] {
tei-address[data-tei-rend~="block"], tei-addresss[data-tei-rendition~="#block"] {
display: block;
}
tei-adminInfo {
tei-admininfo {
display: block;
}
tei-app tei-note {
display: none;
}
tei-appInfo {
tei-appinfo {
display: block;
}
tei-appInfo:before {
tei-appinfo:before {
content: "Application information: ";
}
tei-application {
Expand Down Expand Up @@ -145,7 +148,7 @@ tei-bibl[data-tei-rend~="block"], bibl[data-tei-rendition~="#block"] {
padding-left: 2em;
text-indent: -2em;
}
tei-biblFull {
tei-biblfull {
display: block;
}
tei-binding {
Expand All @@ -172,7 +175,7 @@ tei-birth:before {
content: "Birth: ";
}
/* c */
tei-cRefPattern {
tei-crefpattern {
display: none;
}
tei-caption {
Expand Down Expand Up @@ -409,7 +412,7 @@ tei-item {
display: list-item;
margin-left: 1em;
}
tei-cell item {
tei-cell tei-item {
margin-left: 1em;
}

Expand Down Expand Up @@ -499,7 +502,7 @@ tei-listapp {
tei-listbibl {
display:block;
list-style-type: none;
margin-left: .5 em;
margin-left: .5em;
margin-top: .5em;
}
tei-listbibl > tei-head {
Expand Down Expand Up @@ -544,10 +547,10 @@ tei-milestone {
margin-right: auto;
text-align: center;
}
tei-musicNotation {
tei-musicnotation {
font-weight: bold;
}
tei-musicNotation:before {
tei-musicnotation:before {
font-weight: bold;
content: "Musical Notation: ";
}
Expand All @@ -562,10 +565,10 @@ tei-notesstmt {
tei-ovar {
font-style: italic;
}
tei-origPlace {
tei-origplace {
font-weight: bold;
}
tei-origPlace:before {
tei-origplace:before {
font-weight: bold;
content: "Place of Origin: ";
}
Expand All @@ -577,10 +580,10 @@ tei-p {
margin-bottom: 1em;
text-align: justify;
}
*[data-tei-rendition~="#center"] p {
*[data-tei-rendition~="#center"] tei-p {
text-align: center;
}
tei-availability > p:first-child {
tei-availability > tei-p:first-child {
margin-top: 0em;
}
tei-performance {
Expand All @@ -593,7 +596,7 @@ tei-person {
margin-top: 1em;
margin-bottom: 1em;
}
tei-personGrp {
tei-persongrp {
display: block;
margin-top: 1em;
margin-bottom: 1em;
Expand Down Expand Up @@ -718,7 +721,7 @@ tei-sealdesc {
margin-top: 1em;
margin-bottom: 1em;
}
tei-secFol:before {
tei-secfol:before {
font-weight: bold;
content: "Second Folio: ";
}
Expand Down Expand Up @@ -750,19 +753,19 @@ tei-signed {
display: block;
margin-top: 2em;
}
tei-soCalled {
tei-socalled {
quotes: "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d" "\2018" "\2019" "\201c" "\201d";
}
tei-soCalled:before {
tei-socalled:before {
content: open-quote;
}
tei-soCalled:after {
tei-socalled:after {
content: close-quote;
}
tei-soCalled[data-tei-next]:after {
tei-socalled[data-tei-next]:after {
content: "" !important;
}
tei-soCalled[data-tei-prev]:before {
tei-socalled[data-tei-prev]:before {
content: "" !important;
}
tei-sound {
Expand Down Expand Up @@ -828,8 +831,6 @@ tei-table {
display: block;
border-top: thin solid black;
border-left: thin solid black;
}
tei-table {
margin-top: 2em;
margin-bottom: 2em;
font-size: 12pt;
Expand Down Expand Up @@ -898,14 +899,9 @@ tei-witdetail {
display:none;
}

/* styles for HTML shell and HTML elements in TEI (e.g.,<a> and <img>) */
html > body {
margin: 0;
padding: 0;
}
/* styles for the HTML shell */
html {
margin: 0;
padding: 0;
margin-left: 2em;
margin-right: 4em;
padding: 2.5em;
Expand All @@ -914,3 +910,7 @@ html {
background-color: white;
color: #292929;
}
html > body {
margin: 0;
padding: 0;
}
1 change: 0 additions & 1 deletion test/EEBOTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ <h1>Loading...</h1>
CETEIcean.getHTML5('https://raw.githubusercontent.com/textcreationpartnership/A00689/master/A00689.xml', function(data) {
document.getElementById("TEI").innerHTML = "";
document.getElementById("TEI").appendChild(data);
CETEIcean.addStyle(document, data);
// Fix combining abbreviation marker in Chrome
if (!!window.chrome) {
var gs = document.getElementsByTagName("tei-g");
Expand Down
1 change: 0 additions & 1 deletion test/externalgetTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

CETEIcean.makeHTML5(TEI, function(data) {
document.getElementById("TEI").appendChild(data);
CETEIcean.addStyle(document, data);
});
}
};
Expand Down

0 comments on commit f623433

Please sign in to comment.