/* * CANADIAN WRITING RESEARCH COLLABORATORY - CSS2 specification for TEI adapted by M. P. Olea from stylesheet by Author: Adrian Edwards (adrian_edwards@yahoo.com) Date: 2000-04-19 Edited by Sebastian Rahtz (sebastian.rahtz@oucs.ox.ac.uk) 2001-05-06 and for Oxygen: 2003-08-29 start of new parent div resets child auto-count. kl 2003-11-06 list attr list-style-type was none, now disc. kl 2007-06 reworking for TEI P5 and oxygen 2023-05-03 Diane Jakacki added display for people and places in LEAF-Writer - see 'DKJ' in comments 2024-11-26 Diane Jakacki added left align for paragraphs (rather than justify) 2026-06-22 James Cummings added tei:ab basic block formatting. 2026-07-04 James Cummings added something which might help format tei:ruby, rb, and rt elements. ********** For comments, questions, and suggestions please contact Susan Brown, CWRC project leader (sbrown@uoguelph.ca) or Mariana Paredes-Olea, CWRC Metadata Coordinator (paredeso@ualberta.ca) ********** * */ /* Use Georgia for default font */ TEI { margin: 10px 25px; font-family: Georgia, serif; line-height: 1.5; } /** JC adding tei:ab basic formatting **/ ab { display: block; margin-bottom: 0.5em; margin-left: 1em; line-height: 1.5em; } abbr { display: inline; } add { display: inline; color: green; background-color: inherit; text-decoration: underline; } /* structuring addName display */ addName { display: block; margin-bottom: 0.5em; } /*address { display : block; margin-top : 2em; margin-left : 2em; margin-right : 2em; margin-bottom : 2em; }*/ addrLine { display: block; white-space: nowrap; } anchor { display: none; } argument { display: block; margin-bottom: 0.5em; } att { display: inline; font-family: sans-serif; color: blue; background-color: inherit; } att:before { content: "@"; } author { display: inline; } back { display: block; border: thin black solid; margin-top: 1em; padding-top: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; } bibl { display: inline; } #comment { color: #08eb03; font-size: smaller } #comment:before { content: "" } div[type = "works"] { text-indent: -2em; margin: 0 0 0 2em; } bibl > note { display: inline; } bibl > title[type = "alternate"] { content: "Alternate Title: " !important; } bibl > title[type = "subtitle"] { content: ""; } argument > bibl, body > bibl, cit > bibl, div > bibl, div0 > bibl, div1 > bibl, div2 > bibl, div3 > bibl, div4 > bibl, div5 > bibl, div6 > bibl, div7 > bibl, epigraph > bibl, listBibl > bibl > bibl, taxonomy > bibl { display: block; margin-bottom: 0.5em; } biblFull { display: inline; } argument > biblFull, body > biblFull, cit > biblFull, div > biblFull, div0 > biblFull, div1 > biblFull, div2 > biblFull, div3 > biblFull, div4 > biblFull, div5 > biblFull, div6 > biblFull, div7 > biblFull, epigraph > biblFull, listBibl > biblFull > biblFull, taxonomy > biblFull { display: block; margin-bottom: 0.5em; } listBibl > bibl { display: block; margin-left: 2em; margin-bottom: 0.5em; text-indent: -2em } biblScope { display: inline; } imprint > biblScope { display: block; } /* DKJ 05/02/2023 structuring birth display */ birth { display: block; margin-bottom: 0.5em; } body { margin-top: 5px; padding: 0 2em 0 0; display: block; counter-reset: div1; } byline { display: block; font-style: italic; margin-bottom: 0.5em; } category { display: block; margin-bottom: 1em; } catRef { display: none; } cell { display: table-cell; border: 1px solid #EEEFEE; padding: 3px; color: inherit; background-color: inherit; } cell[role = 'label'] { color: inherit; background-color: #BBBBBB; } change { display: block; margin-bottom: 1em; margin-left: 2em; } cit { display: inline; } argument > cit, body > cit, div > cit, div0 > cit, div1 > cit, div2 > cit, div3 > cit, div4 > cit, div5 > cit, div6 > cit, div7 > cit, epigraph > cit { display: block; margin-bottom: 0.5em; margin-top: 0.5em; } classCode { display: block; } elementSpec, macroSpec, classSpec { display: block; margin-bottom: 1em; } closer { display: block; margin-bottom: 1em; width: 95%; } code { display: inline; font-family: monospace; } corr { display: inline; color: green; background-color: inherit; } creation { display: block; } date { display: inline; } change > date, publicationStmt > date { display: block; font-weight: bold; } dateline { display: inline; } /* DKJ 05/02/2023 structuring death display */ death { display: block; margin-bottom: 0.5em; } del { display: inline; color: red; background-color: inherit; text-decoration: line-through; } distributor { display: block; margin-bottom: 0.5em; } body > div { display: block; counter-increment: div1; counter-reset: div2; margin: 0 0 1.5em 0; } body > div > div { display: block; margin-bottom: 1em; counter-increment: div2; counter-reset: div3; } body > div > div > div { display: block; margin-bottom: 1em; counter-increment: div3; } body > div[type = "letter"] { margin-bottom: 2em !important; } /* DKJ 06/20/2025: hide counter-reset */ /* div[type = "poem"] { counter-reset: line; }*/ div1 { display: block; margin-bottom: 1em; counter-increment: div1; counter-reset: div2; } div2 { display: block; margin-bottom: 1em; counter-increment: div2; counter-reset: div3; } div3 { display: block; margin-bottom: 1em; counter-increment: div3; counter-reset: div4; } div4 { display: block; margin-bottom: 1em; counter-increment: div4; counter-reset: div5; } div5 { display: block; margin-bottom: 1em; counter-increment: div5; counter-reset: div6; } div6 { display: block; margin-bottom: 1em; counter-increment: div6; counter-reset: div7; } div7 { display: block; margin-bottom: 1em; counter-increment: div7; } divGen { display: none; } docAuthor { display: block; margin-bottom: 0.5em; } byline docAuthor { display: inline; } titlePage docAuthor { } titlePage docTitle { } edition { display: block; margin-bottom: 0.5em; } bibl edition { display: inline; } editionStmt { display: block; margin-bottom: 1em; } editor { display: block; } bibl editor { display: inline; } eg { font-family: monospace; padding-top: 3mm; padding-left: 4pt; padding-bottom: 2pt; display: block; margin-top: 12pt; margin-bottom: 12pt; white-space: pre; color: inherit; background-color: #FFCC99; } argument > eg, body > eg, div > eg, div0 > eg, div1 > eg, div2 > eg, div3 > eg, div4 > eg, div5 > eg, div6 > eg, div7 > eg, epigraph > eg { display: block; margin-bottom: 1em; } emph { display: inline; font-style: italic; } epigraph { display: block; margin-bottom: 1em; text-align: center; } extent { display: block; margin-bottom: 1em; } bibl extent { display: inline; } graphic { color: gray; background-color: inherit; content: "{" attr(url) "}"; } figure { display: block; margin-bottom: 1em; } foreign { display: inline; font-style: italic; } /* DKJ 05/02/2023 structuring forename display */ forename { display: block; margin-bottom: 0.5em; } formula { display: inline; font-style: italic; } front { display: block; margin-bottom: 1em; padding-top: 0.5em; padding-left: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; } funder { display: block; margin-bottom: 0.5em; } fw { display: block; text-align: center; } gap { display: none; } gap:after { content: "[...]"; font-style: italic; } /* DKJ 05/02/2023 structuring genName display */ genName { display: block; margin-bottom: 0.5em; } gi, tag { display: inline; font-family: sans-serif; color: blue; background-color: inherit; } tag:before, gi:before { content: "<"; } tag:after, gi:after { content: ">"; } gloss { display: inline; } group { display: block; margin-bottom: 1em; } body > div > head { display: block; padding-top: 7px; padding-bottom: 10px; color: inherit; font-weight: bold; margin-bottom: 0.5em; margin-top: 1em; font-size: 18px; } body > div[type = "poem"] > head author { font-weight: normal; } body > div > div > head { display: block; padding-top: 14px; padding-bottom: 10px; padding-left: 10px; color: inherit; /* background-color : #BBBBBB;*/ font-weight: bold; margin-bottom: 0.5em; margin-top: 11px; } body > div > div > div > head { display: block; padding-top: 14px; padding-bottom: 10px; padding-left: 10px; color: inherit; /* background-color : #BBBBBB;*/ font-weight: bold; margin-bottom: 0.5em; margin-top: 1em; } div opener dateline { display: block; text-align: right; width: 95%; } div1 > head:before { /* content : counter(div1) ". "; */ color: black; background-color: inherit; } div2 > head:before { /* content : counter(div1) "." counter(div2) ". "; */ color: black; background-color: inherit; } div3 > head:before { /* content : counter(div1) "." counter(div2) "." counter(div3) ". "; */ color: black; background-color: inherit; } body > div > head:before { /* content : counter(div1) ". "; */ color: black; background-color: inherit; } body > div > div > head:before { /* content : counter(div1) "." counter(div2) ". "; */ color: black; background-color: inherit; } body > div > div > div > head:before { /* content : counter(div1) "." counter(div2) "." counter(div3) ". "; */ color: black; background-color: inherit; } hi { display: inline; background-color: yellow; color: black; } hi[rend] { background-color: inherit; color: inherit; } hi[rend = "bold"] { display: inline; font-weight: bold; } hi[rend = "italic"] { display: inline; font-style: italic; } hi[rend = "underline"] { display: inline; text-decoration: underline; } hi[rend = "it"] { display: inline; font-style: italic; } hi[rend = "sc"] { display: inline; font-variant: small-caps; } hi[rend = "sup"] { display: inline; vertical-align: super; font-size: smaller; } hi[rend = "sub"] { display: inline; vertical-align: sub; font-size: smaller; } hi[rend = "ul"] { display: inline; text-decoration: underline; } ident { display: inline; font-family: monospace; } idno { display: block; margin-bottom: 1em; } bibl idno { display: inline; } imprint { display: inline; } index { display: none; } interp { display: none; } interpGrp { display: none; } list[type = "gloss"] item { display: block; margin-left: 1em; } list item { display: list-item; margin-left: 12pt; } item { display: list-item; margin-left: 12pt; } item[n]:before { content: attr(n) ". "; list-style: none; } /* should there be space after the content? And should default marker be suppressed when there is an @n attribute? --DRS */ change item { display: block; margin-bottom: 0.5em; margin-left: 1em; margin-top: 0.5em; } keywords { display: block; margin-bottom: 0.5em; } kw { display: inline; font-style: italic; } /* DKJ 06/20/2025: hide line numbering for verse because it is distracting */ /* lg l:after { counter-increment: line; content: counter(line); text-align: right; float: right; color: silver; margin-right: 50px; } */ /* JamesC 2026-07-04 adding CSS for line numbering every fifth based entirely on @n attribute existing */ /* Prepare the lines to host absolute-positioned line numbers */ l { display: block; position: relative; white-space: nowrap; padding-left: 3em; /* Creates a gutter on the left for the numbers */ } /* Target only elements where the 'n' attribute ends in '5' or '0' */ l[n$="5"]::before, l[n$="0"]::before { content: attr(n); /* Pulls the actual value of the 'n' attribute */ position: absolute; left: 0; width: 2.5em; text-align: right; color: #888; /* Makes the line numbers a subtle gray */ font-size: 0.85em; font-family: sans-serif; user-select: none; /* Prevents the numbers from being highlighted/copied */ } label { display: inline; font-weight: bold; } Label { display: inline; font-weight: bold; color: #2F4F4F; background-color: inherit; } argument > label, body > label, div > label, div0 > label, div1 > label, div2 > label, div3 > label, div4 > label, div5 > label, div6 > label, div7 > label, epigraph > label { display: block; font-weight: bold; } langUsage { display: block; margin-bottom: 1em; } lb { display: block; } lb:before { content: ""; } lg { display: block; margin-bottom: 0.5em; margin-left: 1em; /* DKJ 06/20/2025: counter-reset: * line; -- hiding counter*/ } list { display: block; list-style-type: disc; list-style-position: outside; margin-bottom: 1em; margin-left: 2em; margin-top: 1em; } list[rend = "runon"] { display: inline; } list[type = "bulleted"] { list-style-type: disc; list-style-position: outside; } list[type = "unordered"] { list-style-type: disc; list-style-position: outside; } list[type = "ordered"] { list-style-type: decimal; list-style-position: outside; } list[type = "numbered"] { list-style-type: decimal; list-style-position: outside; } list[type = "none"] { list-style-type: none; } listBibl { display: block; margin-bottom: 0.5em; } /* DKJ 05/02/2023 structuring listPerson display */ listPerson > person > persName { display: block; margin-bottom: 0.5em; } /* DKJ 05/02/2023 structuring listPlace display */ listPlace > place > pName { display: block; margin-bottom: 0.5em; } mentioned { display: inline; font-style: italic; } milestone { display: none; } name { display: inline; } /* DKJ 05/02/2023 structuring name @type (forename, middlename, surname) display */ name[type = 'forename'] { display: block; margin-bottom: 0.5em; } name[type = 'middlename'] { display: block; margin-bottom: 0.5em; } name[type = 'surname'] { display: block; margin-bottom: 0.5em; } note { display: block; color: #999; } note:before { content: 'note: '; font-variant: small-caps; } note[type]:before { content: attr(type) ': '; } opener note { display: block; color: #999; } /* testing notes for web output */ notes-section { margin-top: 2em; border-top: 1px solid #ccc; padding-top: 1em; } note-item { margin-bottom: 1em; } note-number { font-weight: bold; margin-right: 0.5em; } /* opener note:before { content:''; font-variant:normal; } opener note[type]:before { content:''; } */ /* rules removed to fix: https://github.com/cwrc/CWRC-WriterBase/issues/49 */ note[n]:before { content: attr(n) " "; vertical-align: super; } div note persName, div note orgName, div note title, div note placeName { color: #6DB0CC !important; } note[place = "left"] { float: left; } note[place = "right"] { float: right; } note[place = "inline"], note[place = "unspecified"] { display: inline; } note[place = "inline"]:before { content: '(' } note[place = "inline"]:after { content: ')' } notesStmt { display: block; } num { display: inline; } /* DKJ 05/02/2023: structuring occupation display */ occupation { display: block; margin-bottom: 0.5em; } opener { display: block; margin-bottom: 0.5em; } /*DKJ changed from justify to left aligned */ opener p { text-align : left !important; text-indent : 0 !important; } orig { display: inline; } p { display: block; margin-bottom: 0.5em; } pb { display: block; } pb:before { content: '\00a0'; box-shadow: 0px 1em 0px 1px #000; } pb:after { content: attr(n); box-shadow: 5em 1em 0px 1px #000; text-indent: 30px; } pb:before, pb:after { display: inline-block; height: 0px; width: 35%; position: relative; left: 10%; } /* pb:after { content : attr(n); font-weight : bold; margin-bottom : 1em; margin-top : 1em; text-align : center; }*/ div persName, div placeName, div orgName, div title { color: #336699; } principal { display: block; margin-bottom: 0.5em; } ptr { color: navy; text-decoration: underline; background-color: inherit; } ptr:before { background-color: inherit; color: red; content: "[" attr(target) "]"; } publicationStmt { /* display : block; margin-bottom : 0.5em;*/ } publicationStmt p { display: block; margin-bottom: 0; } publisher { display: inline; } imprint > publisher, publicationStmt > publisher { display: block; margin-bottom: 0.5em; } pubPlace { display: inline; } imprint > pubPlace, publicationStmt > pubPlace { display: block; margin-bottom: 0.5em; } q { display: inline; quotes: '"' '"' "'" "'"; margin-top: 0em; margin-left: 0em; margin-right: 0em; margin-bottom: 0em; } q[rend = "display"], argument > q, body > q, cit > q, div > q, div0 > q, div1 > q, div2 > q, div3 > q, div4 > q, div5 > q, div6 > q, div7 > q, epigraph > q { display: block; margin-bottom: 0.5em; margin-left: 3em; margin-right: 3em; quotes: none; } q:before { content: open-quote; } q:after { content: close-quote; } quote { display: block; margin-left: 1em; margin-bottom: 1em; } ref { display: inline; color: blue; background-color: inherit; } ref:before { color: gray; background-color: inherit; text-decoration: underline; } reg { display: inline; font-style: italic; } rendition { display: block; margin-bottom: 0.5em; } resp { display: block; } respStmt { display: block; margin-left: 1em; } respStmt > name:before { content: attr(role) ": "; display: block !important; font-variant: small-caps; } bibl respStmt { display: inline; } rdg:before { background-color: inherit; content: "[" attr(wit) "] "; color: red; } /* DKJ 05/02/2023 structuring roleName display */ roleName { display: block; margin-bottom: 0.5em; } row { display: table-row; } row[role = 'label'] { color: inherit; background-color: #BBBBBB; } rs { display: inline; } ruby { display: ruby; } rb { display: ruby-base; white-space: nowrap; } rt { display: ruby-text; font-size: 0.55em; /* Standard sizing for legible ruby text */ line-height: 1; ruby-position: over; /* Forces annotations above horizontal text */ ruby-align: space-around; /* Distributes furigana cleanly over the base characters */ } s { display: inline; } salute { display: block; margin-bottom: 0.5em; margin-top: 1em; } samplingDecl { display: block; margin-bottom: 1em; } seg { display: inline; } seriesStmt { display: block; margin-bottom: 1em; } /* DKJ 05/02/2023 structuring sex term display */ sex { display: block; margin-bottom: 0.5em; } sic { display: inline; color: red; background-color: inherit; } sic:after { content: " [sic]"; } signed { display: block; text-align: right; } soCalled { display: inline; font-style: italic; quotes: "'" "'"; } soCalled:before { content: open-quote; } soCalled:after { content: close-quote; } sp { display: block; margin-bottom: 0.5em; margin-left: 2em; } /*DKJ changed from justify to left-aligned div p { text-align : left; text-indent : 30px; } */ speaker { display: inline; font-weight: bold; } sponsor { display: block; margin-bottom: 0.5em; } stage { display: inline; font-style: italic; } /* DKJ 05/02/2023 structuring surname display */ surname { display: block; margin-bottom: 0.5em; } table { text-align: center; display: table; margin: 1em } table > head { display: table-caption; font-style: italic; margin-bottom: 6pt; } tagUsage { display: block; margin-bottom: 0.5em; } taxonomy { display: block; margin-bottom: 0.5em; } term { font-family: sans-serif; color: blue; background-color: inherit; display: inline; } textClass { display: block; margin-bottom: 0.5em; } time { display: inline; } title { display: inline; } title[type = "subtitle"] { display: block; font-weight: normal; } title[level = "m"], title[level = "j"] { font-style: italic; } title[level = "s"] { font-style: normal; } title[level = "a"], title[level = "u"] { font-style: normal; } title[level = "a"]:before, title[level = "u"]:before { content: open-quote; } title[level = "a"]:after, title[level = "u"]:after { content: close-quote; } seriesStmt > title, titleStmt > title { color: gray; font-weight: bold; } titlePage { display: block; border: thin black solid; margin-bottom: 2em; text-align: center; padding-top: 1em; padding-left: 1em; padding-right: 1em; padding-bottom: 1em; } titlePart { display: block; } titleStmt { margin-bottom: 1em; color: #333; } trailer { display: block; margin-bottom: 1em; } unclear { display: inline; color: gray; background-color: inherit; font-style: italic; } /* header-related material */ teiHeader { display: block; color: gray; background-color: rgb(251, 242, 234); padding: .5em; } teiHeader author:before { font-variant: small-caps; content: "author: "; } teiHeader editor:before { font-variant: small-caps; content: "editor: "; } teiHeader title { color: gray; } titleStmt > author { display: block; margin-left: 1em; } authority { display: block; margin-bottom: 0.5em; } availability { display: block; margin-bottom: 0.5em; } fileDesc { /* display : block; margin-bottom : .5em;*/ } sourceDesc { /* display : block; border : thin silver solid; padding : .5em .5em 0 .5em;*/ } sourceDesc p { margin: 0; } revisionDesc { display: block; margin-bottom: 1em; } catDesc { display: block; margin-bottom: 0.5em; } encodingDesc { display: block; margin-bottom: 1em; } profileDesc { display: block; margin-bottom: 1em; } projectDesc { display: block; margin-bottom: 1em; } docDate { display: block; margin-bottom: 0.5em; } docImprint docDate { display: inline; } docEdition { display: block; margin-bottom: 0.5em; } docImprint { display: block; margin-bottom: 0.5em; } docTitle { display: block; font-weight: bold; margin-bottom: 0.5em; font-weight: bold; } /* OUCS additions */ /*Button { font-family : monospace; color : red; font-weight : bold; background-color : rgb(75%, 75%, 75%) } Value { font-family : monospace; color : rgb(255, 102, 0); background-color : inherit; } Code { font-family : monospace; color : red; background-color : inherit; } Field { font-family : monospace; color : red; background-color : inherit; } Filespec { font-family : monospace; color : red; background-color : inherit; } Input { font-family : monospace; color : green; background-color : inherit; } Key { font-family : monospace; text-decoration : underline; color : green; background-color : inherit; } Link { font-family : monospace; color : green; background-color : inherit; text-decoration : underline; } Menu { font-family : monospace; color : red; background-color : inherit; } Output { font-family : monospace; color : red; background-color : inherit; } Icon { color : inherit; background-color : #B0E0E6; font-weight : bold; } Screen { font-family : monospace; padding-top : 3mm; padding-left : 4pt; padding-bottom : 2pt; display : block; margin-top : 12pt; margin-bottom : 12pt; white-space : pre; color : inherit; background-color : #FFCC99; }*/